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

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

Issue 2388253002: Use the previews black list for offline previews (Closed)
Patch Set: jianli comment Created 4 years, 2 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_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 8bb36096c0e0c00d37ffda4b013bb66bfb96566c..f2b6e4984f50df2bc0a31c602f11dfd5ca37010f 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -542,21 +542,22 @@ void ProfileImplIOData::InitializeInternal(
new net::FtpNetworkLayer(io_thread_globals->host_resolver.get()));
#endif // !defined(DISABLE_FTP_SUPPORT)
std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory(
new net::URLRequestJobFactoryImpl());
InstallProtocolHandlers(main_job_factory.get(), protocol_handlers);
// Install the Offline Page Interceptor.
#if defined(OS_ANDROID)
request_interceptors.push_back(std::unique_ptr<net::URLRequestInterceptor>(
- new offline_pages::OfflinePageRequestInterceptor()));
+ new offline_pages::OfflinePageRequestInterceptor(
+ previews_io_data()->PreviewsDeciderWeakPtr())));
tbansal1 2016/10/06 14:51:04 Is there a guarantee that previews decider will ou
mmenke 2016/10/06 15:02:46 +1 to not exposing a WeakPtr this way. Can we pas
RyanSturm 2016/10/06 15:52:16 The PreviewsIOData is used in more places than jus
#endif
// The data reduction proxy interceptor should be as close to the network
// as possible.
request_interceptors.insert(
request_interceptors.begin(),
data_reduction_proxy_io_data()->CreateInterceptor().release());
main_job_factory_ = SetUpJobFactoryDefaults(
std::move(main_job_factory), std::move(request_interceptors),
std::move(profile_params->protocol_handler_interceptor),

Powered by Google App Engine
This is Rietveld 408576698