Merge lp:~abreu-alexandre/oxide/stub-quota-context-1-4 into lp:oxide/1.4

Proposed by Alexandre Abreu
Status: Merged
Merged at revision: 886
Proposed branch: lp:~abreu-alexandre/oxide/stub-quota-context-1-4
Merge into: lp:oxide/1.4
Diff against target: 144 lines (+90/-0)
5 files modified
shared/browser/oxide_content_browser_client.cc (+5/-0)
shared/browser/oxide_content_browser_client.h (+2/-0)
shared/browser/oxide_quota_permission_context.cc (+36/-0)
shared/browser/oxide_quota_permission_context.h (+45/-0)
shared/shared.gyp (+2/-0)
To merge this branch: bzr merge lp:~abreu-alexandre/oxide/stub-quota-context-1-4
Reviewer Review Type Date Requested Status
Chris Coulson Approve
Review via email: mp+243477@code.launchpad.net

Commit message

Stub the quota permission context to avoid crashes when e.g. storage quota is requested.

Description of the change

Stub the quota permission context to avoid crashes when e.g. storage quota is requested.

To post a comment you must log in.
879. By Alexandre Abreu

remove header clutter

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

It would probably be good to merge this in to trunk as well, at least whilst I'm reviewing the other branch

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'shared/browser/oxide_content_browser_client.cc'
--- shared/browser/oxide_content_browser_client.cc 2014-11-15 17:32:48 +0000
+++ shared/browser/oxide_content_browser_client.cc 2014-12-03 13:42:53 +0000
@@ -50,6 +50,7 @@
50#include "oxide_browser_process_main.h"50#include "oxide_browser_process_main.h"
51#include "oxide_devtools_manager_delegate.h"51#include "oxide_devtools_manager_delegate.h"
52#include "oxide_form_factor.h"52#include "oxide_form_factor.h"
53#include "oxide_quota_permission_context.h"
53#include "oxide_resource_dispatcher_host_delegate.h"54#include "oxide_resource_dispatcher_host_delegate.h"
54#include "oxide_script_message_dispatcher_browser.h"55#include "oxide_script_message_dispatcher_browser.h"
55#include "oxide_user_agent_override_provider.h"56#include "oxide_user_agent_override_provider.h"
@@ -344,4 +345,8 @@
344 platform_integration_.reset(integration);345 platform_integration_.reset(integration);
345}346}
346347
348content::QuotaPermissionContext* ContentBrowserClient::CreateQuotaPermissionContext() {
349 return new QuotaPermissionContext();
350}
351
347} // namespace oxide352} // namespace oxide
348353
=== modified file 'shared/browser/oxide_content_browser_client.h'
--- shared/browser/oxide_content_browser_client.h 2014-11-13 08:41:43 +0000
+++ shared/browser/oxide_content_browser_client.h 2014-12-03 13:42:53 +0000
@@ -30,6 +30,7 @@
30}30}
3131
32namespace content {32namespace content {
33class QuotaPermissionContext;
33class RenderViewHost;34class RenderViewHost;
34class ResourceDispatcherHostDelegate;35class ResourceDispatcherHostDelegate;
35}36}
@@ -127,6 +128,7 @@
127 content::LocationProvider* OverrideSystemLocationProvider() final;128 content::LocationProvider* OverrideSystemLocationProvider() final;
128 content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() final;129 content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() final;
129 void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) final;130 void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) final;
131 content::QuotaPermissionContext* CreateQuotaPermissionContext() final;
130132
131 scoped_ptr<BrowserPlatformIntegration> platform_integration_;133 scoped_ptr<BrowserPlatformIntegration> platform_integration_;
132134
133135
=== added file 'shared/browser/oxide_quota_permission_context.cc'
--- shared/browser/oxide_quota_permission_context.cc 1970-01-01 00:00:00 +0000
+++ shared/browser/oxide_quota_permission_context.cc 2014-12-03 13:42:53 +0000
@@ -0,0 +1,36 @@
1// vim:expandtab:shiftwidth=2:tabstop=2:
2// Copyright (C) 2014 Canonical Ltd.
3
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// Lesser General Public License for more details.
13
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
18#include "oxide_quota_permission_context.h"
19
20namespace oxide {
21
22QuotaPermissionContext::QuotaPermissionContext() {
23}
24
25QuotaPermissionContext::~QuotaPermissionContext() {
26}
27
28void QuotaPermissionContext::RequestQuotaPermission(
29 const content::StorageQuotaParams& params,
30 int render_process_id,
31 const content::QuotaPermissionContext::PermissionCallback& callback) {
32 callback.Run(QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_DISALLOW);
33}
34
35} // namespace oxide
36
037
=== added file 'shared/browser/oxide_quota_permission_context.h'
--- shared/browser/oxide_quota_permission_context.h 1970-01-01 00:00:00 +0000
+++ shared/browser/oxide_quota_permission_context.h 2014-12-03 13:42:53 +0000
@@ -0,0 +1,45 @@
1// vim:expandtab:shiftwidth=2:tabstop=2:
2// Copyright (C) 2014 Canonical Ltd.
3
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// Lesser General Public License for more details.
13
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
18#ifndef _OXIDE_SHARED_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
19#define _OXIDE_SHARED_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
20
21#include "content/public/browser/quota_permission_context.h"
22#include "storage/common/quota/quota_types.h"
23
24namespace oxide {
25
26class QuotaPermissionContext final :
27 public content::QuotaPermissionContext {
28 public:
29 QuotaPermissionContext();
30 ~QuotaPermissionContext();
31
32 void RequestQuotaPermission(
33 const content::StorageQuotaParams& params,
34 int render_process_id,
35 const content::QuotaPermissionContext::PermissionCallback& callback) final;
36
37 private:
38
39 DISALLOW_COPY_AND_ASSIGN(QuotaPermissionContext);
40};
41
42} // namespace oxide
43
44#endif // _OXIDE_SHARED_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
45
046
=== modified file 'shared/shared.gyp'
--- shared/shared.gyp 2014-11-18 08:02:53 +0000
+++ shared/shared.gyp 2014-12-03 13:42:53 +0000
@@ -289,6 +289,8 @@
289 'browser/oxide_permission_request.h',289 'browser/oxide_permission_request.h',
290 'browser/oxide_power_save_blocker.cc',290 'browser/oxide_power_save_blocker.cc',
291 'browser/oxide_power_save_blocker.h',291 'browser/oxide_power_save_blocker.h',
292 'browser/oxide_quota_permission_context.cc',
293 'browser/oxide_quota_permission_context.h',
292 'browser/oxide_renderer_frame_evictor.cc',294 'browser/oxide_renderer_frame_evictor.cc',
293 'browser/oxide_renderer_frame_evictor.h',295 'browser/oxide_renderer_frame_evictor.h',
294 'browser/oxide_render_widget_host_view.cc',296 'browser/oxide_render_widget_host_view.cc',

Subscribers

People subscribed via source and target branches