Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Side by Side Diff: chrome/installer/util/google_chrome_distribution.cc

Issue 1878313003: Convert //chrome/installer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert decompress.cc in mini_installer. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // process runs inside a Job object controlled by the shell. As long as there 90 // process runs inside a Job object controlled by the shell. As long as there
91 // are processes running, the shell will not close the uninstall applet. WMI 91 // are processes running, the shell will not close the uninstall applet. WMI
92 // allows us to escape from the Job object so the applet will close. 92 // allows us to escape from the Job object so the applet will close.
93 installer::WMIProcess::Launch(command, &pid); 93 installer::WMIProcess::Launch(command, &pid);
94 } 94 }
95 95
96 } // namespace 96 } // namespace
97 97
98 GoogleChromeDistribution::GoogleChromeDistribution() 98 GoogleChromeDistribution::GoogleChromeDistribution()
99 : BrowserDistribution(CHROME_BROWSER, 99 : BrowserDistribution(CHROME_BROWSER,
100 scoped_ptr<AppRegistrationData>( 100 std::unique_ptr<AppRegistrationData>(
101 new UpdatingAppRegistrationData(kChromeGuid))) { 101 new UpdatingAppRegistrationData(kChromeGuid))) {}
102 }
103 102
104 GoogleChromeDistribution::GoogleChromeDistribution( 103 GoogleChromeDistribution::GoogleChromeDistribution(
105 scoped_ptr<AppRegistrationData> app_reg_data) 104 std::unique_ptr<AppRegistrationData> app_reg_data)
106 : BrowserDistribution(CHROME_BROWSER, std::move(app_reg_data)) {} 105 : BrowserDistribution(CHROME_BROWSER, std::move(app_reg_data)) {}
107 106
108 void GoogleChromeDistribution::DoPostUninstallOperations( 107 void GoogleChromeDistribution::DoPostUninstallOperations(
109 const Version& version, 108 const Version& version,
110 const base::FilePath& local_data_path, 109 const base::FilePath& local_data_path,
111 const base::string16& distribution_data) { 110 const base::string16& distribution_data) {
112 // Send the Chrome version and OS version as params to the form. 111 // Send the Chrome version and OS version as params to the form.
113 // It would be nice to send the locale, too, but I don't see an 112 // It would be nice to send the locale, too, but I don't see an
114 // easy way to get that in the existing code. It's something we 113 // easy way to get that in the existing code. It's something we
115 // can add later, if needed. 114 // can add later, if needed.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // that this was probably a stable channel release. 245 // that this was probably a stable channel release.
247 client_state_key.ReadValue(google_update::kRegApField, &ap_value); 246 client_state_key.ReadValue(google_update::kRegApField, &ap_value);
248 result.append(google_update::kRegApField); 247 result.append(google_update::kRegApField);
249 result.append(L"="); 248 result.append(L"=");
250 result.append(ap_value); 249 result.append(ap_value);
251 250
252 // Crash client id. 251 // Crash client id.
253 base::FilePath crash_dir; 252 base::FilePath crash_dir;
254 if (chrome::GetDefaultCrashDumpLocation(&crash_dir)) { 253 if (chrome::GetDefaultCrashDumpLocation(&crash_dir)) {
255 crashpad::UUID client_id; 254 crashpad::UUID client_id;
256 scoped_ptr<crashpad::CrashReportDatabase> database( 255 std::unique_ptr<crashpad::CrashReportDatabase> database(
257 crashpad::CrashReportDatabase::InitializeWithoutCreating(crash_dir)); 256 crashpad::CrashReportDatabase::InitializeWithoutCreating(crash_dir));
258 if (database && database->GetSettings()->GetClientID(&client_id)) 257 if (database && database->GetSettings()->GetClientID(&client_id))
259 result.append(L"&crash_client_id=").append(client_id.ToString16()); 258 result.append(L"&crash_client_id=").append(client_id.ToString16());
260 } 259 }
261 260
262 return result; 261 return result;
263 } 262 }
264 263
265 base::string16 GoogleChromeDistribution::GetUninstallRegPath() { 264 base::string16 GoogleChromeDistribution::GetUninstallRegPath() {
266 return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" 265 return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"
(...skipping 24 matching lines...) Expand all
291 GetAppGuid()); 290 GetAppGuid());
292 } 291 }
293 292
294 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { 293 bool GoogleChromeDistribution::ShouldSetExperimentLabels() {
295 return true; 294 return true;
296 } 295 }
297 296
298 bool GoogleChromeDistribution::HasUserExperiments() { 297 bool GoogleChromeDistribution::HasUserExperiments() {
299 return true; 298 return true;
300 } 299 }
OLDNEW
« no previous file with comments | « chrome/installer/util/google_chrome_distribution.h ('k') | chrome/installer/util/google_chrome_distribution_dummy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698