| OLD | NEW |
| 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 Loading... |
| 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(pref_locale, NULL, false); |
| 36 } | 36 } |
| 37 | 37 |
| 38 return true; | 38 return true; |
| 39 } | 39 } |
| 40 | 40 |
| 41 void UnloadResources() { | 41 void UnloadResources() { |
| 42 ui::ResourceBundle::CleanupSharedInstance(); | 42 ui::ResourceBundle::CleanupSharedInstance(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace remoting | 45 } // namespace remoting |
| OLD | NEW |