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 GetChromeFrameUserDataDirectory(base::FilePath* result) { | |
55 if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result)) | |
56 return false; | |
57 BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution( | |
58 BrowserDistribution::CHROME_FRAME); | |
59 *result = result->Append(dist->GetInstallSubDir()); | |
60 *result = result->Append(chrome::kUserDataDirname); | |
61 return true; | |
62 } | |
63 | |
64 void GetUserCacheDirectory(const base::FilePath& profile_dir, | 54 void GetUserCacheDirectory(const base::FilePath& profile_dir, |
65 base::FilePath* result) { | 55 base::FilePath* result) { |
66 // This function does more complicated things on Mac/Linux. | 56 // This function does more complicated things on Mac/Linux. |
67 *result = profile_dir; | 57 *result = profile_dir; |
68 } | 58 } |
69 | 59 |
70 bool GetUserDocumentsDirectory(base::FilePath* result) { | 60 bool GetUserDocumentsDirectory(base::FilePath* result) { |
71 return GetUserDirectory(CSIDL_MYDOCUMENTS, result); | 61 return GetUserDirectory(CSIDL_MYDOCUMENTS, result); |
72 } | 62 } |
73 | 63 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 if (process_type == switches::kNaClBrokerProcess || | 113 if (process_type == switches::kNaClBrokerProcess || |
124 process_type == switches::kNaClLoaderProcess) { | 114 process_type == switches::kNaClLoaderProcess) { |
125 return true; | 115 return true; |
126 } | 116 } |
127 #endif | 117 #endif |
128 | 118 |
129 return false; | 119 return false; |
130 } | 120 } |
131 | 121 |
132 } // namespace chrome | 122 } // namespace chrome |
OLD | NEW |