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

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

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reverting webdriver:Command::parameters_ to const Created 8 years, 4 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 <vector> 10 #include <vector>
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 GoogleChromeDistribution::GoogleChromeDistribution() 293 GoogleChromeDistribution::GoogleChromeDistribution()
294 : BrowserDistribution(CHROME_BROWSER), 294 : BrowserDistribution(CHROME_BROWSER),
295 product_guid_(kChromeGuid) { 295 product_guid_(kChromeGuid) {
296 } 296 }
297 297
298 // The functions below are not used by the 64-bit Windows binary - 298 // The functions below are not used by the 64-bit Windows binary -
299 // see the comment in google_chrome_distribution_dummy.cc 299 // see the comment in google_chrome_distribution_dummy.cc
300 #ifndef _WIN64 300 #ifndef _WIN64
301 bool GoogleChromeDistribution::BuildUninstallMetricsString( 301 bool GoogleChromeDistribution::BuildUninstallMetricsString(
302 DictionaryValue* uninstall_metrics_dict, string16* metrics) { 302 const DictionaryValue* uninstall_metrics_dict, string16* metrics) {
303 DCHECK(NULL != metrics); 303 DCHECK(NULL != metrics);
304 bool has_values = false; 304 bool has_values = false;
305 305
306 for (DictionaryValue::key_iterator iter(uninstall_metrics_dict->begin_keys()); 306 for (DictionaryValue::key_iterator iter(uninstall_metrics_dict->begin_keys());
307 iter != uninstall_metrics_dict->end_keys(); ++iter) { 307 iter != uninstall_metrics_dict->end_keys(); ++iter) {
308 has_values = true; 308 has_values = true;
309 metrics->append(L"&"); 309 metrics->append(L"&");
310 metrics->append(UTF8ToWide(*iter)); 310 metrics->append(UTF8ToWide(*iter));
311 metrics->append(L"="); 311 metrics->append(L"=");
312 312
(...skipping 28 matching lines...) Expand all
341 string16* uninstall_metrics_string) { 341 string16* uninstall_metrics_string) {
342 // Make sure that the user wants us reporting metrics. If not, don't 342 // Make sure that the user wants us reporting metrics. If not, don't
343 // add our uninstall metrics. 343 // add our uninstall metrics.
344 bool metrics_reporting_enabled = false; 344 bool metrics_reporting_enabled = false;
345 if (!root.GetBoolean(prefs::kMetricsReportingEnabled, 345 if (!root.GetBoolean(prefs::kMetricsReportingEnabled,
346 &metrics_reporting_enabled) || 346 &metrics_reporting_enabled) ||
347 !metrics_reporting_enabled) { 347 !metrics_reporting_enabled) {
348 return false; 348 return false;
349 } 349 }
350 350
351 DictionaryValue* uninstall_metrics_dict; 351 const DictionaryValue* uninstall_metrics_dict;
352 if (!root.HasKey(installer::kUninstallMetricsName) || 352 if (!root.HasKey(installer::kUninstallMetricsName) ||
353 !root.GetDictionary(installer::kUninstallMetricsName, 353 !root.GetDictionary(installer::kUninstallMetricsName,
354 &uninstall_metrics_dict)) { 354 &uninstall_metrics_dict)) {
355 return false; 355 return false;
356 } 356 }
357 357
358 if (!BuildUninstallMetricsString(uninstall_metrics_dict, 358 if (!BuildUninstallMetricsString(uninstall_metrics_dict,
359 uninstall_metrics_string)) { 359 uninstall_metrics_string)) {
360 return false; 360 return false;
361 } 361 }
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 // we waited for chrome to exit so the uninstall would not detect chrome 863 // we waited for chrome to exit so the uninstall would not detect chrome
864 // running. 864 // running.
865 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( 865 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch(
866 installer::switches::kSystemLevelToast); 866 installer::switches::kSystemLevelToast);
867 867
868 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, 868 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast,
869 GetType())); 869 GetType()));
870 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); 870 base::LaunchProcess(cmd, base::LaunchOptions(), NULL);
871 } 871 }
872 #endif 872 #endif
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