Chromium Code Reviews| 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 fd8d9a3426d8e72b52e3c7db54751a956903170f..e45b47c8364fc402c43cab3c188e3afa6bee7c42 100644 |
| --- a/chrome/browser/profiles/profile_impl_io_data.cc |
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc |
| @@ -68,6 +68,10 @@ |
| #include "net/url_request/url_request_job_factory_impl.h" |
| #include "storage/browser/quota/special_storage_policy.h" |
| +#if defined(OS_ANDROID) |
| +#include "chrome/browser/android/offline_pages/offline_page_request_handler.h" |
| +#endif // defined(OS_ANDROID) |
| + |
| namespace { |
| net::BackendType ChooseCacheBackendType() { |
| @@ -528,6 +532,15 @@ void ProfileImplIOData::InitializeInternal( |
| new net::URLRequestJobFactoryImpl()); |
| InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); |
| + // Install the Offline Page Interceptor. |
| +#if defined(OS_ANDROID) |
| + std::unique_ptr<net::URLRequestInterceptor> offline_page_interceptor = |
| + offline_pages::OfflinePageRequestHandler::CreateInterceptor( |
| + profile_params->profile); |
| + if (offline_page_interceptor.get()) |
|
Lei Zhang
2016/08/10 22:40:00
You can omit the ".get()"
jianli
2016/08/10 23:04:00
Done.
|
| + request_interceptors.push_back(std::move(offline_page_interceptor)); |
| +#endif |
| + |
| // The data reduction proxy interceptor should be as close to the network |
| // as possible. |
| request_interceptors.insert( |