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

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

Issue 12186016: Add BrowserDistribution support for Win64 build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 10 #include <vector>
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 return launched; 283 return launched;
284 } 284 }
285 285
286 } // namespace 286 } // namespace
287 287
288 GoogleChromeDistribution::GoogleChromeDistribution() 288 GoogleChromeDistribution::GoogleChromeDistribution()
289 : BrowserDistribution(CHROME_BROWSER), 289 : BrowserDistribution(CHROME_BROWSER),
290 product_guid_(kChromeGuid) { 290 product_guid_(kChromeGuid) {
291 } 291 }
292 292
293 // The functions below are not used by the 64-bit Windows binary - 293 // The functions below are not used by the NaCl 64-bit Windows binary -
294 // see the comment in google_chrome_distribution_dummy.cc 294 // see the comment in google_chrome_distribution_dummy.cc
295 #ifndef _WIN64 295 #if !defined(NACL_WIN64)
grt (UTC plus 2) 2013/02/04 19:03:47 under what conditions is this file compiled with N
jschuh 2013/02/04 19:16:41 NACL_WIN64 is enabled when building a 64-bit NaCl
grt (UTC plus 2) 2013/02/04 19:34:39 I don't see this file ever being compiled with tha
robertshield 2013/02/04 19:44:33 What Greg said, at first glance it looks like ever
296 bool GoogleChromeDistribution::BuildUninstallMetricsString( 296 bool GoogleChromeDistribution::BuildUninstallMetricsString(
297 const DictionaryValue* uninstall_metrics_dict, string16* metrics) { 297 const DictionaryValue* uninstall_metrics_dict, string16* metrics) {
298 DCHECK(NULL != metrics); 298 DCHECK(NULL != metrics);
299 bool has_values = false; 299 bool has_values = false;
300 300
301 for (DictionaryValue::Iterator iter(*uninstall_metrics_dict); !iter.IsAtEnd(); 301 for (DictionaryValue::Iterator iter(*uninstall_metrics_dict); !iter.IsAtEnd();
302 iter.Advance()) { 302 iter.Advance()) {
303 has_values = true; 303 has_values = true;
304 metrics->append(L"&"); 304 metrics->append(L"&");
305 metrics->append(UTF8ToWide(iter.key())); 305 metrics->append(UTF8ToWide(iter.key()));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 return false; 350 return false;
351 } 351 }
352 352
353 if (!BuildUninstallMetricsString(uninstall_metrics_dict, 353 if (!BuildUninstallMetricsString(uninstall_metrics_dict,
354 uninstall_metrics_string)) { 354 uninstall_metrics_string)) {
355 return false; 355 return false;
356 } 356 }
357 357
358 return true; 358 return true;
359 } 359 }
360 #endif 360 #endif // if !defined(NACL_WIN64).
361 361
362 void GoogleChromeDistribution::DoPostUninstallOperations( 362 void GoogleChromeDistribution::DoPostUninstallOperations(
363 const Version& version, 363 const Version& version,
364 const FilePath& local_data_path, 364 const FilePath& local_data_path,
365 const string16& distribution_data) { 365 const string16& distribution_data) {
366 // Send the Chrome version and OS version as params to the form. 366 // Send the Chrome version and OS version as params to the form.
367 // It would be nice to send the locale, too, but I don't see an 367 // It would be nice to send the locale, too, but I don't see an
368 // easy way to get that in the existing code. It's something we 368 // easy way to get that in the existing code. It's something we
369 // can add later, if needed. 369 // can add later, if needed.
370 // We depend on installed_version.GetString() not having spaces or other 370 // We depend on installed_version.GetString() not having spaces or other
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 void GoogleChromeDistribution::UpdateInstallStatus(bool system_install, 567 void GoogleChromeDistribution::UpdateInstallStatus(bool system_install,
568 installer::ArchiveType archive_type, 568 installer::ArchiveType archive_type,
569 installer::InstallStatus install_status) { 569 installer::InstallStatus install_status) {
570 GoogleUpdateSettings::UpdateInstallStatus(system_install, 570 GoogleUpdateSettings::UpdateInstallStatus(system_install,
571 archive_type, InstallUtil::GetInstallReturnCode(install_status), 571 archive_type, InstallUtil::GetInstallReturnCode(install_status),
572 product_guid()); 572 product_guid());
573 } 573 }
574 574
575 // The functions below are not used by the 64-bit Windows binary - 575 // The functions below are not used by the 64-bit Windows binary -
576 // see the comment in google_chrome_distribution_dummy.cc 576 // see the comment in google_chrome_distribution_dummy.cc
577 #ifndef _WIN64 577 #if !defined(NACL_WIN64)
578 // A helper function that writes to HKLM if the handle was passed through the 578 // A helper function that writes to HKLM if the handle was passed through the
579 // command line, but HKCU otherwise. |experiment_group| is the value to write 579 // command line, but HKCU otherwise. |experiment_group| is the value to write
580 // and |last_write| is used when writing to HKLM to determine whether to close 580 // and |last_write| is used when writing to HKLM to determine whether to close
581 // the handle when done. 581 // the handle when done.
582 void SetClient(const string16& experiment_group, bool last_write) { 582 void SetClient(const string16& experiment_group, bool last_write) {
583 static int reg_key_handle = -1; 583 static int reg_key_handle = -1;
584 if (reg_key_handle == -1) { 584 if (reg_key_handle == -1) {
585 // If a specific Toast Results key handle (presumably to our HKLM key) was 585 // If a specific Toast Results key handle (presumably to our HKLM key) was
586 // passed in to the command line (such as for system level installs), we use 586 // passed in to the command line (such as for system level installs), we use
587 // it. Otherwise, we write to the key under HKCU. 587 // it. Otherwise, we write to the key under HKCU.
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 // The user wants to uninstall. This is a best effort operation. Note that 865 // The user wants to uninstall. This is a best effort operation. Note that
866 // we waited for chrome to exit so the uninstall would not detect chrome 866 // we waited for chrome to exit so the uninstall would not detect chrome
867 // running. 867 // running.
868 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( 868 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch(
869 installer::switches::kSystemLevelToast); 869 installer::switches::kSystemLevelToast);
870 870
871 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, 871 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast,
872 GetType())); 872 GetType()));
873 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); 873 base::LaunchProcess(cmd, base::LaunchOptions(), NULL);
874 } 874 }
875 #endif // ifndef _WIN64 875 #endif // if !defined(NACL_WIN64).
876 876
877 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { 877 bool GoogleChromeDistribution::ShouldSetExperimentLabels() {
878 return true; 878 return true;
879 } 879 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698