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

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

Issue 2265173002: Created Mojo BudgetService implementation in chrome/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo_service
Patch Set: Store render process ID instead of BrowserContext* 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 19 matching lines...) Expand all
30 #include "chrome/browser/after_startup_task_utils.h" 30 #include "chrome/browser/after_startup_task_utils.h"
31 #include "chrome/browser/apps/app_url_redirector.h" 31 #include "chrome/browser/apps/app_url_redirector.h"
32 #include "chrome/browser/browser_about_handler.h" 32 #include "chrome/browser/browser_about_handler.h"
33 #include "chrome/browser/browser_process.h" 33 #include "chrome/browser/browser_process.h"
34 #include "chrome/browser/browser_shutdown.h" 34 #include "chrome/browser/browser_shutdown.h"
35 #include "chrome/browser/browsing_data/browsing_data_helper.h" 35 #include "chrome/browser/browsing_data/browsing_data_helper.h"
36 #include "chrome/browser/browsing_data/browsing_data_remover.h" 36 #include "chrome/browser/browsing_data/browsing_data_remover.h"
37 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" 37 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h"
38 #include "chrome/browser/browsing_data/origin_filter_builder.h" 38 #include "chrome/browser/browsing_data/origin_filter_builder.h"
39 #include "chrome/browser/browsing_data/registrable_domain_filter_builder.h" 39 #include "chrome/browser/browsing_data/registrable_domain_filter_builder.h"
40 #include "chrome/browser/budget_service/budget_service_impl.h"
40 #include "chrome/browser/character_encoding.h" 41 #include "chrome/browser/character_encoding.h"
41 #include "chrome/browser/chrome_content_browser_client_parts.h" 42 #include "chrome/browser/chrome_content_browser_client_parts.h"
42 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" 43 #include "chrome/browser/chrome_net_benchmarking_message_filter.h"
43 #include "chrome/browser/chrome_quota_permission_context.h" 44 #include "chrome/browser/chrome_quota_permission_context.h"
44 #include "chrome/browser/content_settings/cookie_settings_factory.h" 45 #include "chrome/browser/content_settings/cookie_settings_factory.h"
45 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 46 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
46 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 47 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
47 #include "chrome/browser/defaults.h" 48 #include "chrome/browser/defaults.h"
48 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" 49 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
49 #include "chrome/browser/download/download_prefs.h" 50 #include "chrome/browser/download/download_prefs.h"
(...skipping 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after
2858 2859
2859 void ChromeContentBrowserClient::ExposeInterfacesToRenderer( 2860 void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
2860 shell::InterfaceRegistry* registry, 2861 shell::InterfaceRegistry* registry,
2861 content::RenderProcessHost* render_process_host) { 2862 content::RenderProcessHost* render_process_host) {
2862 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner = 2863 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner =
2863 content::BrowserThread::GetTaskRunnerForThread( 2864 content::BrowserThread::GetTaskRunnerForThread(
2864 content::BrowserThread::UI); 2865 content::BrowserThread::UI);
2865 registry->AddInterface( 2866 registry->AddInterface(
2866 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create), 2867 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create),
2867 ui_task_runner); 2868 ui_task_runner);
2869 registry->AddInterface(
2870 base::Bind(&BudgetServiceImpl::Create, render_process_host->GetID()),
2871 ui_task_runner);
2868 2872
2869 #if defined(OS_CHROMEOS) 2873 #if defined(OS_CHROMEOS)
2870 registry->AddInterface<metrics::mojom::LeakDetector>( 2874 registry->AddInterface<metrics::mojom::LeakDetector>(
2871 base::Bind(&metrics::LeakDetectorRemoteController::Create), 2875 base::Bind(&metrics::LeakDetectorRemoteController::Create),
2872 ui_task_runner); 2876 ui_task_runner);
2873 #endif 2877 #endif
2874 } 2878 }
2875 2879
2876 void ChromeContentBrowserClient::ExposeInterfacesToMediaService( 2880 void ChromeContentBrowserClient::ExposeInterfacesToMediaService(
2877 shell::InterfaceRegistry* registry, 2881 shell::InterfaceRegistry* registry,
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
3150 if (channel <= kMaxDisableEncryptionChannel) { 3154 if (channel <= kMaxDisableEncryptionChannel) {
3151 static const char* const kWebRtcDevSwitchNames[] = { 3155 static const char* const kWebRtcDevSwitchNames[] = {
3152 switches::kDisableWebRtcEncryption, 3156 switches::kDisableWebRtcEncryption,
3153 }; 3157 };
3154 to_command_line->CopySwitchesFrom(from_command_line, 3158 to_command_line->CopySwitchesFrom(from_command_line,
3155 kWebRtcDevSwitchNames, 3159 kWebRtcDevSwitchNames,
3156 arraysize(kWebRtcDevSwitchNames)); 3160 arraysize(kWebRtcDevSwitchNames));
3157 } 3161 }
3158 } 3162 }
3159 #endif // defined(ENABLE_WEBRTC) 3163 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698