diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 20:26:44 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 20:26:44 +0000 |
commit | 309c8ff514d506364567d9e6095a295b8d5c3d3e (patch) | |
tree | eed57b5e9e9b725c02d665472b839b305227f04a /chrome/installer | |
parent | 47041caea97f2ffe6ecd5963684d3b57f7dde14d (diff) | |
download | chromium_src-309c8ff514d506364567d9e6095a295b8d5c3d3e.zip chromium_src-309c8ff514d506364567d9e6095a295b8d5c3d3e.tar.gz chromium_src-309c8ff514d506364567d9e6095a295b8d5c3d3e.tar.bz2 |
Fix all places where we used the GetWinVersion function
incorrectly.
bug:7802
Review URL: http://codereview.chromium.org/28128
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/setup/main.cc | 2 | ||||
-rw-r--r-- | chrome/installer/util/shell_util.cc | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/chrome/installer/setup/main.cc b/chrome/installer/setup/main.cc index 314d5fc..0fe810e 100644 --- a/chrome/installer/setup/main.cc +++ b/chrome/installer/setup/main.cc @@ -524,7 +524,7 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, } if (system_install && !IsUserAnAdmin()) { - if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA && + if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA && !parsed_command_line.HasSwitch(installer_util::switches::kRunAsAdmin)) { std::wstring exe = parsed_command_line.program(); std::wstring params(command_line); diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index 69721d3..422173c 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -407,7 +407,7 @@ ShellUtil::RegisterStatus ShellUtil::AddChromeToSetAccessDefaults( if (IsChromeRegistered(chrome_exe)) return ShellUtil::SUCCESS; - if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA) + if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) return RegisterOnVista(chrome_exe, skip_if_not_admin); // Try adding these entries to HKLM first and if that fails try adding @@ -470,7 +470,7 @@ bool ShellUtil::GetQuickLaunchPath(bool system_level, std::wstring* path) { if ((p == NULL) || ((p)(qlaunch, &size) != TRUE)) return false; *path = qlaunch; - if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA) { + if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { file_util::AppendToPath(path, L"AppData\\Roaming"); } else { file_util::AppendToPath(path, L"Application Data"); @@ -559,7 +559,7 @@ bool ShellUtil::MakeChromeDefault(int shell_change, bool ret = true; // First use the new "recommended" way on Vista to make Chrome default // browser. - if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA) { + if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { LOG(INFO) << "Registering Chrome as default browser on Vista."; IApplicationAssociationRegistration* pAAR; HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration, |