| 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/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 FilePath resources_file_path = GetResourcesFilePath(); | 53 FilePath resources_file_path = GetResourcesFilePath(); |
| 54 CHECK(!resources_file_path.empty()) << "chrome.pak not found"; | 54 CHECK(!resources_file_path.empty()) << "chrome.pak not found"; |
| 55 resources_data_ = LoadResourcesDataPak(resources_file_path); | 55 resources_data_ = LoadResourcesDataPak(resources_file_path); |
| 56 CHECK(resources_data_) << "failed to load chrome.pak"; | 56 CHECK(resources_data_) << "failed to load chrome.pak"; |
| 57 | 57 |
| 58 FilePath large_icon_resources_file_path = GetLargeIconResourcesFilePath(); | 58 FilePath large_icon_resources_file_path = GetLargeIconResourcesFilePath(); |
| 59 if (!large_icon_resources_file_path.empty()) { | 59 if (!large_icon_resources_file_path.empty()) { |
| 60 large_icon_resources_data_ = | 60 large_icon_resources_data_ = |
| 61 LoadResourcesDataPak(large_icon_resources_file_path); | 61 LoadResourcesDataPak(large_icon_resources_file_path); |
| 62 CHECK(large_icon_resources_data_) << | 62 CHECK(large_icon_resources_data_) << |
| 63 "failed to load theme_resources_large.pak"; | 63 "failed to load theme_resources_2x.pak"; |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 | 66 |
| 67 void ResourceBundle::LoadTestResources(const FilePath& path) { | 67 void ResourceBundle::LoadTestResources(const FilePath& path) { |
| 68 DCHECK(!resources_data_) << "resource already loaded"; | 68 DCHECK(!resources_data_) << "resource already loaded"; |
| 69 | 69 |
| 70 // Use the given resource pak for both common and localized resources. | 70 // Use the given resource pak for both common and localized resources. |
| 71 resources_data_ = LoadResourcesDataPak(path); | 71 resources_data_ = LoadResourcesDataPak(path); |
| 72 locale_resources_data_.reset(LoadResourcesDataPak(path)); | 72 locale_resources_data_.reset(LoadResourcesDataPak(path)); |
| 73 } | 73 } |
| 74 | 74 |
| 75 } // namespace ui | 75 } // namespace ui |
| OLD | NEW |