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
3 // found in the LICENSE file.
5 #include "chrome/common/chrome_paths_internal.h"
7 #include "base/files/file_path.h"
8 #include "base/logging.h"
9 #include "base/path_service.h"
13 void GetUserCacheDirectory(const base::FilePath
& profile_dir
,
14 base::FilePath
* result
) {
15 if (!PathService::Get(base::DIR_CACHE
, result
))
16 *result
= profile_dir
;
19 bool GetDefaultUserDataDirectory(base::FilePath
* result
) {
20 return PathService::Get(base::DIR_ANDROID_APP_DATA
, result
);
23 bool GetUserDocumentsDirectory(base::FilePath
* result
) {
24 if (!GetDefaultUserDataDirectory(result
))
26 *result
= result
->Append("Documents");
30 bool GetUserDownloadsDirectory(base::FilePath
* result
) {
31 if (!GetDefaultUserDataDirectory(result
))
33 *result
= result
->Append("Downloads");
37 bool GetUserMusicDirectory(base::FilePath
* result
) {
42 bool GetUserPicturesDirectory(base::FilePath
* result
) {
47 bool GetUserVideosDirectory(base::FilePath
* result
) {
52 bool ProcessNeedsProfileDir(const std::string
& process_type
) {