| 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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 context)); | 988 context)); |
| 989 #endif | 989 #endif |
| 990 #if defined(OS_ANDROID) | 990 #if defined(OS_ANDROID) |
| 991 host->AddFilter(new cdm::CdmMessageFilterAndroid()); | 991 host->AddFilter(new cdm::CdmMessageFilterAndroid()); |
| 992 #endif | 992 #endif |
| 993 DataReductionProxyChromeSettings* data_reduction_proxy_settings = | 993 DataReductionProxyChromeSettings* data_reduction_proxy_settings = |
| 994 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile); | 994 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile); |
| 995 host->AddFilter(new data_reduction_proxy::DataReductionProxyMessageFilter( | 995 host->AddFilter(new data_reduction_proxy::DataReductionProxyMessageFilter( |
| 996 data_reduction_proxy_settings)); | 996 data_reduction_proxy_settings)); |
| 997 | 997 |
| 998 host->GetImmediateSender()->Send(new ChromeViewMsg_SetIsIncognitoProcess( | 998 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( |
| 999 profile->IsOffTheRecord())); | 999 profile->IsOffTheRecord())); |
| 1000 | 1000 |
| 1001 for (size_t i = 0; i < extra_parts_.size(); ++i) | 1001 for (size_t i = 0; i < extra_parts_.size(); ++i) |
| 1002 extra_parts_[i]->RenderProcessWillLaunch(host); | 1002 extra_parts_[i]->RenderProcessWillLaunch(host); |
| 1003 | 1003 |
| 1004 RendererContentSettingRules rules; | 1004 RendererContentSettingRules rules; |
| 1005 if (host->IsForGuestsOnly()) { | 1005 if (host->IsForGuestsOnly()) { |
| 1006 #if defined(ENABLE_EXTENSIONS) | 1006 #if defined(ENABLE_EXTENSIONS) |
| 1007 GetGuestViewDefaultContentSettingRules(profile->IsOffTheRecord(), &rules); | 1007 GetGuestViewDefaultContentSettingRules(profile->IsOffTheRecord(), &rules); |
| 1008 #else | 1008 #else |
| 1009 NOTREACHED(); | 1009 NOTREACHED(); |
| 1010 #endif | 1010 #endif |
| 1011 } else { | 1011 } else { |
| 1012 GetRendererContentSettingRules( | 1012 GetRendererContentSettingRules( |
| 1013 HostContentSettingsMapFactory::GetForProfile(profile), &rules); | 1013 HostContentSettingsMapFactory::GetForProfile(profile), &rules); |
| 1014 } | 1014 } |
| 1015 host->GetImmediateSender()->Send( | 1015 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
| 1016 new ChromeViewMsg_SetContentSettingRules(rules)); | |
| 1017 } | 1016 } |
| 1018 | 1017 |
| 1019 GURL ChromeContentBrowserClient::GetEffectiveURL( | 1018 GURL ChromeContentBrowserClient::GetEffectiveURL( |
| 1020 content::BrowserContext* browser_context, const GURL& url) { | 1019 content::BrowserContext* browser_context, const GURL& url) { |
| 1021 Profile* profile = Profile::FromBrowserContext(browser_context); | 1020 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 1022 if (!profile) | 1021 if (!profile) |
| 1023 return url; | 1022 return url; |
| 1024 | 1023 |
| 1025 // If the input |url| should be assigned to the Instant renderer, make its | 1024 // If the input |url| should be assigned to the Instant renderer, make its |
| 1026 // effective URL distinct from other URLs on the search provider's domain. | 1025 // effective URL distinct from other URLs on the search provider's domain. |
| (...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2965 if (channel <= kMaxDisableEncryptionChannel) { | 2964 if (channel <= kMaxDisableEncryptionChannel) { |
| 2966 static const char* const kWebRtcDevSwitchNames[] = { | 2965 static const char* const kWebRtcDevSwitchNames[] = { |
| 2967 switches::kDisableWebRtcEncryption, | 2966 switches::kDisableWebRtcEncryption, |
| 2968 }; | 2967 }; |
| 2969 to_command_line->CopySwitchesFrom(from_command_line, | 2968 to_command_line->CopySwitchesFrom(from_command_line, |
| 2970 kWebRtcDevSwitchNames, | 2969 kWebRtcDevSwitchNames, |
| 2971 arraysize(kWebRtcDevSwitchNames)); | 2970 arraysize(kWebRtcDevSwitchNames)); |
| 2972 } | 2971 } |
| 2973 } | 2972 } |
| 2974 #endif // defined(ENABLE_WEBRTC) | 2973 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |