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

Unified Diff: ui/base/ui_base_paths.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/ui_base_paths.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ui_base_paths.cc
diff --git a/ui/base/ui_base_paths.cc b/ui/base/ui_base_paths.cc
index fc07a78e12730041f26d11fe4d43265120753ac4..0f1e1c993393816206730d55fa0a6d672ff05939 100644
--- a/ui/base/ui_base_paths.cc
+++ b/ui/base/ui_base_paths.cc
@@ -10,6 +10,10 @@
#include "base/logging.h"
#include "base/path_service.h"
+#if defined(OS_ANDROID)
+#include "base/android/path_utils.h"
+#endif
+
namespace ui {
bool PathProvider(int key, FilePath* result) {
@@ -27,6 +31,9 @@ bool PathProvider(int key, FilePath* result) {
// App dir.
cur = cur.DirName();
cur = cur.Append(FILE_PATH_LITERAL("Resources"));
+#elif defined(OS_ANDROID)
+ if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur))
+ return false;
#else
cur = cur.Append(FILE_PATH_LITERAL("locales"));
#endif
@@ -44,6 +51,13 @@ bool PathProvider(int key, FilePath* result) {
if (!file_util::PathExists(cur)) // we don't want to create this
return false;
break;
+#if defined(OS_ANDROID)
+ case ui::DIR_RESOURCE_PAKS_ANDROID:
+ if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &cur))
+ return false;
+ cur = cur.Append(FILE_PATH_LITERAL("paks"));
+ break;
+#endif
default:
return false;
}
« no previous file with comments | « ui/base/ui_base_paths.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698