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

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

Issue 660173002: Type conversion fixes, ui/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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/data_pack.cc ('k') | ui/base/webui/web_ui_util.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 37f6c773a43ebe489772aad7f3a4b9ed16fc1a54..9f693b8a5d8b12299e1e723aa18405a84c1b3207 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -462,7 +462,8 @@ base::StringPiece ResourceBundle::GetRawDataResourceForScale(
if (scale_factor != ui::SCALE_FACTOR_100P) {
for (size_t i = 0; i < data_packs_.size(); i++) {
if (data_packs_[i]->GetScaleFactor() == scale_factor &&
- data_packs_[i]->GetStringPiece(resource_id, &data))
+ data_packs_[i]->GetStringPiece(static_cast<uint16>(resource_id),
+ &data))
return data;
}
}
@@ -470,7 +471,8 @@ base::StringPiece ResourceBundle::GetRawDataResourceForScale(
if ((data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_100P ||
data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_200P ||
data_packs_[i]->GetScaleFactor() == ui::SCALE_FACTOR_NONE) &&
- data_packs_[i]->GetStringPiece(resource_id, &data))
+ data_packs_[i]->GetStringPiece(static_cast<uint16>(resource_id),
+ &data))
return data;
}
@@ -499,7 +501,8 @@ base::string16 ResourceBundle::GetLocalizedString(int message_id) {
}
base::StringPiece data;
- if (!locale_resources_data_->GetStringPiece(message_id, &data)) {
+ if (!locale_resources_data_->GetStringPiece(static_cast<uint16>(message_id),
+ &data)) {
// Fall back on the main data pack (shouldn't be any strings here except in
// unittests).
data = GetRawDataResource(message_id);
@@ -763,7 +766,7 @@ bool ResourceBundle::LoadBitmap(const ResourceHandle& data_handle,
bool* fell_back_to_1x) const {
DCHECK(fell_back_to_1x);
scoped_refptr<base::RefCountedMemory> memory(
- data_handle.GetStaticMemory(resource_id));
+ data_handle.GetStaticMemory(static_cast<uint16>(resource_id)));
if (!memory.get())
return false;
« no previous file with comments | « ui/base/resource/data_pack.cc ('k') | ui/base/webui/web_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698