OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/base/resource/resource_bundle.h" | 5 #include "ui/base/resource/resource_bundle.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
12 #include "gfx/font.h" | |
13 #include "ui/base/l10n/l10n_util.h" | 12 #include "ui/base/l10n/l10n_util.h" |
14 #include "ui/base/resource/data_pack.h" | 13 #include "ui/base/resource/data_pack.h" |
| 14 #include "ui/gfx/font.h" |
15 | 15 |
16 namespace ui { | 16 namespace ui { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 DataPack* LoadResourcesDataPak(FilePath resources_pak_path) { | 20 DataPack* LoadResourcesDataPak(FilePath resources_pak_path) { |
21 DataPack* resources_pak = new DataPack; | 21 DataPack* resources_pak = new DataPack; |
22 bool success = resources_pak->Load(resources_pak_path); | 22 bool success = resources_pak->Load(resources_pak_path); |
23 if (!success) { | 23 if (!success) { |
24 delete resources_pak; | 24 delete resources_pak; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // It's possible that there is no locale.pak. | 112 // It's possible that there is no locale.pak. |
113 NOTREACHED(); | 113 NOTREACHED(); |
114 return std::string(); | 114 return std::string(); |
115 } | 115 } |
116 locale_resources_data_ = LoadResourcesDataPak(locale_file_path); | 116 locale_resources_data_ = LoadResourcesDataPak(locale_file_path); |
117 CHECK(locale_resources_data_) << "failed to load locale.pak"; | 117 CHECK(locale_resources_data_) << "failed to load locale.pak"; |
118 return app_locale; | 118 return app_locale; |
119 } | 119 } |
120 | 120 |
121 } // namespace ui | 121 } // namespace ui |
OLD | NEW |