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

Unified Diff: ui/base/resource/resource_bundle.cc

Issue 10151025: Add scale factor tag to data packs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/resource/resource_bundle.h ('k') | ui/base/resource/resource_bundle_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 13aaacf68daa1bdef390d6c9773c616e52e5d8da..4c5a50b466bf287b00fabed6a7c82940ccc43c87 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -89,8 +89,9 @@ bool ResourceBundle::LocaleDataPakExists(const std::string& locale) {
return !GetLocaleFilePath(locale).empty();
}
-void ResourceBundle::AddDataPack(const FilePath& path) {
- scoped_ptr<DataPack> data_pack(new DataPack());
+void ResourceBundle::AddDataPack(const FilePath& path, float scale_factor) {
+ scoped_ptr<DataPack> data_pack(
+ new DataPack(ResourceHandle::kScaleFactor100x));
if (data_pack->Load(path)) {
data_packs_.push_back(data_pack.release());
} else {
@@ -141,7 +142,8 @@ std::string ResourceBundle::LoadLocaleResources(
return std::string();
}
- scoped_ptr<DataPack> data_pack(new DataPack());
+ scoped_ptr<DataPack> data_pack(
+ new DataPack(ResourceHandle::kScaleFactor100x));
if (!data_pack->Load(locale_file_path)) {
UMA_HISTOGRAM_ENUMERATION("ResourceBundle.LoadLocaleResourcesError",
logging::GetLastSystemErrorCode(), 16000);
@@ -155,11 +157,12 @@ std::string ResourceBundle::LoadLocaleResources(
void ResourceBundle::LoadTestResources(const FilePath& path) {
// Use the given resource pak for both common and localized resources.
- scoped_ptr<DataPack> data_pack(new DataPack());
+ scoped_ptr<DataPack> data_pack(
+ new DataPack(ResourceHandle::kScaleFactor100x));
if (data_pack->Load(path))
data_packs_.push_back(data_pack.release());
- data_pack.reset(new DataPack());
+ data_pack.reset(new DataPack(ResourceHandle::kScaleFactor100x));
if (data_pack->Load(path))
locale_resources_data_.reset(data_pack.release());
}
« no previous file with comments | « ui/base/resource/resource_bundle.h ('k') | ui/base/resource/resource_bundle_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698