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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 845973005: [New Tab Page] Change the mechanism to intercept online NTP errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fix Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 271fa2c40abb48fed310d9b1381e1ce73545fe49..43b62b22a838608748d186b6f0030cd7b96ae215 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -48,6 +48,8 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/signin/signin_names_io_thread.h"
+#include "chrome/browser/ui/search/new_tab_page_interceptor_service.h"
+#include "chrome/browser/ui/search/new_tab_page_interceptor_service_factory.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -398,6 +400,13 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
params->protocol_handler_interceptor =
protocol_handler_registry->CreateJobInterceptorFactory();
+ NewTabPageInterceptorService* new_tab_interceptor_service =
+ NewTabPageInterceptorServiceFactory::GetForProfile(profile);
+ if (new_tab_interceptor_service) {
+ params->new_tab_page_interceptor =
+ new_tab_interceptor_service->CreateInterceptor();
+ }
+
params->proxy_config_service
.reset(ProxyServiceFactory::CreateProxyConfigService(
profile->GetProxyConfigTracker()));

Powered by Google App Engine
This is Rietveld 408576698