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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 if (host->IsForGuestsOnly()) { | 1097 if (host->IsForGuestsOnly()) { |
1098 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1098 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1099 GetGuestViewDefaultContentSettingRules(is_incognito_process, &rules); | 1099 GetGuestViewDefaultContentSettingRules(is_incognito_process, &rules); |
1100 #else | 1100 #else |
1101 NOTREACHED(); | 1101 NOTREACHED(); |
1102 #endif | 1102 #endif |
1103 } else { | 1103 } else { |
1104 GetRendererContentSettingRules( | 1104 GetRendererContentSettingRules( |
1105 HostContentSettingsMapFactory::GetForProfile(profile), &rules); | 1105 HostContentSettingsMapFactory::GetForProfile(profile), &rules); |
1106 } | 1106 } |
1107 // TODO(nigeltao): eliminate this legacy IPC. Instead, add an extra arg to | 1107 rc_interface->SetContentSettingRules(rules); |
1108 // the rc_interface->SetInitialConfiguration call. | |
1109 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); | |
1110 } | 1108 } |
1111 | 1109 |
1112 GURL ChromeContentBrowserClient::GetEffectiveURL( | 1110 GURL ChromeContentBrowserClient::GetEffectiveURL( |
1113 content::BrowserContext* browser_context, const GURL& url) { | 1111 content::BrowserContext* browser_context, const GURL& url) { |
1114 Profile* profile = Profile::FromBrowserContext(browser_context); | 1112 Profile* profile = Profile::FromBrowserContext(browser_context); |
1115 if (!profile) | 1113 if (!profile) |
1116 return url; | 1114 return url; |
1117 | 1115 |
1118 // If the input |url| should be assigned to the Instant renderer, make its | 1116 // If the input |url| should be assigned to the Instant renderer, make its |
1119 // effective URL distinct from other URLs on the search provider's domain. | 1117 // effective URL distinct from other URLs on the search provider's domain. |
(...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3378 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { | 3376 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { |
3379 return variations::GetVariationParamValue( | 3377 return variations::GetVariationParamValue( |
3380 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; | 3378 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; |
3381 } | 3379 } |
3382 | 3380 |
3383 bool ChromeContentBrowserClient:: | 3381 bool ChromeContentBrowserClient:: |
3384 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3382 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3385 return variations::GetVariationParamValue( | 3383 return variations::GetVariationParamValue( |
3386 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3384 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3387 } | 3385 } |
OLD | NEW |