| 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::GetMetroModule() ? current : !current) | 32 if (base::win::IsMetroProcess() ? current : !current) |
| 33 *result = result->Append(kMetroChromeUserDataSubDir); | 33 *result = result->Append(kMetroChromeUserDataSubDir); |
| 34 *result = result->Append(chrome::kUserDataDirname); | 34 *result = result->Append(chrome::kUserDataDirname); |
| 35 return true; | 35 return true; |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace | 38 } // namespace |
| 39 | 39 |
| 40 bool GetDefaultUserDataDirectory(FilePath* result) { | 40 bool GetDefaultUserDataDirectory(FilePath* result) { |
| 41 return GetUserDataDirectoryForEnvironment(true, result); | 41 return GetUserDataDirectoryForEnvironment(true, result); |
| 42 } | 42 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // investigated and fixed if possible. | 132 // investigated and fixed if possible. |
| 133 return process_type.empty() || | 133 return process_type.empty() || |
| 134 process_type == switches::kServiceProcess || | 134 process_type == switches::kServiceProcess || |
| 135 process_type == switches::kGpuProcess || | 135 process_type == switches::kGpuProcess || |
| 136 process_type == switches::kNaClBrokerProcess || | 136 process_type == switches::kNaClBrokerProcess || |
| 137 process_type == switches::kNaClLoaderProcess || | 137 process_type == switches::kNaClLoaderProcess || |
| 138 process_type == switches::kPpapiBrokerProcess; | 138 process_type == switches::kPpapiBrokerProcess; |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace chrome | 141 } // namespace chrome |
| OLD | NEW |