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

Unified Diff: chrome/browser/renderer_host/chrome_render_message_filter.cc

Issue 7552028: Injected CSS localization fix (see bug no.) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Cleaned up old unused function. Created 9 years, 4 months 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/browser/renderer_host/chrome_render_message_filter.cc
diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.cc b/chrome/browser/renderer_host/chrome_render_message_filter.cc
index b7c864d0c12d4d41e1344bf07493862cdd71c170..da790aee64b4a4c75f87d1865cf42271940a445a 100644
--- a/chrome/browser/renderer_host/chrome_render_message_filter.cc
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.cc
@@ -327,25 +327,14 @@ void ChromeRenderMessageFilter::OnGetExtensionMessageBundleOnFileThread(
IPC::Message* reply_msg) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- std::map<std::string, std::string> dictionary_map;
- if (!default_locale.empty()) {
- // Touch disk only if extension is localized.
- std::string error;
- scoped_ptr<ExtensionMessageBundle> bundle(
- extension_file_util::LoadExtensionMessageBundle(
- extension_path, default_locale, &error));
-
- if (bundle.get())
- dictionary_map = *bundle->dictionary();
- }
-
- // Add @@extension_id reserved message here, so it's available to
- // non-localized extensions too.
- dictionary_map.insert(
- std::make_pair(ExtensionMessageBundle::kExtensionIdKey, extension_id));
+ scoped_ptr<ExtensionMessageBundle::SubstitutionMap> dictionary_map(
+ extension_file_util::LoadExtensionMessageBundleSubstitutionMap(
+ extension_path,
+ extension_id,
+ default_locale));
ExtensionHostMsg_GetMessageBundle::WriteReplyParams(
- reply_msg, dictionary_map);
+ reply_msg, *dictionary_map);
Send(reply_msg);
}
« no previous file with comments | « chrome/browser/extensions/user_script_master_unittest.cc ('k') | chrome/common/extensions/extension_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698