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

Side by Side Diff: remoting/base/resources_mac.cc

Issue 457103003: Merge ResourceBundle's InitSharedInstanceLocaleOnly with InitSharedInstanceWithLocale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/base/resources_linux.cc ('k') | ui/base/resource/resource_bundle.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <dlfcn.h> 7 #include <dlfcn.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 14 matching lines...) Expand all
25 // Use the plugin's bundle instead of the hosting app bundle. The three 25 // Use the plugin's bundle instead of the hosting app bundle. The three
26 // DirName() calls strip "Contents/MacOS/<binary>" from the path. 26 // DirName() calls strip "Contents/MacOS/<binary>" from the path.
27 base::FilePath path = 27 base::FilePath path =
28 base::FilePath(info.dli_fname).DirName().DirName().DirName(); 28 base::FilePath(info.dli_fname).DirName().DirName().DirName();
29 base::mac::SetOverrideFrameworkBundlePath(path); 29 base::mac::SetOverrideFrameworkBundlePath(path);
30 30
31 // Override the locale with the value from Cocoa. 31 // Override the locale with the value from Cocoa.
32 if (pref_locale.empty()) 32 if (pref_locale.empty())
33 l10n_util::OverrideLocaleWithCocoaLocale(); 33 l10n_util::OverrideLocaleWithCocoaLocale();
34 34
35 ui::ResourceBundle::InitSharedInstanceLocaleOnly(pref_locale, NULL); 35 ui::ResourceBundle::InitSharedInstanceWithLocale(
36 pref_locale, NULL, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES);
36 } 37 }
37 38
38 return true; 39 return true;
39 } 40 }
40 41
41 void UnloadResources() { 42 void UnloadResources() {
42 ui::ResourceBundle::CleanupSharedInstance(); 43 ui::ResourceBundle::CleanupSharedInstance();
43 } 44 }
44 45
45 } // namespace remoting 46 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/resources_linux.cc ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698