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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/base/resources_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/base/resources.h" 5 #include "remoting/base/resources.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/base/ui_base_paths.h" 10 #include "ui/base/ui_base_paths.h"
11 11
12 namespace remoting { 12 namespace remoting {
13 13
14 namespace {
15 const char kLocaleResourcesDirName[] = "remoting_locales";
16 const char kCommonResourcesFileName[] = "chrome_remote_desktop.pak";
17 } // namespace
18
14 // Loads chromoting resources. 19 // Loads chromoting resources.
15 bool LoadResources(const std::string& locale) { 20 bool LoadResources(const std::string& locale) {
16 FilePath path; 21 FilePath path;
17 if (!PathService::Get(base::DIR_MODULE, &path)) 22 if (!PathService::Get(base::DIR_MODULE, &path))
18 return false; 23 return false;
19 path = path.Append(FILE_PATH_LITERAL("remoting_locales"));
20 PathService::Override(ui::DIR_LOCALES, path);
21 24
25 PathService::Override(ui::DIR_LOCALES,
26 path.AppendASCII(kLocaleResourcesDirName));
22 ui::ResourceBundle::InitSharedInstanceLocaleOnly(locale, NULL); 27 ui::ResourceBundle::InitSharedInstanceLocaleOnly(locale, NULL);
23 28
29 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
30 path.AppendASCII(kCommonResourcesFileName), ui::SCALE_FACTOR_100P);
31
24 return true; 32 return true;
25 } 33 }
26 34
27 } // namespace remoting 35 } // namespace remoting
OLDNEW
« 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