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

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

Issue 570007: Replace __MSG_some_name__ template within extension css/html files with local... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/resource_message_filter.cc
===================================================================
--- chrome/browser/renderer_host/resource_message_filter.cc (revision 38490)
+++ chrome/browser/renderer_host/resource_message_filter.cc (working copy)
@@ -1349,15 +1349,18 @@
IPC::Message* reply_msg) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE));
- std::string error;
- scoped_ptr<ExtensionMessageBundle> bundle(
- extension_file_util::LoadExtensionMessageBundle(
- extension_path, default_locale, &error));
-
std::map<std::string, std::string> dictionary_map;
- if (bundle.get())
- dictionary_map = *bundle->dictionary();
+ 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();
+ }
+
ViewHostMsg_GetExtensionMessageBundle::WriteReplyParams(
reply_msg, dictionary_map);
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698