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

Unified Diff: remoting/base/resources.cc

Issue 11087059: Add common_resources.grd for non-localizeable chromoting resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « no previous file | remoting/base/resources_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/resources.cc
diff --git a/remoting/base/resources.cc b/remoting/base/resources.cc
index cd7e4869957cadd40de619b0a58bd23fd4bb97c8..32e62c4240cb4ae435303f52873e07acaafa3221 100644
--- a/remoting/base/resources.cc
+++ b/remoting/base/resources.cc
@@ -11,16 +11,24 @@
namespace remoting {
+namespace {
+const char kLocaleResourcesDirName[] = "remoting_locales";
+const char kCommonResourcesFileName[] = "chrome_remote_desktop.pak";
+} // namespace
+
// Loads chromoting resources.
bool LoadResources(const std::string& locale) {
FilePath path;
if (!PathService::Get(base::DIR_MODULE, &path))
return false;
- path = path.Append(FILE_PATH_LITERAL("remoting_locales"));
- PathService::Override(ui::DIR_LOCALES, path);
+ PathService::Override(ui::DIR_LOCALES,
+ path.AppendASCII(kLocaleResourcesDirName));
ui::ResourceBundle::InitSharedInstanceLocaleOnly(locale, NULL);
+ ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
+ path.AppendASCII(kCommonResourcesFileName), ui::SCALE_FACTOR_100P);
+
return true;
}
« no previous file with comments | « no previous file | remoting/base/resources_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698