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

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

Issue 2388253002: Use the previews black list for offline previews (Closed)
Patch Set: mmenke comments 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
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..246b8ff1ce87c870fad6133af99a1abea71dbf78 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -200,26 +200,26 @@ void ProfileImplIOData::Handle::Init(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
std::unique_ptr<data_reduction_proxy::DataStore> store(
new data_reduction_proxy::DataStoreImpl(profile_path));
DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile_)
->InitDataReductionProxySettings(
io_data_->data_reduction_proxy_io_data(), profile_->GetPrefs(),
profile_->GetRequestContext(), std::move(store),
BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
db_task_runner);
- io_data_->set_previews_io_data(base::MakeUnique<previews::PreviewsIOData>(
+ io_data_->previews_io_data_ = base::MakeUnique<previews::PreviewsIOData>(
BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)));
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
PreviewsServiceFactory::GetForProfile(profile_)->set_previews_ui_service(
base::MakeUnique<previews::PreviewsUIService>(
- io_data_->previews_io_data(),
+ io_data_->previews_io_data_.get(),
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), nullptr));
}
content::ResourceContext*
ProfileImplIOData::Handle::GetResourceContext() const {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
LazyInitialize();
return GetResourceContextNoInit();
}
@@ -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_.get())));
#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),
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698