| 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 <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1560 const GURL& new_url) { | 1560 const GURL& new_url) { |
| 1561 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1561 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 1562 return ChromeContentBrowserClientExtensionsPart:: | 1562 return ChromeContentBrowserClientExtensionsPart:: |
| 1563 ShouldSwapBrowsingInstancesForNavigation( | 1563 ShouldSwapBrowsingInstancesForNavigation( |
| 1564 site_instance, current_url, new_url); | 1564 site_instance, current_url, new_url); |
| 1565 #else | 1565 #else |
| 1566 return false; | 1566 return false; |
| 1567 #endif | 1567 #endif |
| 1568 } | 1568 } |
| 1569 | 1569 |
| 1570 bool ChromeContentBrowserClient::ShouldSwapProcessesForRedirect( | |
| 1571 content::BrowserContext* browser_context, | |
| 1572 const GURL& current_url, | |
| 1573 const GURL& new_url) { | |
| 1574 #if BUILDFLAG(ENABLE_EXTENSIONS) | |
| 1575 return ChromeContentBrowserClientExtensionsPart:: | |
| 1576 ShouldSwapProcessesForRedirect(browser_context, current_url, new_url); | |
| 1577 #else | |
| 1578 return false; | |
| 1579 #endif | |
| 1580 } | |
| 1581 | |
| 1582 bool ChromeContentBrowserClient::ShouldAssignSiteForURL(const GURL& url) { | 1570 bool ChromeContentBrowserClient::ShouldAssignSiteForURL(const GURL& url) { |
| 1583 return !url.SchemeIs(chrome::kChromeNativeScheme); | 1571 return !url.SchemeIs(chrome::kChromeNativeScheme); |
| 1584 } | 1572 } |
| 1585 | 1573 |
| 1586 namespace { | 1574 namespace { |
| 1587 | 1575 |
| 1588 bool IsAutoReloadEnabled() { | 1576 bool IsAutoReloadEnabled() { |
| 1589 // Fetch the field trial, even though we don't use it. Calling FindFullName() | 1577 // Fetch the field trial, even though we don't use it. Calling FindFullName() |
| 1590 // causes the field-trial mechanism to report which group we're in, which | 1578 // causes the field-trial mechanism to report which group we're in, which |
| 1591 // might reflect a hard disable or hard enable via flag, both of which have | 1579 // might reflect a hard disable or hard enable via flag, both of which have |
| (...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3609 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3597 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3610 return variations::GetVariationParamValue( | 3598 return variations::GetVariationParamValue( |
| 3611 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3599 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3612 } | 3600 } |
| 3613 | 3601 |
| 3614 // static | 3602 // static |
| 3615 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3603 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3616 const storage::QuotaSettings* settings) { | 3604 const storage::QuotaSettings* settings) { |
| 3617 g_default_quota_settings = settings; | 3605 g_default_quota_settings = settings; |
| 3618 } | 3606 } |
| OLD | NEW |