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

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

Issue 10270023: Add new ResourceBundle::Delegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
Index: ui/base/resource/resource_bundle_android.cc
===================================================================
--- ui/base/resource/resource_bundle_android.cc (revision 134688)
+++ ui/base/resource/resource_bundle_android.cc (working copy)
@@ -17,9 +17,11 @@
FilePath GetResourcesPakFilePath(const std::string& pak_name) {
FilePath path;
- PathService::Get(base::DIR_ANDROID_APP_DATA, &path);
- DCHECK(!path.empty());
- return path.AppendASCII("paks").AppendASCII(pak_name.c_str());
+ if (PathService::Get(base::DIR_ANDROID_APP_DATA, &path))
+ return path.AppendASCII("paks").AppendASCII(pak_name.c_str());
+
+ // Return just the name of the pack file.
+ return FilePath(pak_name.c_str());
}
} // namespace
@@ -35,7 +37,8 @@
ResourceHandle::kScaleFactor100x);
}
-gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
+const gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id,
+ ImageRTL rtl) {
// Flipped image is not used on Android.
DCHECK_EQ(rtl, RTL_DISABLED);
return GetImageNamed(resource_id);

Powered by Google App Engine
This is Rietveld 408576698