| OLD | NEW |
| 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 "ui/base/resource/resource_bundle.h" | 5 #include "ui/base/resource/resource_bundle.h" |
| 6 | 6 |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "ui/base/ui_base_paths.h" | 8 #include "ui/base/ui_base_paths.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| 11 | 11 |
| 12 FilePath GetResourcesPakFilePath(const std::string& pak_name) { | 12 FilePath GetResourcesPakFilePath(const std::string& pak_name) { |
| 13 FilePath path; | 13 FilePath path; |
| 14 if (PathService::Get(base::DIR_MODULE, &path)) | 14 if (PathService::Get(base::DIR_MODULE, &path)) |
| 15 return path.AppendASCII(pak_name.c_str()); | 15 return path.AppendASCII(pak_name.c_str()); |
| 16 return FilePath(); | 16 return FilePath(); |
| 17 } | 17 } |
| 18 | 18 |
| 19 } // namespace | 19 } // namespace |
| 20 | 20 |
| 21 namespace ui { | 21 namespace ui { |
| 22 | 22 |
| 23 void ResourceBundle::LoadCommonResources() { | 23 void ResourceBundle::LoadCommonResources() { |
| 24 AddDataPack(GetResourcesPakFilePath("chrome.pak")); | 24 AddCommonDataPack("chrome", GetResourcesPakFilePath("chrome.pak")); |
| 25 AddDataPack(GetResourcesPakFilePath("theme_resources_standard.pak")); | 25 AddCommonDataPack("theme_resources_standard", |
| 26 AddDataPack(GetResourcesPakFilePath("ui_resources_standard.pak")); | 26 GetResourcesPakFilePath("theme_resources_standard.pak")); |
| 27 AddCommonDataPack("ui_resources_standard", |
| 28 GetResourcesPakFilePath("ui_resources_standard.pak")); |
| 27 } | 29 } |
| 28 | 30 |
| 29 } // namespace ui | 31 } // namespace ui |
| OLD | NEW |