summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/localized_error.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-24 02:30:10 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-24 02:30:10 +0000
commit3453068e7facd042b827a011a56ee516409fa07b (patch)
tree59f2f01c8454367a410e28c9f62f7a15535ada7f /chrome/renderer/localized_error.cc
parent2febdcac012afd78e9f42e4d7a74a0cc5ffa06d5 (diff)
downloadchromium_src-3453068e7facd042b827a011a56ee516409fa07b.zip
chromium_src-3453068e7facd042b827a011a56ee516409fa07b.tar.gz
chromium_src-3453068e7facd042b827a011a56ee516409fa07b.tar.bz2
Remove the Google Cache link from local error pages.
BUG=2712 Review URL: http://codereview.chromium.org/8140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/localized_error.cc')
-rw-r--r--chrome/renderer/localized_error.cc28
1 files changed, 4 insertions, 24 deletions
diff --git a/chrome/renderer/localized_error.cc b/chrome/renderer/localized_error.cc
index 366734f..78328cb4 100644
--- a/chrome/renderer/localized_error.cc
+++ b/chrome/renderer/localized_error.cc
@@ -17,19 +17,10 @@
namespace {
-// Helper method for generating the google cache lookup url.
-const std::wstring ConstructGoogleCacheUrl(const std::wstring& url) {
- // TODO(tc): use locale based google domain
- std::wstring cache_url(L"http://www.google.com/search?q=cache:");
- cache_url.append(EscapeQueryParamValueUTF8(url));
- return cache_url;
-}
-
enum NAV_SUGGESTIONS {
SUGGEST_NONE = 0,
SUGGEST_RELOAD = 1 << 0,
- SUGGEST_CACHE = 1 << 1,
- SUGGEST_HOSTNAME = 1 << 2,
+ SUGGEST_HOSTNAME = 1 << 1,
};
struct WebErrorNetErrorMap {
@@ -47,21 +38,21 @@ WebErrorNetErrorMap net_error_options[] = {
IDS_ERRORPAGES_HEADING_NOT_AVAILABLE,
IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE,
IDS_ERRORPAGES_DETAILS_TIMED_OUT,
- SUGGEST_RELOAD | SUGGEST_CACHE,
+ SUGGEST_RELOAD,
},
{net::ERR_CONNECTION_FAILED,
IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
IDS_ERRORPAGES_HEADING_NOT_AVAILABLE,
IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE,
IDS_ERRORPAGES_DETAILS_CONNECT_FAILED,
- SUGGEST_RELOAD | SUGGEST_CACHE,
+ SUGGEST_RELOAD,
},
{net::ERR_NAME_NOT_RESOLVED,
IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
IDS_ERRORPAGES_HEADING_NOT_AVAILABLE,
IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE,
IDS_ERRORPAGES_DETAILS_NAME_NOT_RESOLVED,
- SUGGEST_RELOAD | SUGGEST_CACHE,
+ SUGGEST_RELOAD,
},
{net::ERR_INTERNET_DISCONNECTED,
IDS_ERRORPAGES_TITLE_NOT_AVAILABLE,
@@ -155,15 +146,6 @@ void GetLocalizedErrorValues(const WebError& error,
error_strings->Set(L"suggestionsReload", suggest_reload);
}
- if (options.suggestions & SUGGEST_CACHE) {
- DictionaryValue* suggest_cache = new DictionaryValue;
- suggest_cache->SetString(L"msg",
- l10n_util::GetString(IDS_ERRORPAGES_SUGGESTION_CACHE));
- suggest_cache->SetString(L"cacheUrl",
- ConstructGoogleCacheUrl(failed_url).c_str());
- error_strings->Set(L"suggestionsCache", suggest_cache);
- }
-
if (options.suggestions & SUGGEST_HOSTNAME) {
// Only show the "Go to hostname" suggestion if the failed_url has a path.
const GURL& failed_url = error.GetFailedURL();
@@ -201,5 +183,3 @@ void GetFormRepostErrorValues(const GURL& display_url,
l10n_util::GetString(IDS_ERRORPAGES_HTTP_POST_WARNING));
error_strings->Set(L"summary", summary);
}
-
-