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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 8033001: Delegate decision what site instances can be rendered in what process to chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 2 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/app/breakpad_mac.h" 8 #include "chrome/app/breakpad_mac.h"
9 #include "chrome/browser/browser_about_handler.h" 9 #include "chrome/browser/browser_about_handler.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 return true; 240 return true;
241 } 241 }
242 242
243 bool ChromeContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) { 243 bool ChromeContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) {
244 return url == GURL(chrome::kChromeUICrashURL) || 244 return url == GURL(chrome::kChromeUICrashURL) ||
245 url == GURL(chrome::kChromeUIKillURL) || 245 url == GURL(chrome::kChromeUIKillURL) ||
246 url == GURL(chrome::kChromeUIHangURL) || 246 url == GURL(chrome::kChromeUIHangURL) ||
247 url == GURL(chrome::kChromeUIShorthangURL); 247 url == GURL(chrome::kChromeUIShorthangURL);
248 } 248 }
249 249
250 bool ChromeContentBrowserClient::IsSuitableHost(
251 RenderProcessHost* process_host,
252 const GURL& site_url) {
253 Profile* profile =
254 Profile::FromBrowserContext(process_host->browser_context());
255 ExtensionProcessManager* process_manager =
Aaron Boodman 2011/09/27 19:26:49 Nit: I would prefer to call this variable extensio
jochen (gone - plz use gerrit) 2011/09/27 20:41:40 Done.
256 profile->GetExtensionProcessManager();
257
258 // Maybe NULL during tests.
259 if (!process_manager)
260 return true;
261
262 bool is_extension_host =
263 process_host->is_extension_process() ||
Aaron Boodman 2011/09/27 19:26:49 Eventually, this field is going to have to go. Wil
jochen (gone - plz use gerrit) 2011/09/27 20:41:40 currently this flag is set and queried only in chr
264 process_manager->IsProcessHostWithBindings(process_host->id());
265 return site_url.SchemeIs(chrome::kExtensionScheme) == is_extension_host;
266 }
267
250 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName( 268 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName(
251 const std::string& alias_name) { 269 const std::string& alias_name) {
252 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name); 270 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name);
253 } 271 }
254 272
255 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( 273 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
256 CommandLine* command_line, int child_process_id) { 274 CommandLine* command_line, int child_process_id) {
257 #if defined(USE_LINUX_BREAKPAD) 275 #if defined(USE_LINUX_BREAKPAD)
258 if (IsCrashReporterEnabled()) { 276 if (IsCrashReporterEnabled()) {
259 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, 277 command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 #if defined(USE_NSS) 831 #if defined(USE_NSS)
814 crypto::CryptoModuleBlockingPasswordDelegate* 832 crypto::CryptoModuleBlockingPasswordDelegate*
815 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 833 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
816 const GURL& url) { 834 const GURL& url) {
817 return browser::NewCryptoModuleBlockingDialogDelegate( 835 return browser::NewCryptoModuleBlockingDialogDelegate(
818 browser::kCryptoModulePasswordKeygen, url.host()); 836 browser::kCryptoModulePasswordKeygen, url.host());
819 } 837 }
820 #endif 838 #endif
821 839
822 } // namespace chrome 840 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698