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

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

Issue 329017: Remove deprecated CommandLine(std::wstring) ctor. (Closed)
Patch Set: 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/installer/setup/setup_util_unittest.cc ('k') | chrome/installer/util/shell_util.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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 GetSystemTimeAsFileTime(&time); 98 GetSystemTimeAsFileTime(&time);
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()->GetProgram());
109 // TODO: make switches into ASCII. 109 // TODO: make switches into ASCII.
110 cmd_line.AppendSwitchWithValue(WideToASCII(flag), IntToWString(value)); 110 cmd_line.AppendSwitchWithValue(WideToASCII(flag), IntToWString(value));
111 return base::LaunchApp(cmd_line, false, false, NULL); 111 return base::LaunchApp(cmd_line, false, false, NULL);
112 } 112 }
113 113
114 } // namespace 114 } // namespace
115 115
116 bool GoogleChromeDistribution::BuildUninstallMetricsString( 116 bool GoogleChromeDistribution::BuildUninstallMetricsString(
117 DictionaryValue* uninstall_metrics_dict, std::wstring* metrics) { 117 DictionaryValue* uninstall_metrics_dict, std::wstring* metrics) {
118 DCHECK(NULL != metrics); 118 DCHECK(NULL != metrics);
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 }; 496 };
497 GoogleUpdateSettings::SetClient(GetExperimentGroup(outcome, flavor)); 497 GoogleUpdateSettings::SetClient(GetExperimentGroup(outcome, flavor));
498 if (outcome != kToastExpUninstallGroup) 498 if (outcome != kToastExpUninstallGroup)
499 return; 499 return;
500 // 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
501 // 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
502 // running. 502 // running.
503 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(false), 503 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(false),
504 false, false, NULL); 504 false, false, NULL);
505 } 505 }
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_util_unittest.cc ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698