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

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

Issue 2233443003: Some initial hookup of offline page request interception (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 dd0f063f6af5ccb9830cd4a2e1d733384018f5d2..2de9d084c065fca932c955deaf727cd12e2813ab 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -126,6 +126,7 @@
#endif
#if defined(OS_ANDROID)
+#include "chrome/browser/android/offline_pages/offline_page_request_handler.h"
#include "content/public/browser/android/content_protocol_handler.h"
#endif // defined(OS_ANDROID)
@@ -1161,6 +1162,15 @@ void ProfileIOData::Init(
profile_params_->new_tab_page_interceptor.release());
}
+ // 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())
+ request_interceptors.push_back(offline_page_interceptor.release());
+#endif
mmenke 2016/08/10 20:20:17 I don't think we want this in incognito mode. Mov
jianli 2016/08/10 21:37:25 Done.
+
std::unique_ptr<net::MultiLogCTVerifier> ct_verifier(
new net::MultiLogCTVerifier());
ct_verifier->AddLogs(io_thread_globals->ct_logs);

Powered by Google App Engine
This is Rietveld 408576698