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 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Gets the default user data directory for either the current environment | 25 // Gets the default user data directory for either the current environment |
26 // (desktop or metro) or for the other one (metro or desktop). | 26 // (desktop or metro) or for the other one (metro or desktop). |
27 bool GetUserDataDirectoryForEnvironment(bool current, FilePath* result) { | 27 bool GetUserDataDirectoryForEnvironment(bool current, FilePath* result) { |
28 if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result)) | 28 if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result)) |
29 return false; | 29 return false; |
30 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 30 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
31 *result = result->Append(dist->GetInstallSubDir()); | 31 *result = result->Append(dist->GetInstallSubDir()); |
32 if (base::win::IsMetroProcess() ? current : !current) | |
33 *result = result->Append(kMetroChromeUserDataSubDir); | |
34 *result = result->Append(chrome::kUserDataDirname); | 32 *result = result->Append(chrome::kUserDataDirname); |
35 return true; | 33 return true; |
36 } | 34 } |
37 | 35 |
38 } // namespace | 36 } // namespace |
39 | 37 |
40 bool GetDefaultUserDataDirectory(FilePath* result) { | 38 bool GetDefaultUserDataDirectory(FilePath* result) { |
41 return GetUserDataDirectoryForEnvironment(true, result); | 39 return GetUserDataDirectoryForEnvironment(true, result); |
42 } | 40 } |
43 | 41 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // investigated and fixed if possible. | 130 // investigated and fixed if possible. |
133 return process_type.empty() || | 131 return process_type.empty() || |
134 process_type == switches::kServiceProcess || | 132 process_type == switches::kServiceProcess || |
135 process_type == switches::kGpuProcess || | 133 process_type == switches::kGpuProcess || |
136 process_type == switches::kNaClBrokerProcess || | 134 process_type == switches::kNaClBrokerProcess || |
137 process_type == switches::kNaClLoaderProcess || | 135 process_type == switches::kNaClLoaderProcess || |
138 process_type == switches::kPpapiBrokerProcess; | 136 process_type == switches::kPpapiBrokerProcess; |
139 } | 137 } |
140 | 138 |
141 } // namespace chrome | 139 } // namespace chrome |
OLD | NEW |