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

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

Issue 270062: Use ASCII strings for switch names. (Closed)
Patch Set: victory Created 11 years, 2 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
« no previous file with comments | « chrome/common/sandbox_init_wrapper.cc ('k') | chrome/installer/util/logging_installer.cc » ('j') | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 <atlbase.h> 10 #include <atlbase.h>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 int now_time = FileTimeToHours(time); 99 int now_time = FileTimeToHours(time);
100 if (dir_time >= now_time) 100 if (dir_time >= now_time)
101 return 0; 101 return 0;
102 return (now_time - dir_time); 102 return (now_time - dir_time);
103 } 103 }
104 104
105 // Launches again this same process with a single switch --|flag|=|value|. 105 // Launches again this same process with a single switch --|flag|=|value|.
106 // Does not wait for the process to terminate. 106 // Does not wait for the process to terminate.
107 bool RelaunchSetup(const std::wstring& flag, int value) { 107 bool RelaunchSetup(const std::wstring& flag, int value) {
108 CommandLine cmd_line(CommandLine::ForCurrentProcess()->program()); 108 CommandLine cmd_line(CommandLine::ForCurrentProcess()->program());
109 cmd_line.AppendSwitchWithValue(flag, IntToWString(value)); 109 // TODO: make switches into ASCII.
110 cmd_line.AppendSwitchWithValue(WideToASCII(flag), IntToWString(value));
110 return base::LaunchApp(cmd_line, false, false, NULL); 111 return base::LaunchApp(cmd_line, false, false, NULL);
111 } 112 }
112 113
113 } // namespace 114 } // namespace
114 115
115 bool GoogleChromeDistribution::BuildUninstallMetricsString( 116 bool GoogleChromeDistribution::BuildUninstallMetricsString(
116 DictionaryValue* uninstall_metrics_dict, std::wstring* metrics) { 117 DictionaryValue* uninstall_metrics_dict, std::wstring* metrics) {
117 DCHECK(NULL != metrics); 118 DCHECK(NULL != metrics);
118 bool has_values = false; 119 bool has_values = false;
119 120
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 }; 496 };
496 GoogleUpdateSettings::SetClient(GetExperimentGroup(outcome, flavor)); 497 GoogleUpdateSettings::SetClient(GetExperimentGroup(outcome, flavor));
497 if (outcome != kToastExpUninstallGroup) 498 if (outcome != kToastExpUninstallGroup)
498 return; 499 return;
499 // The user wants to uninstall. This is a best effort operation. Note that 500 // The user wants to uninstall. This is a best effort operation. Note that
500 // we waited for chrome to exit so the uninstall would not detect chrome 501 // we waited for chrome to exit so the uninstall would not detect chrome
501 // running. 502 // running.
502 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(false), 503 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(false),
503 false, false, NULL); 504 false, false, NULL);
504 } 505 }
OLDNEW
« no previous file with comments | « chrome/common/sandbox_init_wrapper.cc ('k') | chrome/installer/util/logging_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698