diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 01:59:15 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 01:59:15 +0000 |
commit | 935aa54d9a5e2e617c61c9f8dcea398768413443 (patch) | |
tree | 3df9ec9316cd4d5b7171e5c6c869a01d823cc507 /chrome/installer/util | |
parent | 7d1f3348c26eda2d1656860c821d335bf94d4cda (diff) | |
download | chromium_src-935aa54d9a5e2e617c61c9f8dcea398768413443.zip chromium_src-935aa54d9a5e2e617c61c9f8dcea398768413443.tar.gz chromium_src-935aa54d9a5e2e617c61c9f8dcea398768413443.tar.bz2 |
Move windows version-related stuff out of base/win_util and into base/win/windows_version. Many files now only need to include this instead of all of win_util.
Remove a bunch of unused code from base/win_util. There was a surprising amount.
Replace the AppUserModel property key with the one from the SDK now that we use the Win7 SDK. Move GetLogonSessionOnlyDACL from win_util to ipc since it's only used in that one place.
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/3823002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util')
-rw-r--r-- | chrome/installer/util/google_chrome_distribution.cc | 4 | ||||
-rw-r--r-- | chrome/installer/util/install_util.cc | 10 | ||||
-rw-r--r-- | chrome/installer/util/shell_util.cc | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index 9715e71..c0fc09dc 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -21,7 +21,7 @@ #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "base/win_util.h" +#include "base/win/windows_version.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/json_value_serializer.h" #include "chrome/common/pref_names.h" @@ -228,7 +228,7 @@ bool RelaunchSetupAsConsoleUser(const std::wstring& flag) { WideToASCII(installer_util::switches::kToastResultsKey), base::IntToString(key)); - if (win_util::GetWinVersion() > win_util::WINVERSION_XP) { + if (base::win::GetVersion() > base::win::VERSION_XP) { // Make sure that in Vista and Above we have the proper DACLs so // the interactive user can launch it. if (!FixDACLsForExecute(setup_exe.ToWStringHack().c_str())) diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc index e99f387..a0dfad1 100644 --- a/chrome/installer/util/install_util.cc +++ b/chrome/installer/util/install_util.cc @@ -20,7 +20,7 @@ #include "base/scoped_ptr.h" #include "base/string_util.h" #include "base/values.h" -#include "base/win_util.h" +#include "base/win/windows_version.h" #include "chrome/common/json_value_serializer.h" #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/google_update_constants.h" @@ -80,14 +80,14 @@ installer::Version* InstallUtil::GetChromeVersion(bool system_install) { bool InstallUtil::IsOSSupported() { int major, minor; - win_util::WinVersion version = win_util::GetWinVersion(); - win_util::GetServicePackLevel(&major, &minor); + base::win::Version version = base::win::GetVersion(); + base::win::GetServicePackLevel(&major, &minor); // We do not support Win2K or older, or XP without service pack 2. LOG(INFO) << "Windows Version: " << version << ", Service Pack: " << major << "." << minor; - if ((version > win_util::WINVERSION_XP) || - (version == win_util::WINVERSION_XP && major >= 2)) { + if ((version > base::win::VERSION_XP) || + (version == base::win::VERSION_XP && major >= 2)) { return true; } return false; diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index b3cf02b..257a78f 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -24,7 +24,7 @@ #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "base/values.h" -#include "base/win_util.h" +#include "base/win/windows_version.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" #include "chrome/installer/util/browser_distribution.h" @@ -551,7 +551,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 (base::win::GetVersion() >= base::win::VERSION_VISTA) { file_util::AppendToPath(path, L"AppData\\Roaming"); } else { file_util::AppendToPath(path, L"Application Data"); @@ -618,7 +618,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 (base::win::GetVersion() >= base::win::VERSION_VISTA) { LOG(INFO) << "Registering Chrome as default browser on Vista."; IApplicationAssociationRegistration* pAAR; HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration, @@ -699,7 +699,7 @@ bool ShellUtil::RegisterChromeBrowser(const std::wstring& chrome_exe, // If user is not an admin and OS is Vista, try to elevate and register. if (elevate_if_not_admin && - win_util::GetWinVersion() >= win_util::WINVERSION_VISTA && + base::win::GetVersion() >= base::win::VERSION_VISTA && ElevateAndRegisterChrome(chrome_exe, suffix)) return true; |