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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2521823008: Migrate chrome_net_benchmarking_message_filter to mojo (Closed)
Patch Set: change ClearPredictorCache to run on UI thread via PostTask Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 1c7ce3b7eb720ea5a87af2bd1158e39a2da07c23..3da18932f3b33148fb9de1599396cb6bf3bcd0f2 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -41,7 +41,7 @@
#include "chrome/browser/budget_service/budget_service_impl.h"
#include "chrome/browser/character_encoding.h"
#include "chrome/browser/chrome_content_browser_client_parts.h"
-#include "chrome/browser/chrome_net_benchmarking_message_filter.h"
+#include "chrome/browser/chrome_net_benchmarking_impl.h"
#include "chrome/browser/chrome_quota_permission_context.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
@@ -1030,9 +1030,6 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
content::RenderProcessHost* host) {
int id = host->GetID();
Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
- net::URLRequestContextGetter* context =
- host->GetStoragePartition()->GetURLRequestContext();
-
host->AddFilter(new ChromeRenderMessageFilter(
id, profile, host->GetStoragePartition()->GetServiceWorkerContext()));
#if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -1047,7 +1044,6 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
host->AddFilter(new SpellCheckMessageFilterPlatform(id));
#endif
- host->AddFilter(new ChromeNetBenchmarkingMessageFilter(profile, context));
host->AddFilter(new prerender::PrerenderMessageFilter(id, profile));
host->AddFilter(new TtsMessageFilter(host->GetBrowserContext()));
#if BUILDFLAG(ENABLE_WEBRTC)
@@ -1068,6 +1064,8 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
#endif
#if !defined(DISABLE_NACL)
+ net::URLRequestContextGetter* context =
+ host->GetStoragePartition()->GetURLRequestContext();
host->AddFilter(new nacl::NaClHostMessageFilter(
id, profile->IsOffTheRecord(),
profile->GetPath(),
@@ -2929,6 +2927,12 @@ void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner =
content::BrowserThread::GetTaskRunnerForThread(
content::BrowserThread::UI);
+ Profile* profile =
+ Profile::FromBrowserContext(render_process_host->GetBrowserContext());
+ net::URLRequestContextGetter* context =
+ render_process_host->GetStoragePartition()->GetURLRequestContext();
+ registry->AddInterface(
+ base::Bind(&ChromeNetBenchmarkingImpl::Create, profile, context));
registry->AddInterface(
base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create),
ui_task_runner);

Powered by Google App Engine
This is Rietveld 408576698