Index: chrome/renderer/net/net_error_helper.cc |
diff --git a/chrome/renderer/net/net_error_helper.cc b/chrome/renderer/net/net_error_helper.cc |
index ba6de473cde32d6620f4e478bf883b5b1cdbd0be..e70def7eda94361bbc2b0c50980dba37b2f8c6d6 100644 |
--- a/chrome/renderer/net/net_error_helper.cc |
+++ b/chrome/renderer/net/net_error_helper.cc |
@@ -96,8 +96,8 @@ void NetErrorHelper::ReloadButtonPressed() { |
core_->ExecuteButtonPress(NetErrorHelperCore::RELOAD_BUTTON); |
} |
-void NetErrorHelper::LoadStaleButtonPressed() { |
- core_->ExecuteButtonPress(NetErrorHelperCore::LOAD_STALE_BUTTON); |
+void NetErrorHelper::ShowSavedCopyButtonPressed() { |
+ core_->ExecuteButtonPress(NetErrorHelperCore::SHOW_SAVED_COPY_BUTTON); |
} |
void NetErrorHelper::MoreButtonPressed() { |
@@ -170,7 +170,7 @@ void NetErrorHelper::GenerateLocalizedErrorPage( |
bool is_failed_post, |
scoped_ptr<ErrorPageParams> params, |
bool* reload_button_shown, |
- bool* load_stale_button_shown, |
+ bool* show_saved_copy_button_shown, |
std::string* error_html) const { |
error_html->clear(); |
@@ -180,21 +180,17 @@ void NetErrorHelper::GenerateLocalizedErrorPage( |
if (template_html.empty()) { |
NOTREACHED() << "unable to load template."; |
} else { |
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
- bool load_stale_cache_enabled = |
- command_line->HasSwitch(switches::kEnableOfflineLoadStaleCache); |
- |
base::DictionaryValue error_strings; |
LocalizedError::GetStrings(error.reason, error.domain.utf8(), |
error.unreachableURL, is_failed_post, |
- (load_stale_cache_enabled && |
- error.staleCopyInCache && !is_failed_post), |
+ error.staleCopyInCache, |
RenderThread::Get()->GetLocale(), |
render_frame()->GetRenderView()-> |
GetAcceptLanguages(), |
params.Pass(), &error_strings); |
*reload_button_shown = error_strings.Get("reloadButton", NULL); |
- *load_stale_button_shown = error_strings.Get("staleLoadButton", NULL); |
+ *show_saved_copy_button_shown = |
+ error_strings.Get("showSavedCopyButton", NULL); |
// "t" is the id of the template's root node. |
*error_html = webui::GetTemplatesHtml(template_html, &error_strings, "t"); |
@@ -216,17 +212,12 @@ void NetErrorHelper::EnablePageHelperFunctions() { |
void NetErrorHelper::UpdateErrorPage(const blink::WebURLError& error, |
bool is_failed_post) { |
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
- bool load_stale_cache_enabled = |
- command_line->HasSwitch(switches::kEnableOfflineLoadStaleCache); |
- |
base::DictionaryValue error_strings; |
LocalizedError::GetStrings(error.reason, |
error.domain.utf8(), |
error.unreachableURL, |
is_failed_post, |
- (load_stale_cache_enabled && |
- error.staleCopyInCache && !is_failed_post), |
+ error.staleCopyInCache, |
RenderThread::Get()->GetLocale(), |
render_frame()->GetRenderView()-> |
GetAcceptLanguages(), |