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

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

Issue 6816024: Revert 80819 due to failed tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 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 | « chrome/installer/setup/install_worker.cc ('k') | chrome/installer/util/install_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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>
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 const std::wstring& distribution_data) { 319 const std::wstring& distribution_data) {
320 // Send the Chrome version and OS version as params to the form. 320 // Send the Chrome version and OS version as params to the form.
321 // It would be nice to send the locale, too, but I don't see an 321 // It would be nice to send the locale, too, but I don't see an
322 // easy way to get that in the existing code. It's something we 322 // easy way to get that in the existing code. It's something we
323 // can add later, if needed. 323 // can add later, if needed.
324 // We depend on installed_version.GetString() not having spaces or other 324 // We depend on installed_version.GetString() not having spaces or other
325 // characters that need escaping: 0.2.13.4. Should that change, we will 325 // characters that need escaping: 0.2.13.4. Should that change, we will
326 // need to escape the string before using it in a URL. 326 // need to escape the string before using it in a URL.
327 const std::wstring kVersionParam = L"crversion"; 327 const std::wstring kVersionParam = L"crversion";
328 const std::wstring kOSParam = L"os"; 328 const std::wstring kOSParam = L"os";
329 base::win::OSInfo::VersionNumber version_number = 329 std::wstring os_version = L"na";
330 base::win::OSInfo::GetInstance()->version_number(); 330 OSVERSIONINFO version_info;
331 std::wstring os_version = StringPrintf(L"%d.%d.%d", version_number.major, 331 version_info.dwOSVersionInfoSize = sizeof(version_info);
332 version_number.minor, version_number.build); 332 if (GetVersionEx(&version_info)) {
333 os_version = StringPrintf(L"%d.%d.%d", version_info.dwMajorVersion,
334 version_info.dwMinorVersion,
335 version_info.dwBuildNumber);
336 }
333 337
334 FilePath iexplore; 338 FilePath iexplore;
335 if (!PathService::Get(base::DIR_PROGRAM_FILES, &iexplore)) 339 if (!PathService::Get(base::DIR_PROGRAM_FILES, &iexplore))
336 return; 340 return;
337 341
338 iexplore = iexplore.AppendASCII("Internet Explorer"); 342 iexplore = iexplore.AppendASCII("Internet Explorer");
339 iexplore = iexplore.AppendASCII("iexplore.exe"); 343 iexplore = iexplore.AppendASCII("iexplore.exe");
340 344
341 std::wstring command = iexplore.value() + L" " + GetUninstallSurveyUrl() + 345 std::wstring command = iexplore.value() + L" " + GetUninstallSurveyUrl() +
342 L"&" + kVersionParam + L"=" + UTF8ToWide(version.GetString()) + L"&" + 346 L"&" + kVersionParam + L"=" + UTF8ToWide(version.GetString()) + L"&" +
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 // we waited for chrome to exit so the uninstall would not detect chrome 759 // we waited for chrome to exit so the uninstall would not detect chrome
756 // running. 760 // running.
757 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( 761 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch(
758 installer::switches::kSystemLevelToast); 762 installer::switches::kSystemLevelToast);
759 763
760 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, 764 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast,
761 GetType())); 765 GetType()));
762 base::LaunchApp(cmd, false, false, NULL); 766 base::LaunchApp(cmd, false, false, NULL);
763 } 767 }
764 #endif 768 #endif
OLDNEW
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | chrome/installer/util/install_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698