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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 #include "chromeos/chromeos_constants.h" | 110 #include "chromeos/chromeos_constants.h" |
111 #include "components/autofill/content/browser/content_autofill_driver_factory.h" | 111 #include "components/autofill/content/browser/content_autofill_driver_factory.h" |
112 #include "components/autofill/core/common/autofill_switches.h" | 112 #include "components/autofill/core/common/autofill_switches.h" |
113 #include "components/cdm/browser/cdm_message_filter_android.h" | 113 #include "components/cdm/browser/cdm_message_filter_android.h" |
114 #include "components/cloud_devices/common/cloud_devices_switches.h" | 114 #include "components/cloud_devices/common/cloud_devices_switches.h" |
115 #include "components/content_settings/core/browser/content_settings_utils.h" | 115 #include "components/content_settings/core/browser/content_settings_utils.h" |
116 #include "components/content_settings/core/browser/cookie_settings.h" | 116 #include "components/content_settings/core/browser/cookie_settings.h" |
117 #include "components/content_settings/core/browser/host_content_settings_map.h" | 117 #include "components/content_settings/core/browser/host_content_settings_map.h" |
118 #include "components/content_settings/core/common/content_settings.h" | 118 #include "components/content_settings/core/common/content_settings.h" |
119 #include "components/content_settings/core/common/content_settings_types.h" | 119 #include "components/content_settings/core/common/content_settings_types.h" |
120 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_m essage_filter.h" | 120 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_h ost_impl.h" |
121 #include "components/dom_distiller/core/dom_distiller_switches.h" | 121 #include "components/dom_distiller/core/dom_distiller_switches.h" |
122 #include "components/dom_distiller/core/url_constants.h" | 122 #include "components/dom_distiller/core/url_constants.h" |
123 #include "components/error_page/common/error_page_switches.h" | 123 #include "components/error_page/common/error_page_switches.h" |
124 #include "components/google/core/browser/google_util.h" | 124 #include "components/google/core/browser/google_util.h" |
125 #include "components/metrics/client_info.h" | 125 #include "components/metrics/client_info.h" |
126 #include "components/net_log/chrome_net_log.h" | 126 #include "components/net_log/chrome_net_log.h" |
127 #include "components/pref_registry/pref_registry_syncable.h" | 127 #include "components/pref_registry/pref_registry_syncable.h" |
128 #include "components/prefs/pref_service.h" | 128 #include "components/prefs/pref_service.h" |
129 #include "components/prefs/scoped_user_pref_update.h" | 129 #include "components/prefs/scoped_user_pref_update.h" |
130 #include "components/rappor/rappor_utils.h" | 130 #include "components/rappor/rappor_utils.h" |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
984 host->AddFilter(new nacl::NaClHostMessageFilter( | 984 host->AddFilter(new nacl::NaClHostMessageFilter( |
985 id, profile->IsOffTheRecord(), | 985 id, profile->IsOffTheRecord(), |
986 profile->GetPath(), | 986 profile->GetPath(), |
987 context)); | 987 context)); |
988 #endif | 988 #endif |
989 #if defined(OS_ANDROID) | 989 #if defined(OS_ANDROID) |
990 host->AddFilter(new cdm::CdmMessageFilterAndroid()); | 990 host->AddFilter(new cdm::CdmMessageFilterAndroid()); |
991 #endif | 991 #endif |
992 DataReductionProxyChromeSettings* data_reduction_proxy_settings = | 992 DataReductionProxyChromeSettings* data_reduction_proxy_settings = |
993 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile); | 993 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile); |
994 host->AddFilter(new data_reduction_proxy::DataReductionProxyMessageFilter( | 994 host->GetServiceRegistry()->AddService( |
leonhsl(Using Gerrit)
2016/06/14 10:16:48
Instead of here I think it's better to put the Add
Anand Mistry (off Chromium)
2016/06/15 08:09:40
I think that's reasonable given that the RenderFra
leonhsl(Using Gerrit)
2016/06/16 08:28:30
Done.
A separate CL https://codereview.chromium.or
| |
995 data_reduction_proxy_settings)); | 995 base::Bind(&data_reduction_proxy::DataReductionProxyHostImpl::Create, |
996 data_reduction_proxy_settings), | |
997 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | |
996 | 998 |
997 host->GetImmediateSender()->Send(new ChromeViewMsg_SetIsIncognitoProcess( | 999 host->GetImmediateSender()->Send(new ChromeViewMsg_SetIsIncognitoProcess( |
998 profile->IsOffTheRecord())); | 1000 profile->IsOffTheRecord())); |
999 | 1001 |
1000 for (size_t i = 0; i < extra_parts_.size(); ++i) | 1002 for (size_t i = 0; i < extra_parts_.size(); ++i) |
1001 extra_parts_[i]->RenderProcessWillLaunch(host); | 1003 extra_parts_[i]->RenderProcessWillLaunch(host); |
1002 | 1004 |
1003 RendererContentSettingRules rules; | 1005 RendererContentSettingRules rules; |
1004 if (host->IsForGuestsOnly()) { | 1006 if (host->IsForGuestsOnly()) { |
1005 #if defined(ENABLE_EXTENSIONS) | 1007 #if defined(ENABLE_EXTENSIONS) |
(...skipping 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2962 if (channel <= kMaxDisableEncryptionChannel) { | 2964 if (channel <= kMaxDisableEncryptionChannel) { |
2963 static const char* const kWebRtcDevSwitchNames[] = { | 2965 static const char* const kWebRtcDevSwitchNames[] = { |
2964 switches::kDisableWebRtcEncryption, | 2966 switches::kDisableWebRtcEncryption, |
2965 }; | 2967 }; |
2966 to_command_line->CopySwitchesFrom(from_command_line, | 2968 to_command_line->CopySwitchesFrom(from_command_line, |
2967 kWebRtcDevSwitchNames, | 2969 kWebRtcDevSwitchNames, |
2968 arraysize(kWebRtcDevSwitchNames)); | 2970 arraysize(kWebRtcDevSwitchNames)); |
2969 } | 2971 } |
2970 } | 2972 } |
2971 #endif // defined(ENABLE_WEBRTC) | 2973 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |