| 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 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 content::BrowserContext* browser_context, const GURL& url) { | 1268 content::BrowserContext* browser_context, const GURL& url) { |
| 1269 Profile* profile = Profile::FromBrowserContext(browser_context); | 1269 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 1270 if (!profile) | 1270 if (!profile) |
| 1271 return url; | 1271 return url; |
| 1272 | 1272 |
| 1273 // If the input |url| should be assigned to the Instant renderer, make its | 1273 // If the input |url| should be assigned to the Instant renderer, make its |
| 1274 // effective URL distinct from other URLs on the search provider's domain. | 1274 // effective URL distinct from other URLs on the search provider's domain. |
| 1275 if (search::ShouldAssignURLToInstantRenderer(url, profile)) | 1275 if (search::ShouldAssignURLToInstantRenderer(url, profile)) |
| 1276 return search::GetEffectiveURLForInstant(url, profile); | 1276 return search::GetEffectiveURLForInstant(url, profile); |
| 1277 | 1277 |
| 1278 #if BUILDFLAG(ENABLE_EXTENSIONS) | |
| 1279 return ChromeContentBrowserClientExtensionsPart::GetEffectiveURL( | |
| 1280 profile, url); | |
| 1281 #else | |
| 1282 return url; | 1278 return url; |
| 1283 #endif | |
| 1284 } | 1279 } |
| 1285 | 1280 |
| 1286 bool ChromeContentBrowserClient::ShouldUseProcessPerSite( | 1281 bool ChromeContentBrowserClient::ShouldUseProcessPerSite( |
| 1287 content::BrowserContext* browser_context, const GURL& effective_url) { | 1282 content::BrowserContext* browser_context, const GURL& effective_url) { |
| 1288 // Non-extension, non-Instant URLs should generally use | 1283 // Non-extension, non-Instant URLs should generally use |
| 1289 // process-per-site-instance. Because we expect to use the effective URL, | 1284 // process-per-site-instance. Because we expect to use the effective URL, |
| 1290 // URLs for hosted apps (apart from bookmark apps) should have an extension | 1285 // URLs for hosted apps (apart from bookmark apps) should have an extension |
| 1291 // scheme by now. | 1286 // scheme by now. |
| 1292 | 1287 |
| 1293 Profile* profile = Profile::FromBrowserContext(browser_context); | 1288 Profile* profile = Profile::FromBrowserContext(browser_context); |
| (...skipping 2330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3624 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3619 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3625 return variations::GetVariationParamValue( | 3620 return variations::GetVariationParamValue( |
| 3626 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3621 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3627 } | 3622 } |
| 3628 | 3623 |
| 3629 // static | 3624 // static |
| 3630 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3625 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3631 const storage::QuotaSettings* settings) { | 3626 const storage::QuotaSettings* settings) { |
| 3632 g_default_quota_settings = settings; | 3627 g_default_quota_settings = settings; |
| 3633 } | 3628 } |
| OLD | NEW |