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

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

Issue 3823002: Move windows version-related stuff out of base/win_util and into base/win/win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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>
11 #include <wtsapi32.h> 11 #include <wtsapi32.h>
12 #include <msi.h> 12 #include <msi.h>
13 #include <sddl.h> 13 #include <sddl.h>
14 14
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/file_path.h" 16 #include "base/file_path.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/rand_util.h" 18 #include "base/rand_util.h"
19 #include "base/registry.h" 19 #include "base/registry.h"
20 #include "base/scoped_ptr.h" 20 #include "base/scoped_ptr.h"
21 #include "base/string_number_conversions.h" 21 #include "base/string_number_conversions.h"
22 #include "base/string_util.h" 22 #include "base/string_util.h"
23 #include "base/utf_string_conversions.h" 23 #include "base/utf_string_conversions.h"
24 #include "base/win_util.h" 24 #include "base/win/windows_version.h"
25 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
26 #include "chrome/common/json_value_serializer.h" 26 #include "chrome/common/json_value_serializer.h"
27 #include "chrome/common/pref_names.h" 27 #include "chrome/common/pref_names.h"
28 #include "chrome/common/result_codes.h" 28 #include "chrome/common/result_codes.h"
29 #include "chrome/installer/util/install_util.h" 29 #include "chrome/installer/util/install_util.h"
30 #include "chrome/installer/util/l10n_string_util.h" 30 #include "chrome/installer/util/l10n_string_util.h"
31 #include "chrome/installer/util/google_update_constants.h" 31 #include "chrome/installer/util/google_update_constants.h"
32 #include "chrome/installer/util/google_update_settings.h" 32 #include "chrome/installer/util/google_update_settings.h"
33 #include "chrome/installer/util/helper.h" 33 #include "chrome/installer/util/helper.h"
34 #include "chrome/installer/util/util_constants.h" 34 #include "chrome/installer/util/util_constants.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 CommandLine cmd_line(setup_exe); 221 CommandLine cmd_line(setup_exe);
222 cmd_line.AppendSwitch(WideToASCII(flag)); 222 cmd_line.AppendSwitch(WideToASCII(flag));
223 223
224 // Get the Google Update results key, and pass it on the command line to 224 // Get the Google Update results key, and pass it on the command line to
225 // the child process. 225 // the child process.
226 int key = GoogleUpdateSettings::DuplicateGoogleUpdateSystemClientKey(); 226 int key = GoogleUpdateSettings::DuplicateGoogleUpdateSystemClientKey();
227 cmd_line.AppendSwitchASCII( 227 cmd_line.AppendSwitchASCII(
228 WideToASCII(installer_util::switches::kToastResultsKey), 228 WideToASCII(installer_util::switches::kToastResultsKey),
229 base::IntToString(key)); 229 base::IntToString(key));
230 230
231 if (win_util::GetWinVersion() > win_util::WINVERSION_XP) { 231 if (base::win::GetVersion() > base::win::VERSION_XP) {
232 // Make sure that in Vista and Above we have the proper DACLs so 232 // Make sure that in Vista and Above we have the proper DACLs so
233 // the interactive user can launch it. 233 // the interactive user can launch it.
234 if (!FixDACLsForExecute(setup_exe.ToWStringHack().c_str())) 234 if (!FixDACLsForExecute(setup_exe.ToWStringHack().c_str()))
235 NOTREACHED(); 235 NOTREACHED();
236 } 236 }
237 237
238 DWORD console_id = ::WTSGetActiveConsoleSessionId(); 238 DWORD console_id = ::WTSGetActiveConsoleSessionId();
239 if (console_id == 0xFFFFFFFF) 239 if (console_id == 0xFFFFFFFF)
240 return false; 240 return false;
241 HANDLE user_token; 241 HANDLE user_token;
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 658
659 if (outcome != kToastExpUninstallGroup) 659 if (outcome != kToastExpUninstallGroup)
660 return; 660 return;
661 // The user wants to uninstall. This is a best effort operation. Note that 661 // The user wants to uninstall. This is a best effort operation. Note that
662 // we waited for chrome to exit so the uninstall would not detect chrome 662 // we waited for chrome to exit so the uninstall would not detect chrome
663 // running. 663 // running.
664 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(system_install), 664 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(system_install),
665 false, false, NULL); 665 false, false, NULL);
666 } 666 }
667 #endif 667 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698