Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(978)

Side by Side Diff: extensions/shell/browser/shell_content_browser_client.cc

Issue 2592793002: Revert of Change how the quota system computes the total poolsize for temporary storage (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/shell/browser/shell_content_browser_client.h" 5 #include "extensions/shell/browser/shell_content_browser_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 19 matching lines...) Expand all
30 #include "extensions/browser/io_thread_extension_message_filter.h" 30 #include "extensions/browser/io_thread_extension_message_filter.h"
31 #include "extensions/browser/process_map.h" 31 #include "extensions/browser/process_map.h"
32 #include "extensions/common/constants.h" 32 #include "extensions/common/constants.h"
33 #include "extensions/common/extension.h" 33 #include "extensions/common/extension.h"
34 #include "extensions/common/switches.h" 34 #include "extensions/common/switches.h"
35 #include "extensions/shell/browser/shell_browser_context.h" 35 #include "extensions/shell/browser/shell_browser_context.h"
36 #include "extensions/shell/browser/shell_browser_main_parts.h" 36 #include "extensions/shell/browser/shell_browser_main_parts.h"
37 #include "extensions/shell/browser/shell_extension_system.h" 37 #include "extensions/shell/browser/shell_extension_system.h"
38 #include "extensions/shell/browser/shell_navigation_ui_data.h" 38 #include "extensions/shell/browser/shell_navigation_ui_data.h"
39 #include "extensions/shell/browser/shell_speech_recognition_manager_delegate.h" 39 #include "extensions/shell/browser/shell_speech_recognition_manager_delegate.h"
40 #include "storage/browser/quota/quota_settings.h"
41 #include "url/gurl.h" 40 #include "url/gurl.h"
42 41
43 #if !defined(DISABLE_NACL) 42 #if !defined(DISABLE_NACL)
44 #include "components/nacl/browser/nacl_browser.h" 43 #include "components/nacl/browser/nacl_browser.h"
45 #include "components/nacl/browser/nacl_host_message_filter.h" 44 #include "components/nacl/browser/nacl_host_message_filter.h"
46 #include "components/nacl/browser/nacl_process_host.h" 45 #include "components/nacl/browser/nacl_process_host.h"
47 #include "components/nacl/common/nacl_process_type.h" 46 #include "components/nacl/common/nacl_process_type.h"
48 #include "components/nacl/common/nacl_switches.h" 47 #include "components/nacl/common/nacl_switches.h"
49 #include "content/public/browser/browser_child_process_host.h" 48 #include "content/public/browser/browser_child_process_host.h"
50 #include "content/public/browser/child_process_data.h" 49 #include "content/public/browser/child_process_data.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 bool ShellContentBrowserClient::ShouldUseProcessPerSite( 113 bool ShellContentBrowserClient::ShouldUseProcessPerSite(
115 content::BrowserContext* browser_context, 114 content::BrowserContext* browser_context,
116 const GURL& effective_url) { 115 const GURL& effective_url) {
117 // This ensures that all render views created for a single app will use the 116 // This ensures that all render views created for a single app will use the
118 // same render process (see content::SiteInstance::GetProcess). Otherwise the 117 // same render process (see content::SiteInstance::GetProcess). Otherwise the
119 // default behavior of ContentBrowserClient will lead to separate render 118 // default behavior of ContentBrowserClient will lead to separate render
120 // processes for the background page and each app window view. 119 // processes for the background page and each app window view.
121 return true; 120 return true;
122 } 121 }
123 122
124 void ShellContentBrowserClient::GetQuotaSettings(
125 content::BrowserContext* context,
126 content::StoragePartition* partition,
127 const storage::OptionalQuotaSettingsCallback& callback) {
128 content::BrowserThread::PostTaskAndReplyWithResult(
129 content::BrowserThread::FILE, FROM_HERE,
130 base::Bind(&storage::CalculateNominalDynamicSettings,
131 partition->GetPath(), context->IsOffTheRecord()),
132 callback);
133 }
134
135 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { 123 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) {
136 if (!url.is_valid()) 124 if (!url.is_valid())
137 return false; 125 return false;
138 // Keep in sync with ProtocolHandlers added in 126 // Keep in sync with ProtocolHandlers added in
139 // ShellBrowserContext::CreateRequestContext() and in 127 // ShellBrowserContext::CreateRequestContext() and in
140 // content::ShellURLRequestContextGetter::GetURLRequestContext(). 128 // content::ShellURLRequestContextGetter::GetURLRequestContext().
141 static const char* const kProtocolList[] = { 129 static const char* const kProtocolList[] = {
142 url::kBlobScheme, 130 url::kBlobScheme,
143 content::kChromeDevToolsScheme, 131 content::kChromeDevToolsScheme,
144 content::kChromeUIScheme, 132 content::kChromeUIScheme,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 270
283 const Extension* ShellContentBrowserClient::GetExtension( 271 const Extension* ShellContentBrowserClient::GetExtension(
284 content::SiteInstance* site_instance) { 272 content::SiteInstance* site_instance) {
285 ExtensionRegistry* registry = 273 ExtensionRegistry* registry =
286 ExtensionRegistry::Get(site_instance->GetBrowserContext()); 274 ExtensionRegistry::Get(site_instance->GetBrowserContext());
287 return registry->enabled_extensions().GetExtensionOrAppByURL( 275 return registry->enabled_extensions().GetExtensionOrAppByURL(
288 site_instance->GetSiteURL()); 276 site_instance->GetSiteURL());
289 } 277 }
290 278
291 } // namespace extensions 279 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_content_browser_client.h ('k') | extensions/shell/browser/shell_special_storage_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698