Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2063683002: Migrate components/data_reduction_proxy to Mojo interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Eliminate usage of RPH observer Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #include "chromeos/chromeos_constants.h" 111 #include "chromeos/chromeos_constants.h"
112 #include "components/autofill/content/browser/content_autofill_driver_factory.h" 112 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
113 #include "components/autofill/core/common/autofill_switches.h" 113 #include "components/autofill/core/common/autofill_switches.h"
114 #include "components/cdm/browser/cdm_message_filter_android.h" 114 #include "components/cdm/browser/cdm_message_filter_android.h"
115 #include "components/cloud_devices/common/cloud_devices_switches.h" 115 #include "components/cloud_devices/common/cloud_devices_switches.h"
116 #include "components/content_settings/core/browser/content_settings_utils.h" 116 #include "components/content_settings/core/browser/content_settings_utils.h"
117 #include "components/content_settings/core/browser/cookie_settings.h" 117 #include "components/content_settings/core/browser/cookie_settings.h"
118 #include "components/content_settings/core/browser/host_content_settings_map.h" 118 #include "components/content_settings/core/browser/host_content_settings_map.h"
119 #include "components/content_settings/core/common/content_settings.h" 119 #include "components/content_settings/core/common/content_settings.h"
120 #include "components/content_settings/core/common/content_settings_types.h" 120 #include "components/content_settings/core/common/content_settings_types.h"
121 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_m essage_filter.h" 121 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_h ost_impl.h"
122 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf ig.h"
122 #include "components/dom_distiller/core/dom_distiller_switches.h" 123 #include "components/dom_distiller/core/dom_distiller_switches.h"
123 #include "components/dom_distiller/core/url_constants.h" 124 #include "components/dom_distiller/core/url_constants.h"
124 #include "components/error_page/common/error_page_switches.h" 125 #include "components/error_page/common/error_page_switches.h"
125 #include "components/google/core/browser/google_util.h" 126 #include "components/google/core/browser/google_util.h"
126 #include "components/metrics/client_info.h" 127 #include "components/metrics/client_info.h"
127 #include "components/net_log/chrome_net_log.h" 128 #include "components/net_log/chrome_net_log.h"
128 #include "components/pref_registry/pref_registry_syncable.h" 129 #include "components/pref_registry/pref_registry_syncable.h"
129 #include "components/prefs/pref_service.h" 130 #include "components/prefs/pref_service.h"
130 #include "components/prefs/scoped_user_pref_update.h" 131 #include "components/prefs/scoped_user_pref_update.h"
131 #include "components/rappor/rappor_utils.h" 132 #include "components/rappor/rappor_utils.h"
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 #endif 996 #endif
996 #if !defined(DISABLE_NACL) 997 #if !defined(DISABLE_NACL)
997 host->AddFilter(new nacl::NaClHostMessageFilter( 998 host->AddFilter(new nacl::NaClHostMessageFilter(
998 id, profile->IsOffTheRecord(), 999 id, profile->IsOffTheRecord(),
999 profile->GetPath(), 1000 profile->GetPath(),
1000 context)); 1001 context));
1001 #endif 1002 #endif
1002 #if defined(OS_ANDROID) 1003 #if defined(OS_ANDROID)
1003 host->AddFilter(new cdm::CdmMessageFilterAndroid()); 1004 host->AddFilter(new cdm::CdmMessageFilterAndroid());
1004 #endif 1005 #endif
1005 DataReductionProxyChromeSettings* data_reduction_proxy_settings =
1006 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile);
1007 host->AddFilter(new data_reduction_proxy::DataReductionProxyMessageFilter(
1008 data_reduction_proxy_settings));
1009 1006
1010 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( 1007 host->Send(new ChromeViewMsg_SetIsIncognitoProcess(
1011 profile->IsOffTheRecord())); 1008 profile->IsOffTheRecord()));
1012 1009
1013 for (size_t i = 0; i < extra_parts_.size(); ++i) 1010 for (size_t i = 0; i < extra_parts_.size(); ++i)
1014 extra_parts_[i]->RenderProcessWillLaunch(host); 1011 extra_parts_[i]->RenderProcessWillLaunch(host);
1015 1012
1016 RendererContentSettingRules rules; 1013 RendererContentSettingRules rules;
1017 if (host->IsForGuestsOnly()) { 1014 if (host->IsForGuestsOnly()) {
1018 #if defined(ENABLE_EXTENSIONS) 1015 #if defined(ENABLE_EXTENSIONS)
(...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2774 content::BrowserThread::UI); 2771 content::BrowserThread::UI);
2775 registry->AddInterface( 2772 registry->AddInterface(
2776 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create), 2773 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create),
2777 ui_task_runner); 2774 ui_task_runner);
2778 2775
2779 #if defined(OS_CHROMEOS) 2776 #if defined(OS_CHROMEOS)
2780 registry->AddInterface<metrics::mojom::LeakDetector>( 2777 registry->AddInterface<metrics::mojom::LeakDetector>(
2781 base::Bind(&metrics::LeakDetectorRemoteController::Create), 2778 base::Bind(&metrics::LeakDetectorRemoteController::Create),
2782 ui_task_runner); 2779 ui_task_runner);
2783 #endif 2780 #endif
2781
2782 DataReductionProxyChromeSettings* data_reduction_proxy_settings =
2783 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(
2784 render_process_host->GetBrowserContext());
2785 base::WeakPtr<data_reduction_proxy::DataReductionProxyConfig> weak_config;
2786 if (data_reduction_proxy_settings && data_reduction_proxy_settings->Config())
2787 weak_config = data_reduction_proxy_settings->Config()->GetWeakPtr();
2788 registry->AddInterface(
2789 base::Bind(&data_reduction_proxy::DataReductionProxyHostImpl::Create,
2790 weak_config),
2791 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
2784 } 2792 }
2785 2793
2786 void ChromeContentBrowserClient::ExposeInterfacesToMediaService( 2794 void ChromeContentBrowserClient::ExposeInterfacesToMediaService(
2787 shell::InterfaceRegistry* registry, 2795 shell::InterfaceRegistry* registry,
2788 content::RenderFrameHost* render_frame_host) { 2796 content::RenderFrameHost* render_frame_host) {
2789 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. 2797 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA.
2790 #if defined(OS_CHROMEOS) 2798 #if defined(OS_CHROMEOS)
2791 registry->AddInterface( 2799 registry->AddInterface(
2792 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, 2800 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create,
2793 render_frame_host)); 2801 render_frame_host));
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
3055 if (channel <= kMaxDisableEncryptionChannel) { 3063 if (channel <= kMaxDisableEncryptionChannel) {
3056 static const char* const kWebRtcDevSwitchNames[] = { 3064 static const char* const kWebRtcDevSwitchNames[] = {
3057 switches::kDisableWebRtcEncryption, 3065 switches::kDisableWebRtcEncryption,
3058 }; 3066 };
3059 to_command_line->CopySwitchesFrom(from_command_line, 3067 to_command_line->CopySwitchesFrom(from_command_line,
3060 kWebRtcDevSwitchNames, 3068 kWebRtcDevSwitchNames,
3061 arraysize(kWebRtcDevSwitchNames)); 3069 arraysize(kWebRtcDevSwitchNames));
3062 } 3070 }
3063 } 3071 }
3064 #endif // defined(ENABLE_WEBRTC) 3072 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_content_client.h » ('j') | chrome/renderer/page_load_histograms.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698