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

Unified Diff: chrome/common/localized_error.h

Issue 1442433003: Add "Show saved copy" button in dino page when there's offline copy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some minor fixes Created 5 years, 1 month 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/common/localized_error.h
diff --git a/chrome/common/localized_error.h b/chrome/common/localized_error.h
index 32374818b82ba0f713bf909b4420830919f0f110..8c3f5c7df29d05b12f082e709c0fa98f65eed978 100644
--- a/chrome/common/localized_error.h
+++ b/chrome/common/localized_error.h
@@ -24,8 +24,19 @@ namespace error_page {
struct ErrorPageParams;
}
+enum class OfflinePageStatus {
+ // No offline page exists.
+ NONE,
+ // The offline copy of this page exists.
+ HAS_PAGE_COPY,
+ // The offline copy of this page does not exist, but the offline copies of
+ // other pages exist.
+ HAS_OTHER_COPIES,
+};
+
class LocalizedError {
public:
+
// Fills |error_strings| with values to be used to build an error page used
// on HTTP errors, like 404 or connection reset.
static void GetStrings(int error_code,
@@ -34,7 +45,7 @@ class LocalizedError {
bool is_post,
bool stale_copy_in_cache,
bool can_show_network_diagnostics_dialog,
- bool has_offline_pages,
+ OfflinePageStatus offline_page_status,
const std::string& locale,
const std::string& accept_languages,
scoped_ptr<error_page::ErrorPageParams> params,

Powered by Google App Engine
This is Rietveld 408576698