| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 if (extension->GetType() == Extension::TYPE_HOSTED_APP && | 411 if (extension->GetType() == Extension::TYPE_HOSTED_APP && |
| 412 !extension->HasAPIPermission(ExtensionAPIPermission::kBackground)) | 412 !extension->HasAPIPermission(ExtensionAPIPermission::kBackground)) |
| 413 return false; | 413 return false; |
| 414 | 414 |
| 415 // Hosted apps that have the background permission must use process per site, | 415 // Hosted apps that have the background permission must use process per site, |
| 416 // since all instances can make synchronous calls to the background window. | 416 // since all instances can make synchronous calls to the background window. |
| 417 // Other extensions should use process per site as well. | 417 // Other extensions should use process per site as well. |
| 418 return true; | 418 return true; |
| 419 } | 419 } |
| 420 | 420 |
| 421 bool ChromeContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) { | |
| 422 return url == GURL(chrome::kChromeUICrashURL) || | |
| 423 url == GURL(chrome::kChromeUIKillURL) || | |
| 424 url == GURL(chrome::kChromeUIHangURL) || | |
| 425 url == GURL(chrome::kChromeUIShorthangURL); | |
| 426 } | |
| 427 | |
| 428 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { | 421 bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) { |
| 429 return ProfileIOData::IsHandledURL(url); | 422 return ProfileIOData::IsHandledURL(url); |
| 430 } | 423 } |
| 431 | 424 |
| 432 bool ChromeContentBrowserClient::IsSuitableHost( | 425 bool ChromeContentBrowserClient::IsSuitableHost( |
| 433 content::RenderProcessHost* process_host, | 426 content::RenderProcessHost* process_host, |
| 434 const GURL& site_url) { | 427 const GURL& site_url) { |
| 435 Profile* profile = | 428 Profile* profile = |
| 436 Profile::FromBrowserContext(process_host->GetBrowserContext()); | 429 Profile::FromBrowserContext(process_host->GetBrowserContext()); |
| 437 ExtensionService* service = profile->GetExtensionService(); | 430 ExtensionService* service = profile->GetExtensionService(); |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 #if defined(USE_NSS) | 1325 #if defined(USE_NSS) |
| 1333 crypto::CryptoModuleBlockingPasswordDelegate* | 1326 crypto::CryptoModuleBlockingPasswordDelegate* |
| 1334 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1327 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 1335 const GURL& url) { | 1328 const GURL& url) { |
| 1336 return browser::NewCryptoModuleBlockingDialogDelegate( | 1329 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 1337 browser::kCryptoModulePasswordKeygen, url.host()); | 1330 browser::kCryptoModulePasswordKeygen, url.host()); |
| 1338 } | 1331 } |
| 1339 #endif | 1332 #endif |
| 1340 | 1333 |
| 1341 } // namespace chrome | 1334 } // namespace chrome |
| OLD | NEW |