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

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

Issue 2643183002: Convert ChromeViewHostMsg_UpdatedCacheStats to use mojo. (Closed)
Patch Set: Convert ChromeViewHostMsg_UpdatedCacheStats to use mojo. Created 3 years, 7 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 "base/threading/thread_task_runner_handle.h" 30 #include "base/threading/thread_task_runner_handle.h"
31 #include "build/build_config.h" 31 #include "build/build_config.h"
32 #include "chrome/browser/after_startup_task_utils.h" 32 #include "chrome/browser/after_startup_task_utils.h"
33 #include "chrome/browser/apps/app_url_redirector.h" 33 #include "chrome/browser/apps/app_url_redirector.h"
34 #include "chrome/browser/browser_about_handler.h" 34 #include "chrome/browser/browser_about_handler.h"
35 #include "chrome/browser/browser_process.h" 35 #include "chrome/browser/browser_process.h"
36 #include "chrome/browser/browser_shutdown.h" 36 #include "chrome/browser/browser_shutdown.h"
37 #include "chrome/browser/browsing_data/browsing_data_helper.h" 37 #include "chrome/browser/browsing_data/browsing_data_helper.h"
38 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h" 38 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h"
39 #include "chrome/browser/budget_service/budget_service_impl.h" 39 #include "chrome/browser/budget_service/budget_service_impl.h"
40 #include "chrome/browser/cache_stats_recorder.h"
40 #include "chrome/browser/chrome_content_browser_client_parts.h" 41 #include "chrome/browser/chrome_content_browser_client_parts.h"
41 #include "chrome/browser/chrome_quota_permission_context.h" 42 #include "chrome/browser/chrome_quota_permission_context.h"
42 #include "chrome/browser/content_settings/cookie_settings_factory.h" 43 #include "chrome/browser/content_settings/cookie_settings_factory.h"
43 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 44 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
44 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 45 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
45 #include "chrome/browser/defaults.h" 46 #include "chrome/browser/defaults.h"
46 #include "chrome/browser/download/download_prefs.h" 47 #include "chrome/browser/download/download_prefs.h"
47 #include "chrome/browser/font_family_cache.h" 48 #include "chrome/browser/font_family_cache.h"
48 #include "chrome/browser/media/router/media_router_feature.h" 49 #include "chrome/browser/media/router/media_router_feature.h"
49 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" 50 #include "chrome/browser/media/router/presentation_service_delegate_impl.h"
(...skipping 3030 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY, 3081 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY,
3081 L"\\\\.\\pipe\\chrome.nacl.*"); 3082 L"\\\\.\\pipe\\chrome.nacl.*");
3082 if (result != sandbox::SBOX_ALL_OK) 3083 if (result != sandbox::SBOX_ALL_OK)
3083 return false; 3084 return false;
3084 return result == sandbox::SBOX_ALL_OK; 3085 return result == sandbox::SBOX_ALL_OK;
3085 } 3086 }
3086 #endif // defined(OS_WIN) 3087 #endif // defined(OS_WIN)
3087 3088
3088 void ChromeContentBrowserClient::ExposeInterfacesToRenderer( 3089 void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
3089 service_manager::BinderRegistry* registry, 3090 service_manager::BinderRegistry* registry,
3091 content::AssociatedInterfaceRegistry* associated_registry,
3090 content::RenderProcessHost* render_process_host) { 3092 content::RenderProcessHost* render_process_host) {
3093 // The CacheStatsRecorder is an associated binding, instead of a
3094 // non-associated one, because the sender (in the renderer process) posts the
3095 // message after a time delay, in order to rate limit. The association
3096 // protects against the render process host ID being recycled in that time
3097 // gap between the preparation and the execution of that IPC.
3098 associated_registry->AddInterface(
3099 base::Bind(&CacheStatsRecorder::Create, render_process_host->GetID()));
3100
3091 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner = 3101 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner =
3092 content::BrowserThread::GetTaskRunnerForThread( 3102 content::BrowserThread::GetTaskRunnerForThread(
3093 content::BrowserThread::UI); 3103 content::BrowserThread::UI);
3094 registry->AddInterface( 3104 registry->AddInterface(
3095 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create), 3105 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create),
3096 ui_task_runner); 3106 ui_task_runner);
3097 registry->AddInterface( 3107 registry->AddInterface(
3098 base::Bind(&BudgetServiceImpl::Create, render_process_host->GetID()), 3108 base::Bind(&BudgetServiceImpl::Create, render_process_host->GetID()),
3099 ui_task_runner); 3109 ui_task_runner);
3100 registry->AddInterface( 3110 registry->AddInterface(
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
3615 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3625 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3616 return variations::GetVariationParamValue( 3626 return variations::GetVariationParamValue(
3617 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3627 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3618 } 3628 }
3619 3629
3620 // static 3630 // static
3621 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3631 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3622 const storage::QuotaSettings* settings) { 3632 const storage::QuotaSettings* settings) {
3623 g_default_quota_settings = settings; 3633 g_default_quota_settings = settings;
3624 } 3634 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/chrome_content_browser_manifest_overlay.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698