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

Unified Diff: chrome/browser/android/offline_pages/offline_page_info_handler.h

Issue 2310363002: Persist offline page info in a navigation entry if needed (Closed)
Patch Set: Add extended info support Created 4 years, 3 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_info_handler.h
diff --git a/chrome/browser/android/offline_pages/offline_page_info_handler.h b/chrome/browser/android/offline_pages/offline_page_info_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..9b768aa374836c9e48ed543f7f6db1fda4ae725b
--- /dev/null
+++ b/chrome/browser/android/offline_pages/offline_page_info_handler.h
@@ -0,0 +1,33 @@
+// 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.
+
+#ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_INFO_HANDLER_H_
+#define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_INFO_HANDLER_H_
+
+#include "components/sessions/core/serialized_navigation_driver.h"
+
+namespace offline_pages {
+
+// Used to parse the extra request header string that defines offline page
+// loading behaviors.
+//
+class OfflinePageInfoHandler :
+ public sessions::SerializedNavigationDriver::ExtendedInfoHandler {
+ public:
+ // Creates and registers a single instance.
+ static void Register();
+
+ OfflinePageInfoHandler();
+ ~OfflinePageInfoHandler() override;
+
+ // ExtendedInfoHandler:
+ std::string GetExtendedInfo(
+ const content::NavigationEntry& entry) const override;
+ void RestoreExtendedInfo(
+ const std::string& info, content::NavigationEntry* entry) override;
+};
+
+} // namespace offline_pages
+
+#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_INFO_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698