| OLD | NEW |
| 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 #include "chrome/common/chrome_paths_internal.h" | 5 #include "chrome/common/chrome_paths_internal.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <knownfolders.h> | 8 #include <knownfolders.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #include <shlobj.h> | 10 #include <shlobj.h> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 bool GetDefaultUserDataDirectory(base::FilePath* result) { | 45 bool GetDefaultUserDataDirectory(base::FilePath* result) { |
| 46 if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result)) | 46 if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result)) |
| 47 return false; | 47 return false; |
| 48 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 48 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 49 *result = result->Append(dist->GetInstallSubDir()); | 49 *result = result->Append(dist->GetInstallSubDir()); |
| 50 *result = result->Append(chrome::kUserDataDirname); | 50 *result = result->Append(chrome::kUserDataDirname); |
| 51 return true; | 51 return true; |
| 52 } | 52 } |
| 53 | 53 |
| 54 bool GetDefaultRoamingUserDataDirectory(base::FilePath* result) { |
| 55 if (!PathService::Get(base::DIR_APP_DATA, result)) |
| 56 return false; |
| 57 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 58 *result = result->Append(dist->GetInstallSubDir()); |
| 59 *result = result->Append(chrome::kUserDataDirname); |
| 60 return true; |
| 61 } |
| 62 |
| 54 void GetUserCacheDirectory(const base::FilePath& profile_dir, | 63 void GetUserCacheDirectory(const base::FilePath& profile_dir, |
| 55 base::FilePath* result) { | 64 base::FilePath* result) { |
| 56 // This function does more complicated things on Mac/Linux. | 65 // This function does more complicated things on Mac/Linux. |
| 57 *result = profile_dir; | 66 *result = profile_dir; |
| 58 } | 67 } |
| 59 | 68 |
| 60 bool GetUserDocumentsDirectory(base::FilePath* result) { | 69 bool GetUserDocumentsDirectory(base::FilePath* result) { |
| 61 return GetUserDirectory(CSIDL_MYDOCUMENTS, result); | 70 return GetUserDirectory(CSIDL_MYDOCUMENTS, result); |
| 62 } | 71 } |
| 63 | 72 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 if (process_type == switches::kNaClBrokerProcess || | 122 if (process_type == switches::kNaClBrokerProcess || |
| 114 process_type == switches::kNaClLoaderProcess) { | 123 process_type == switches::kNaClLoaderProcess) { |
| 115 return true; | 124 return true; |
| 116 } | 125 } |
| 117 #endif | 126 #endif |
| 118 | 127 |
| 119 return false; | 128 return false; |
| 120 } | 129 } |
| 121 | 130 |
| 122 } // namespace chrome | 131 } // namespace chrome |
| OLD | NEW |