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 // This file defines specific implementation of BrowserDistribution class for | 5 // This file defines specific implementation of BrowserDistribution class for |
6 // Google Chrome. | 6 // Google Chrome. |
7 | 7 |
8 #include "chrome/installer/util/google_chrome_distribution.h" | 8 #include "chrome/installer/util/google_chrome_distribution.h" |
9 | 9 |
10 #include <windows.h> | 10 #include <windows.h> |
11 #include <msi.h> | 11 #include <msi.h> |
12 #include <shellapi.h> | 12 #include <shellapi.h> |
13 | 13 |
| 14 #include <utility> |
| 15 |
14 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
15 #include "base/path_service.h" | 17 #include "base/path_service.h" |
16 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
17 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
18 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
19 #include "base/win/registry.h" | 21 #include "base/win/registry.h" |
20 #include "base/win/windows_version.h" | 22 #include "base/win/windows_version.h" |
21 #include "chrome/common/chrome_icon_resources_win.h" | 23 #include "chrome/common/chrome_icon_resources_win.h" |
22 #include "chrome/common/chrome_paths_internal.h" | 24 #include "chrome/common/chrome_paths_internal.h" |
23 #include "chrome/installer/util/app_registration_data.h" | 25 #include "chrome/installer/util/app_registration_data.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 } // namespace | 96 } // namespace |
95 | 97 |
96 GoogleChromeDistribution::GoogleChromeDistribution() | 98 GoogleChromeDistribution::GoogleChromeDistribution() |
97 : BrowserDistribution(CHROME_BROWSER, | 99 : BrowserDistribution(CHROME_BROWSER, |
98 scoped_ptr<AppRegistrationData>( | 100 scoped_ptr<AppRegistrationData>( |
99 new UpdatingAppRegistrationData(kChromeGuid))) { | 101 new UpdatingAppRegistrationData(kChromeGuid))) { |
100 } | 102 } |
101 | 103 |
102 GoogleChromeDistribution::GoogleChromeDistribution( | 104 GoogleChromeDistribution::GoogleChromeDistribution( |
103 scoped_ptr<AppRegistrationData> app_reg_data) | 105 scoped_ptr<AppRegistrationData> app_reg_data) |
104 : BrowserDistribution(CHROME_BROWSER, app_reg_data.Pass()) { | 106 : BrowserDistribution(CHROME_BROWSER, std::move(app_reg_data)) {} |
105 } | |
106 | 107 |
107 void GoogleChromeDistribution::DoPostUninstallOperations( | 108 void GoogleChromeDistribution::DoPostUninstallOperations( |
108 const Version& version, | 109 const Version& version, |
109 const base::FilePath& local_data_path, | 110 const base::FilePath& local_data_path, |
110 const base::string16& distribution_data) { | 111 const base::string16& distribution_data) { |
111 // Send the Chrome version and OS version as params to the form. | 112 // Send the Chrome version and OS version as params to the form. |
112 // It would be nice to send the locale, too, but I don't see an | 113 // It would be nice to send the locale, too, but I don't see an |
113 // easy way to get that in the existing code. It's something we | 114 // easy way to get that in the existing code. It's something we |
114 // can add later, if needed. | 115 // can add later, if needed. |
115 // We depend on installed_version.GetString() not having spaces or other | 116 // We depend on installed_version.GetString() not having spaces or other |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 GetAppGuid()); | 291 GetAppGuid()); |
291 } | 292 } |
292 | 293 |
293 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { | 294 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { |
294 return true; | 295 return true; |
295 } | 296 } |
296 | 297 |
297 bool GoogleChromeDistribution::HasUserExperiments() { | 298 bool GoogleChromeDistribution::HasUserExperiments() { |
298 return true; | 299 return true; |
299 } | 300 } |
OLD | NEW |