summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/localized_error.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-26 18:45:21 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-26 18:45:21 +0000
commit2a521c50ab1cb527625a69f3130a421a01f84621 (patch)
tree68153622a64534e8400c122575ab4232b6de2725 /chrome/renderer/localized_error.cc
parent43792ceca73af6e06c079db4f034b28a4402989d (diff)
downloadchromium_src-2a521c50ab1cb527625a69f3130a421a01f84621.zip
chromium_src-2a521c50ab1cb527625a69f3130a421a01f84621.tar.gz
chromium_src-2a521c50ab1cb527625a69f3130a421a01f84621.tar.bz2
Refactor away all the duplicate extension data structures in
renderer processes by sending the full extension object instead. ExtensionRendererInfo remains, but it is now just a convenience wrapper around a map of Extension objects. This allows us to reuse all the helper methods on Extension, ExtensionIconSet, ExtensionExtent, etc without duplicating them in the renderer. Also changed broadcasts to renderers to send only changed information, not entire set of extension data again. BUG=70516 Review URL: http://codereview.chromium.org/6242010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72654 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/localized_error.cc')
-rw-r--r--chrome/renderer/localized_error.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/renderer/localized_error.cc b/chrome/renderer/localized_error.cc
index 820f6a0..7b4ae31 100644
--- a/chrome/renderer/localized_error.cc
+++ b/chrome/renderer/localized_error.cc
@@ -516,10 +516,11 @@ void LocalizedError::GetFormRepostStrings(const GURL& display_url,
error_strings->Set("summary", summary);
}
-void LocalizedError::GetAppErrorStrings(const WebURLError& error,
- const GURL& display_url,
- const ExtensionRendererInfo* app,
- DictionaryValue* error_strings) {
+void LocalizedError::GetAppErrorStrings(
+ const WebURLError& error,
+ const GURL& display_url,
+ const Extension* app,
+ DictionaryValue* error_strings) {
DCHECK(app);
bool rtl = LocaleIsRTL();
@@ -534,7 +535,9 @@ void LocalizedError::GetAppErrorStrings(const WebURLError& error,
failed_url.c_str()));
error_strings->SetString("title", app->name());
- error_strings->SetString("icon", app->icon_url().spec());
+ error_strings->SetString("icon",
+ app->GetIconURL(Extension::EXTENSION_ICON_LARGE,
+ ExtensionIconSet::MATCH_SMALLER).spec());
error_strings->SetString("name", app->name());
error_strings->SetString("msg",
l10n_util::GetStringUTF16(IDS_ERRORPAGES_APP_WARNING));