| Index: components/error_page/renderer/net_error_helper_core.h
|
| diff --git a/components/error_page/renderer/net_error_helper_core.h b/components/error_page/renderer/net_error_helper_core.h
|
| index c4031b3b234a704a385714cbfbce5ee5329b7aa3..1dc97e6c4073f51b84493035fdcfed380c127ac6 100644
|
| --- a/components/error_page/renderer/net_error_helper_core.h
|
| +++ b/components/error_page/renderer/net_error_helper_core.h
|
| @@ -13,7 +13,6 @@
|
| #include "base/timer/timer.h"
|
| #include "build/build_config.h"
|
| #include "components/error_page/common/net_error_info.h"
|
| -#include "components/error_page/common/offline_page_types.h"
|
| #include "url/gurl.h"
|
|
|
| namespace base {
|
| @@ -53,7 +52,6 @@ class NetErrorHelperCore {
|
| SHOW_CACHED_COPY_BUTTON, // "Google cached copy" button label experiment.
|
| DIAGNOSE_ERROR,
|
| SHOW_OFFLINE_PAGES_BUTTON, // "Offline pages" experiment.
|
| - SHOW_OFFLINE_COPY_BUTTON, // "Offline pages" experiment.
|
| };
|
|
|
| // The Delegate handles all interaction with the RenderView, WebFrame, and
|
| @@ -65,13 +63,12 @@ class NetErrorHelperCore {
|
| const blink::WebURLError& error,
|
| bool is_failed_post,
|
| bool can_show_network_diagnostics_dialog,
|
| - OfflinePageStatus offline_page_status,
|
| + bool has_offline_pages,
|
| scoped_ptr<ErrorPageParams> params,
|
| bool* reload_button_shown,
|
| bool* show_saved_copy_button_shown,
|
| bool* show_cached_copy_button_shown,
|
| bool* show_offline_pages_button_shown,
|
| - bool* show_offline_copy_button_shown,
|
| std::string* html) const = 0;
|
|
|
| // Loads the given HTML in the frame for use as an error page.
|
| @@ -88,7 +85,7 @@ class NetErrorHelperCore {
|
| virtual void UpdateErrorPage(const blink::WebURLError& error,
|
| bool is_failed_post,
|
| bool can_show_network_diagnostics_dialog,
|
| - OfflinePageStatus offline_page_status) = 0;
|
| + bool has_offline_pages) = 0;
|
|
|
| // Fetches an error page and calls into OnErrorPageFetched when done. Any
|
| // previous fetch must either be canceled or finished before calling. Can't
|
| @@ -119,11 +116,6 @@ class NetErrorHelperCore {
|
| // Shows all the offline pages that were saved in storage.
|
| virtual void ShowOfflinePages() = 0;
|
|
|
| - // Loads the offline copy of the page that was saved in storage.
|
| - // Note that this is different from the saved copy in the cache as in
|
| - // LoadPageFromCache.
|
| - virtual void LoadOfflineCopy(const GURL& page_url) = 0;
|
| -
|
| protected:
|
| virtual ~Delegate() {}
|
| };
|
| @@ -188,9 +180,9 @@ class NetErrorHelperCore {
|
| const std::string& api_key,
|
| const GURL& search_url);
|
|
|
| - // Notifies |this| that information about the presence of an offline version
|
| - // of the page has been received.
|
| - void OnSetOfflinePageInfo(OfflinePageStatus offline_page_status);
|
| + // Notifies |this| that information about whether offline pages exist has been
|
| + // received.
|
| + void OnSetHasOfflinePages(bool has_offline_pages);
|
|
|
| // Notifies |this| that the network's online status changed.
|
| // Handler for NetworkStateChanged notification from the browser process. If
|
| @@ -246,7 +238,7 @@ class NetErrorHelperCore {
|
| void AutoReloadTimerFired();
|
| void PauseAutoReloadTimer();
|
|
|
| - OfflinePageStatus GetOfflinePageStatus() const;
|
| + bool HasOfflinePages() const;
|
|
|
| static bool IsReloadableError(const ErrorPageInfo& info);
|
|
|
| @@ -301,9 +293,9 @@ class NetErrorHelperCore {
|
| int auto_reload_count_;
|
|
|
| #if defined(OS_ANDROID)
|
| - // Status of offline pages. This is used to decide if offline related button
|
| - // will be shown in certain error page.
|
| - OfflinePageStatus offline_page_status_;
|
| + // Whether offline pages exist. This is used to decide if offline related
|
| + // button will be shown in certain error page.
|
| + bool has_offline_pages_;
|
| #endif // defined(OS_ANDROID)
|
|
|
| // This value is set only when a navigation has been initiated from
|
|
|