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

Side by Side Diff: base/base_paths_android.cc

Issue 159833003: Add support for GetHomeDir for Mac and Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/base_paths.cc ('k') | base/base_paths_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Defines base::PathProviderAndroid which replaces base::PathProviderPosix for 5 // Defines base::PathProviderAndroid which replaces base::PathProviderPosix for
6 // Android in base/path_service.cc. 6 // Android in base/path_service.cc.
7 7
8 #include <unistd.h> 8 #include <unistd.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 29 matching lines...) Expand all
40 // This const is only used for tests. 40 // This const is only used for tests.
41 return base::android::GetExternalStorageDirectory(result); 41 return base::android::GetExternalStorageDirectory(result);
42 case base::DIR_USER_DESKTOP: 42 case base::DIR_USER_DESKTOP:
43 // Android doesn't support GetUserDesktop. 43 // Android doesn't support GetUserDesktop.
44 NOTIMPLEMENTED(); 44 NOTIMPLEMENTED();
45 return false; 45 return false;
46 case base::DIR_CACHE: 46 case base::DIR_CACHE:
47 return base::android::GetCacheDirectory(result); 47 return base::android::GetCacheDirectory(result);
48 case base::DIR_ANDROID_APP_DATA: 48 case base::DIR_ANDROID_APP_DATA:
49 return base::android::GetDataDirectory(result); 49 return base::android::GetDataDirectory(result);
50 case base::DIR_HOME:
51 *result = GetHomeDir();
52 return true;
53 case base::DIR_ANDROID_EXTERNAL_STORAGE: 50 case base::DIR_ANDROID_EXTERNAL_STORAGE:
54 return base::android::GetExternalStorageDirectory(result); 51 return base::android::GetExternalStorageDirectory(result);
55 default: 52 default:
56 // Note: the path system expects this function to override the default 53 // Note: the path system expects this function to override the default
57 // behavior. So no need to log an error if we don't support a given 54 // behavior. So no need to log an error if we don't support a given
58 // path. The system will just use the default. 55 // path. The system will just use the default.
59 return false; 56 return false;
60 } 57 }
61 } 58 }
62 59
63 } // namespace base 60 } // namespace base
OLDNEW
« no previous file with comments | « base/base_paths.cc ('k') | base/base_paths_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698