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

Unified Diff: base/path_service.cc

Issue 7184032: Upstream android file related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove android specific shmem method Created 9 years, 6 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: base/path_service.cc
diff --git a/base/path_service.cc b/base/path_service.cc
index e72ae7deff9af69156ab2ed994de7431009ca5d8..21eea9c54c91edc3811dc502071a6f1104caf90a 100644
--- a/base/path_service.cc
+++ b/base/path_service.cc
@@ -23,6 +23,8 @@ namespace base {
bool PathProviderWin(int key, FilePath* result);
#elif defined(OS_MACOSX)
bool PathProviderMac(int key, FilePath* result);
+#elif defined(OS_ANDROID)
+ bool PathProviderAndroid(int key, FilePath* result);
#elif defined(OS_POSIX)
bool PathProviderPosix(int key, FilePath* result);
#endif
@@ -78,7 +80,19 @@ static Provider base_provider_mac = {
};
#endif
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
+#if defined(OS_ANDROID)
+static Provider base_provider_android = {
+ base::PathProviderAndroid,
+ &base_provider,
+#ifndef NDEBUG
+ 0,
+ 0,
+#endif
+ true
+};
+#endif
+
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
static Provider base_provider_posix = {
base::PathProviderPosix,
&base_provider,
@@ -102,6 +116,8 @@ struct PathData {
providers = &base_provider_win;
#elif defined(OS_MACOSX)
providers = &base_provider_mac;
+#elif defined(OS_ANDROID)
+ providers = &base_provider_android;
#elif defined(OS_POSIX)
providers = &base_provider_posix;
#endif

Powered by Google App Engine
This is Rietveld 408576698