summaryrefslogtreecommitdiffstats
path: root/chrome/common/chrome_paths_android.cc
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-16 19:54:46 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-16 19:54:46 +0000
commit9cb3f9b15d3ccfe42a18a9b2c7f069457c774899 (patch)
tree257e4a0b68f1cb5a7bd72ed5b6ea4ed3ec8a9b36 /chrome/common/chrome_paths_android.cc
parent2267078cef35c04e7b2581b669d28f8d71bd54d4 (diff)
downloadchromium_src-9cb3f9b15d3ccfe42a18a9b2c7f069457c774899.zip
chromium_src-9cb3f9b15d3ccfe42a18a9b2c7f069457c774899.tar.gz
chromium_src-9cb3f9b15d3ccfe42a18a9b2c7f069457c774899.tar.bz2
Upstreaming the Android specific chrome_paths
Upstreaming chrome_paths_android.cc. BUG=113487 TEST=None Review URL: http://codereview.chromium.org/9386030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122344 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths_android.cc')
-rw-r--r--chrome/common/chrome_paths_android.cc41
1 files changed, 41 insertions, 0 deletions
diff --git a/chrome/common/chrome_paths_android.cc b/chrome/common/chrome_paths_android.cc
new file mode 100644
index 0000000..38218d0
--- /dev/null
+++ b/chrome/common/chrome_paths_android.cc
@@ -0,0 +1,41 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/chrome_paths_internal.h"
+
+#include "base/file_path.h"
+#include "base/logging.h"
+#include "base/path_service.h"
+
+namespace chrome {
+
+void GetUserCacheDirectory(const FilePath& profile_dir, FilePath* result) {
+ if (!PathService::Get(base::DIR_CACHE, result))
+ *result = profile_dir;
+}
+
+bool GetDefaultUserDataDirectory(FilePath* result) {
+ return PathService::Get(base::DIR_ANDROID_APP_DATA, result);
+}
+
+bool GetUserDocumentsDirectory(FilePath* result) {
+ if (!GetDefaultUserDataDirectory(result))
+ return false;
+ *result = result->Append("Documents");
+ return true;
+}
+
+bool GetUserDownloadsDirectory(FilePath* result) {
+ if (!GetDefaultUserDataDirectory(result))
+ return false;
+ *result = result->Append("Downloads");
+ return true;
+}
+
+bool GetUserDesktop(FilePath* result) {
+ NOTIMPLEMENTED() << "Android doesn't support GetUserDesktop";
+ return false;
+}
+
+} // namespace chrome