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. 4 5#include "chrome/common/chrome_paths_internal.h" 6 7#include "base/files/file_path.h" 8#include "base/logging.h" 9#include "base/path_service.h" 10 11namespace chrome { 12 13void GetUserCacheDirectory(const base::FilePath& profile_dir, 14 base::FilePath* result) { 15 if (!PathService::Get(base::DIR_CACHE, result)) 16 *result = profile_dir; 17} 18 19bool GetDefaultUserDataDirectory(base::FilePath* result) { 20 return PathService::Get(base::DIR_ANDROID_APP_DATA, result); 21} 22 23bool GetUserDocumentsDirectory(base::FilePath* result) { 24 if (!GetDefaultUserDataDirectory(result)) 25 return false; 26 *result = result->Append("Documents"); 27 return true; 28} 29 30bool GetUserDownloadsDirectory(base::FilePath* result) { 31 if (!GetDefaultUserDataDirectory(result)) 32 return false; 33 *result = result->Append("Downloads"); 34 return true; 35} 36 37bool GetUserMusicDirectory(base::FilePath* result) { 38 NOTIMPLEMENTED(); 39 return false; 40} 41 42bool GetUserPicturesDirectory(base::FilePath* result) { 43 NOTIMPLEMENTED(); 44 return false; 45} 46 47bool GetUserVideosDirectory(base::FilePath* result) { 48 NOTIMPLEMENTED(); 49 return false; 50} 51 52bool ProcessNeedsProfileDir(const std::string& process_type) { 53 return true; 54} 55 56} // namespace chrome 57