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

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

Issue 6816027: Make the windows_version.h functions threadsafe by using a singleton. Add accessors to the singl... (Closed) Base URL: svn://chrome-svn/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 std::wstring os_version = L"na"; 329 base::win::OSInfo::VersionNumber version_number =
330 OSVERSIONINFO version_info; 330 base::win::OSInfo::GetInstance()->version_number();
331 version_info.dwOSVersionInfoSize = sizeof(version_info); 331 std::wstring os_version = StringPrintf(L"%d.%d.%d", version_number.major,
332 if (GetVersionEx(&version_info)) { 332 version_number.minor, version_number.build);
333 os_version = StringPrintf(L"%d.%d.%d", version_info.dwMajorVersion,
334 version_info.dwMinorVersion,
335 version_info.dwBuildNumber);
336 }
337 333
338 FilePath iexplore; 334 FilePath iexplore;
339 if (!PathService::Get(base::DIR_PROGRAM_FILES, &iexplore)) 335 if (!PathService::Get(base::DIR_PROGRAM_FILES, &iexplore))
340 return; 336 return;
341 337
342 iexplore = iexplore.AppendASCII("Internet Explorer"); 338 iexplore = iexplore.AppendASCII("Internet Explorer");
343 iexplore = iexplore.AppendASCII("iexplore.exe"); 339 iexplore = iexplore.AppendASCII("iexplore.exe");
344 340
345 std::wstring command = iexplore.value() + L" " + GetUninstallSurveyUrl() + 341 std::wstring command = iexplore.value() + L" " + GetUninstallSurveyUrl() +
346 L"&" + kVersionParam + L"=" + UTF8ToWide(version.GetString()) + L"&" + 342 L"&" + kVersionParam + L"=" + UTF8ToWide(version.GetString()) + L"&" +
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 // we waited for chrome to exit so the uninstall would not detect chrome 755 // we waited for chrome to exit so the uninstall would not detect chrome
760 // running. 756 // running.
761 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( 757 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch(
762 installer::switches::kSystemLevelToast); 758 installer::switches::kSystemLevelToast);
763 759
764 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, 760 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast,
765 GetType())); 761 GetType()));
766 base::LaunchApp(cmd, false, false, NULL); 762 base::LaunchApp(cmd, false, false, NULL);
767 } 763 }
768 #endif 764 #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