Chromium Code Reviews| Index: chrome/installer/util/helper.cc |
| diff --git a/chrome/installer/util/helper.cc b/chrome/installer/util/helper.cc |
| index 82f8a36be64db68df4a15c1a7420e47b6d6764cd..dde19daef829083b0a68f1810bb99464acb70eae 100644 |
| --- a/chrome/installer/util/helper.cc |
| +++ b/chrome/installer/util/helper.cc |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -7,6 +7,8 @@ |
| #include "base/logging.h" |
| #include "base/file_path.h" |
| #include "base/path_service.h" |
| +#include "base/win/windows_version.h" |
| +#include "chrome/common/chrome_constants.h" |
| #include "chrome/installer/util/browser_distribution.h" |
| #include "chrome/installer/util/installation_state.h" |
| #include "chrome/installer/util/install_util.h" |
| @@ -40,8 +42,21 @@ FilePath GetChromeInstallPath(bool system_install, BrowserDistribution* dist) { |
| return GetChromeInstallBasePath(system_install, dist, kInstallBinaryDir); |
| } |
| -FilePath GetChromeUserDataPath(BrowserDistribution* dist) { |
| - return GetChromeInstallBasePath(false, dist, kInstallUserDataDir); |
| +void GetChromeUserDataPaths(BrowserDistribution* dist, |
| + std::vector<FilePath>* paths) { |
| + const bool has_metro_data = dist->CanSetAsDefault() && |
| + base::win::GetVersion() >= base::win::VERSION_WIN8; |
| + FilePath data_dir(GetChromeInstallBasePath(false, dist, kInstallUserDataDir)); |
| + if (data_dir.empty()) { |
| + paths->clear(); |
| + } else { |
| + paths->resize(has_metro_data ? 2 : 1); |
| + (*paths)[0] = data_dir; |
| + if (has_metro_data) { |
| + (*paths)[1] = data_dir.DirName().Append( |
| + chrome::kMetroChromeUserDataSubDir); |
|
gab
2012/08/03 17:54:20
We do not want installer_util to depend on chrome
grt (UTC plus 2)
2012/08/03 20:18:37
not done. this is in common_constants, which inst
gab
2012/08/03 21:58:57
Ah I see, chrome common constants != chrome :).
T
|
| + } |
| + } |
| } |
| BrowserDistribution* GetBinariesDistribution(bool system_install) { |