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

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

Issue 10802065: Android resource PAKs and native lib file path changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and address brettw@ comments. Created 8 years, 4 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.cc ('k') | ui/base/ui_base_paths.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle_android.cc
diff --git a/ui/base/resource/resource_bundle_android.cc b/ui/base/resource/resource_bundle_android.cc
index 141d3af1e97dd4ae2f39a5f689964c029b258b43..575bda389e7425e5d81400b0387480c2773c25f6 100644
--- a/ui/base/resource/resource_bundle_android.cc
+++ b/ui/base/resource/resource_bundle_android.cc
@@ -11,31 +11,19 @@
#include "base/logging.h"
#include "base/path_service.h"
#include "base/stringprintf.h"
+#include "ui/base/ui_base_paths.h"
#include "ui/base/resource/resource_handle.h"
-namespace {
-
-FilePath GetResourcesPakFilePath(const std::string& pak_name) {
- FilePath path;
- 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
-
namespace ui {
void ResourceBundle::LoadCommonResources() {
- AddDataPackFromPath(GetResourcesPakFilePath("chrome.pak"),
+ FilePath path;
+ PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &path);
+ AddDataPackFromPath(path.AppendASCII("chrome.pak"),
SCALE_FACTOR_100P);
- AddDataPackFromPath(GetResourcesPakFilePath(
- "theme_resources_100_percent.pak"),
+ AddDataPackFromPath(path.AppendASCII("theme_resources_100_percent.pak"),
SCALE_FACTOR_100P);
- AddDataPackFromPath(GetResourcesPakFilePath(
- "ui_resources_100_percent.pak"),
+ AddDataPackFromPath(path.AppendASCII("ui_resources_100_percent.pak"),
SCALE_FACTOR_100P);
}
« no previous file with comments | « ui/base/resource/resource_bundle.cc ('k') | ui/base/ui_base_paths.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698