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

Unified Diff: chrome/browser/android/offline_pages/offline_page_protocol_handler.cc

Issue 2002433002: Handle online and offline redirects via interceptor and offline scheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/android/offline_pages/offline_page_protocol_handler.cc
diff --git a/chrome/browser/android/offline_pages/offline_page_protocol_handler.cc b/chrome/browser/android/offline_pages/offline_page_protocol_handler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3d941a6b9a84b5838ccba27bd32350eb3bbd5af4
--- /dev/null
+++ b/chrome/browser/android/offline_pages/offline_page_protocol_handler.cc
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/android/offline_pages/offline_page_protocol_handler.h"
+
+#include "chrome/browser/android/offline_pages/offline_page_request_offline_job.h"
+
+namespace offline_pages {
+
+OfflinePageProtocolHandler::OfflinePageProtocolHandler(void* profile_id)
+ : profile_id_(profile_id),
+ weak_ptr_factory_(this) {
+}
+
+OfflinePageProtocolHandler::~OfflinePageProtocolHandler() {
+}
+
+net::URLRequestJob* OfflinePageProtocolHandler::MaybeCreateJob(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const {
+ return new OfflinePageRequestOfflineJob(
+ profile_id_, request, network_delegate);
+}
+
+} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698