diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/chrome_exe_main.cc | 3 | ||||
-rw-r--r-- | chrome/browser/browser_main_win.cc | 5 | ||||
-rw-r--r-- | chrome/browser/google_update.cc | 2 | ||||
-rw-r--r-- | chrome/browser/importer/ie_importer.cc | 2 | ||||
-rw-r--r-- | chrome/browser/sandbox_policy.cc | 2 | ||||
-rw-r--r-- | chrome/browser/shell_integration.cc | 4 | ||||
-rw-r--r-- | chrome/browser/views/about_chrome_view.cc | 3 | ||||
-rw-r--r-- | chrome/installer/setup/main.cc | 2 | ||||
-rw-r--r-- | chrome/installer/util/shell_util.cc | 6 | ||||
-rw-r--r-- | chrome/test/mini_installer_test/test.cc | 4 |
10 files changed, 17 insertions, 16 deletions
diff --git a/chrome/app/chrome_exe_main.cc b/chrome/app/chrome_exe_main.cc index 3065597..d8fed89 100644 --- a/chrome/app/chrome_exe_main.cc +++ b/chrome/app/chrome_exe_main.cc @@ -27,8 +27,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev_instance, base::AtExitManager exit_manager; win_util::WinVersion win_version = win_util::GetWinVersion(); - if (win_version == win_util::WINVERSION_XP || - win_version == win_util::WINVERSION_SERVER_2003) { + if (win_version < win_util::WINVERSION_VISTA) { // On Vista, this is unnecessary since it is controlled through the // /NXCOMPAT linker flag. // Enforces strong DEP support. diff --git a/chrome/browser/browser_main_win.cc b/chrome/browser/browser_main_win.cc index b6eec50..a1c5056 100644 --- a/chrome/browser/browser_main_win.cc +++ b/chrome/browser/browser_main_win.cc @@ -113,9 +113,10 @@ void PrepareRestartOnCrashEnviroment(const CommandLine &parsed_command_line) { int HandleIconsCommands(const CommandLine &parsed_command_line) { if (parsed_command_line.HasSwitch(switches::kHideIcons)) { std::wstring cp_applet; - if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA) { + win_util::WinVersion version = win_util::GetWinVersion(); + if (version >= win_util::WINVERSION_VISTA) { cp_applet.assign(L"Programs and Features"); // Windows Vista and later. - } else if (win_util::GetWinVersion() == win_util::WINVERSION_XP) { + } else if (version >= win_util::WINVERSION_XP) { cp_applet.assign(L"Add/Remove Programs"); // Windows XP. } else { return ResultCodes::UNSUPPORTED_PARAM; // Not supported diff --git a/chrome/browser/google_update.cc b/chrome/browser/google_update.cc index da82ae5..17f30b3 100644 --- a/chrome/browser/google_update.cc +++ b/chrome/browser/google_update.cc @@ -57,7 +57,7 @@ HRESULT CoCreateInstanceAsAdmin(REFCLSID class_id, REFIID interface_id, // For Vista we need to instantiate the COM server via the elevation // moniker. This ensures that the UAC dialog shows up. - if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA) { + if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { wchar_t class_id_as_string[MAX_PATH] = {0}; StringFromGUID2(class_id, class_id_as_string, arraysize(class_id_as_string)); diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc index 36b6cd7..0d0e3e7 100644 --- a/chrome/browser/importer/ie_importer.cc +++ b/chrome/browser/importer/ie_importer.cc @@ -451,7 +451,7 @@ bool IEImporter::GetFavoritesInfo(IEImporter::FavoritesInfo *info) { // is not recording in Vista's registry. So in Vista, we assume the Links // folder is under Favorites folder since it looks like there is not name // different in every language version of Windows Vista. - if (win_util::GetWinVersion() != win_util::WINVERSION_VISTA) { + if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) { // The Link folder name is stored in the registry. DWORD buffer_length = sizeof(buffer); if (!ReadFromRegistry(HKEY_CURRENT_USER, diff --git a/chrome/browser/sandbox_policy.cc b/chrome/browser/sandbox_policy.cc index 5e0e999..8d39650 100644 --- a/chrome/browser/sandbox_policy.cc +++ b/chrome/browser/sandbox_policy.cc @@ -282,7 +282,7 @@ bool ApplyPolicyForUntrustedPlugin(sandbox::TargetPolicy* policy) { policy)) return false; - if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA) { + if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { if (!AddKeyAndSubkeys(L"HKEY_CURRENT_USER\\SOFTWARE\\AppDataLow", sandbox::TargetPolicy::REG_ALLOW_ANY, policy)) diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc index f5a9a34..c38ae76 100644 --- a/chrome/browser/shell_integration.cc +++ b/chrome/browser/shell_integration.cc @@ -69,7 +69,7 @@ bool ShellIntegration::IsDefaultBrowser() { // to show up in Add/Remove programs for us. const std::wstring kChromeProtocols[] = {L"http", L"https"}; - if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA) { + if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { IApplicationAssociationRegistration* pAAR; HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration, NULL, CLSCTX_INPROC, __uuidof(IApplicationAssociationRegistration), @@ -130,7 +130,7 @@ bool ShellIntegration::IsDefaultBrowser() { // is false. bool ShellIntegration::IsFirefoxDefaultBrowser() { bool ff_default = false; - if (win_util::GetWinVersion() == win_util::WINVERSION_VISTA) { + if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { std::wstring app_cmd; RegKey key(HKEY_CURRENT_USER, ShellUtil::kRegVistaUrlPrefs, KEY_READ); if (key.Valid() && key.ReadValue(L"Progid", &app_cmd) && diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc index 347e717a..b6e4b3d 100644 --- a/chrome/browser/views/about_chrome_view.cc +++ b/chrome/browser/views/about_chrome_view.cc @@ -584,7 +584,8 @@ void AboutChromeView::ViewHierarchyChanged(bool is_add, if (win_util::UserAccountControlIsEnabled() || win_util::GetWinVersion() == win_util::WINVERSION_XP || (win_util::GetWinVersion() == win_util::WINVERSION_VISTA && - service_pack_major >= 1)) { + service_pack_major >= 1) || + win_util::GetWinVersion() > win_util::WINVERSION_VISTA) { UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); google_updater_->CheckForUpdate(false); // false=don't upgrade yet. } 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, diff --git a/chrome/test/mini_installer_test/test.cc b/chrome/test/mini_installer_test/test.cc index 9020bcb..bf86630 100644 --- a/chrome/test/mini_installer_test/test.cc +++ b/chrome/test/mini_installer_test/test.cc @@ -14,7 +14,7 @@ class MiniInstallTest : public testing::Test { virtual void SetUp() { ChromeMiniInstaller userinstall(mini_installer_constants::kUserInstall); userinstall.UnInstall(); - if (win_util::GetWinVersion() != win_util::WINVERSION_VISTA) { + if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) { ChromeMiniInstaller systeminstall( mini_installer_constants::kSystemInstall); systeminstall.UnInstall(); @@ -34,7 +34,7 @@ TEST_F(MiniInstallTest, MiniInstallerOverChromeMetaInstallerTest) { } TEST_F(MiniInstallTest, MiniInstallerSystemInstallTest) { - if (win_util::GetWinVersion() != win_util::WINVERSION_VISTA) { + if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) { ChromeMiniInstaller installer(mini_installer_constants::kSystemInstall); installer.InstallMiniInstaller(); } |