summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/chrome_exe_main.cc6
-rw-r--r--chrome/browser/aeropeek_manager.cc4
-rw-r--r--chrome/browser/browser_main_win.cc10
-rw-r--r--chrome/browser/bug_report_util.h4
-rw-r--r--chrome/browser/diagnostics/recon_diagnostics.cc10
-rw-r--r--chrome/browser/dom_ui/chrome_url_data_manager.cc4
-rw-r--r--chrome/browser/download/download_util.cc3
-rw-r--r--chrome/browser/first_run/first_run_win.cc4
-rw-r--r--chrome/browser/geolocation/wifi_data_provider_win.cc5
-rw-r--r--chrome/browser/google/google_update.cc6
-rw-r--r--chrome/browser/importer/ie_importer.cc4
-rw-r--r--chrome/browser/jumplist_win.cc8
-rw-r--r--chrome/browser/shell_integration_win.cc13
-rw-r--r--chrome/browser/views/about_chrome_view.cc9
-rw-r--r--chrome/browser/views/create_application_shortcut_view.cc5
-rw-r--r--chrome/browser/views/shell_dialogs_win.cc4
-rw-r--r--chrome/browser/web_applications/web_app.cc9
-rw-r--r--chrome/common/sandbox_policy.cc10
-rw-r--r--chrome/installer/setup/setup_main.cc4
-rw-r--r--chrome/installer/setup/uninstall.cc4
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc4
-rw-r--r--chrome/installer/util/install_util.cc10
-rw-r--r--chrome/installer/util/shell_util.cc8
-rw-r--r--chrome/renderer/pepper_widget.cc4
-rw-r--r--chrome/test/mini_installer_test/test.cc4
-rw-r--r--chrome/test/ui/ui_test.cc4
-rw-r--r--chrome/tools/crash_service/crash_service.cc4
27 files changed, 86 insertions, 78 deletions
diff --git a/chrome/app/chrome_exe_main.cc b/chrome/app/chrome_exe_main.cc
index ed4c263..296431c 100644
--- a/chrome/app/chrome_exe_main.cc
+++ b/chrome/app/chrome_exe_main.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,7 +7,7 @@
#include "base/at_exit.h"
#include "base/command_line.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/app/breakpad_win.h"
#include "chrome/app/client_util.h"
#include "chrome/common/result_codes.h"
@@ -37,7 +37,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
if (!sandbox_info.broker_services)
sandbox_info.target_services = sandbox::SandboxFactory::GetTargetServices();
- if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) {
+ if (base::win::GetVersion() < base::win::VERSION_VISTA) {
// Enforces strong DEP support. Vista uses the NXCOMPAT flag in the exe.
sandbox::SetCurrentProcessDEP(sandbox::DEP_ENABLED);
}
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc
index 52fb7b7..a63d2b9 100644
--- a/chrome/browser/aeropeek_manager.cc
+++ b/chrome/browser/aeropeek_manager.cc
@@ -13,7 +13,7 @@
#include "base/scoped_handle_win.h"
#include "base/scoped_native_library.h"
#include "base/waitable_event.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/app_icon_win.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
@@ -1029,7 +1029,7 @@ bool AeroPeekManager::Enabled() {
// TODO(hbono): Bug 37957 <http://crbug.com/37957>: find solutions that avoid
// flooding users with tab thumbnails.
const CommandLine* command_line = CommandLine::ForCurrentProcess();
- return win_util::GetWinVersion() >= win_util::WINVERSION_WIN7 &&
+ return base::win::GetVersion() >= base::win::VERSION_WIN7 &&
win_util::ShouldUseVistaFrame() &&
!command_line->HasSwitch(switches::kApp) &&
command_line->HasSwitch(switches::kEnableAeroPeekTabs);
diff --git a/chrome/browser/browser_main_win.cc b/chrome/browser/browser_main_win.cc
index 8911307..ef1dc17 100644
--- a/chrome/browser/browser_main_win.cc
+++ b/chrome/browser/browser_main_win.cc
@@ -19,7 +19,7 @@
#include "base/path_service.h"
#include "base/scoped_ptr.h"
#include "base/utf_string_conversions.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/metrics/metrics_service.h"
@@ -49,7 +49,7 @@ void RecordBreakpadStatusUMA(MetricsService* metrics) {
}
void WarnAboutMinimumSystemRequirements() {
- if (win_util::GetWinVersion() < win_util::WINVERSION_XP) {
+ if (base::win::GetVersion() < base::win::VERSION_XP) {
// Display a warning message if the user is running chrome on Windows 2000.
const std::wstring text =
l10n_util::GetString(IDS_UNSUPPORTED_OS_PRE_WIN_XP);
@@ -148,10 +148,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;
- win_util::WinVersion version = win_util::GetWinVersion();
- if (version >= win_util::WINVERSION_VISTA) {
+ base::win::Version version = base::win::GetVersion();
+ if (version >= base::win::VERSION_VISTA) {
cp_applet.assign(L"Programs and Features"); // Windows Vista and later.
- } else if (version >= win_util::WINVERSION_XP) {
+ } else if (version >= base::win::VERSION_XP) {
cp_applet.assign(L"Add/Remove Programs"); // Windows XP.
} else {
return ResultCodes::UNSUPPORTED_PARAM; // Not supported
diff --git a/chrome/browser/bug_report_util.h b/chrome/browser/bug_report_util.h
index c01acc04..7d5af5d 100644
--- a/chrome/browser/bug_report_util.h
+++ b/chrome/browser/bug_report_util.h
@@ -12,6 +12,8 @@
#if defined(OS_MACOSX)
#include "base/mac_util.h"
#include "base/sys_info.h"
+#elif defined(OS_WIN)
+#include "base/win/windows_version.h"
#endif
#include "chrome/browser/userfeedback/proto/common.pb.h"
#include "chrome/browser/userfeedback/proto/extension.pb.h"
@@ -54,7 +56,7 @@ class BugReportUtil {
// SetOSVersion copies the maj.minor.build + servicePack_string
// into a string. We currently have:
- // win_util::GetWinVersion returns WinVersion, which is just
+ // base::win::GetVersion returns WinVersion, which is just
// an enum of 2000, XP, 2003, or VISTA. Not enough detail for
// bug reports.
// base::SysInfo::OperatingSystemVersion returns an std::string
diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc
index 52f2ff0..bda422b 100644
--- a/chrome/browser/diagnostics/recon_diagnostics.cc
+++ b/chrome/browser/diagnostics/recon_diagnostics.cc
@@ -20,7 +20,7 @@
#include "chrome/common/json_value_serializer.h"
#if defined(OS_WIN)
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/installer/util/install_util.h"
#endif
@@ -49,13 +49,13 @@ class OperatingSystemTest : public DiagnosticTest {
int major = 0;
int minor = 0;
#if defined(OS_WIN)
- version = win_util::GetWinVersion();
- if (version < win_util::WINVERSION_XP) {
+ version = base::win::GetVersion();
+ if (version < base::win::VERSION_XP) {
RecordFailure(ASCIIToUTF16("Windows 2000 or earlier"));
return false;
}
- win_util::GetServicePackLevel(&major, &minor);
- if ((version == win_util::WINVERSION_XP) && (major < 2)) {
+ base::win::GetServicePackLevel(&major, &minor);
+ if ((version == base::win::VERSION_XP) && (major < 2)) {
RecordFailure(ASCIIToUTF16("XP Service Pack 1 or earlier"));
return false;
}
diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.cc b/chrome/browser/dom_ui/chrome_url_data_manager.cc
index a683faa..e415699 100644
--- a/chrome/browser/dom_ui/chrome_url_data_manager.cc
+++ b/chrome/browser/dom_ui/chrome_url_data_manager.cc
@@ -15,7 +15,7 @@
#include "base/thread.h"
#include "base/values.h"
#if defined(OS_WIN)
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#endif
#include "chrome/browser/appcache/view_appcache_internals_job_factory.h"
#include "chrome/browser/browser_process.h"
@@ -305,7 +305,7 @@ void ChromeURLDataManager::DataSource::SetFontAndTextDirection(
#if defined(OS_WIN)
// Some fonts used for some languages changed a lot in terms of the font
// metric in Vista. So, we need to use different size before Vista.
- if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA)
+ if (base::win::GetVersion() < base::win::VERSION_VISTA)
web_font_size_id = IDS_WEB_FONT_SIZE_XP;
#endif
localized_strings->SetString("fontsize",
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index 4269fc9..4360909 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -23,6 +23,7 @@
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
@@ -598,7 +599,7 @@ void UpdateAppIconDownloadProgress(int download_count,
float progress) {
#if defined(OS_WIN)
// Taskbar progress bar is only supported on Win7.
- if (win_util::GetWinVersion() < win_util::WINVERSION_WIN7)
+ if (base::win::GetVersion() < base::win::VERSION_WIN7)
return;
ScopedComPtr<ITaskbarList3> taskbar;
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 03ffd56..df3f46d 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -24,7 +24,7 @@
#include "base/string_number_conversions.h"
#include "base/string_split.h"
#include "base/utf_string_conversions.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/browser/extensions/extension_updater.h"
#include "chrome/browser/importer/importer.h"
@@ -439,7 +439,7 @@ bool DecodeImportParams(const std::string& encoded, int* browser_type,
void FirstRun::PlatformSetup() {
FirstRun::CreateChromeDesktopShortcut();
// Windows 7 has deprecated the quick launch bar.
- if (win_util::GetWinVersion() < win_util::WINVERSION_WIN7)
+ if (base::win::GetVersion() < base::win::VERSION_WIN7)
CreateChromeQuickLaunchShortcut();
}
diff --git a/chrome/browser/geolocation/wifi_data_provider_win.cc b/chrome/browser/geolocation/wifi_data_provider_win.cc
index cfc2636..2dfb06b 100644
--- a/chrome/browser/geolocation/wifi_data_provider_win.cc
+++ b/chrome/browser/geolocation/wifi_data_provider_win.cc
@@ -26,8 +26,9 @@
#include <windows.h>
#include <winioctl.h>
#include <wlanapi.h>
+
#include "base/utf_string_conversions.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/geolocation/wifi_data_provider_common.h"
#include "chrome/browser/geolocation/wifi_data_provider_common_win.h"
@@ -194,7 +195,7 @@ WindowsWlanApi::~WindowsWlanApi() {
}
WindowsWlanApi* WindowsWlanApi::Create() {
- if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA)
+ if (base::win::GetVersion() < base::win::VERSION_VISTA)
return NULL;
// We use an absolute path to load the DLL to avoid DLL preloading attacks.
string16 system_directory;
diff --git a/chrome/browser/google/google_update.cc b/chrome/browser/google/google_update.cc
index 8aed252..cb68832 100644
--- a/chrome/browser/google/google_update.cc
+++ b/chrome/browser/google/google_update.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -13,7 +13,7 @@
#include "base/string_util.h"
#include "base/task.h"
#include "base/thread.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
@@ -63,7 +63,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 (base::win::GetVersion() >= base::win::VERSION_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 ef93a52..2d6d319 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.cc
@@ -26,7 +26,7 @@
#include "base/time.h"
#include "base/values.h"
#include "base/utf_string_conversions.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/importer/importer_bridge.h"
#include "chrome/browser/importer/importer_data_types.h"
@@ -463,7 +463,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 (base::win::GetVersion() < base::win::VERSION_VISTA) {
// The Link folder name is stored in the registry.
DWORD buffer_length = sizeof(buffer);
RegKey reg_key(HKEY_CURRENT_USER,
diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc
index 12e2d2c..3614b9c 100644
--- a/chrome/browser/jumplist_win.cc
+++ b/chrome/browser/jumplist_win.cc
@@ -21,7 +21,7 @@
#include "base/string_util.h"
#include "base/thread.h"
#include "base/utf_string_conversions.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/favicon_service.h"
#include "chrome/browser/history/history.h"
@@ -390,7 +390,7 @@ bool UpdateJumpList(const wchar_t* app_id,
// JumpList is implemented only on Windows 7 or later.
// So, we should return now when this function is called on earlier versions
// of Windows.
- if (win_util::GetWinVersion() < win_util::WINVERSION_WIN7)
+ if (base::win::GetVersion() < base::win::VERSION_WIN7)
return true;
// Create an ICustomDestinationList object and attach it to our application.
@@ -579,7 +579,7 @@ JumpList::~JumpList() {
// static
bool JumpList::Enabled() {
- return (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7 &&
+ return (base::win::GetVersion() >= base::win::VERSION_WIN7 &&
!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableCustomJumpList));
}
@@ -590,7 +590,7 @@ bool JumpList::AddObserver(Profile* profile) {
// When we add this object to the observer list, we save the pointer to this
// TabRestoreService object. This pointer is used when we remove this object
// from the observer list.
- if (win_util::GetWinVersion() < win_util::WINVERSION_WIN7 || !profile)
+ if (base::win::GetVersion() < base::win::VERSION_WIN7 || !profile)
return false;
TabRestoreService* tab_restore_service = profile->GetTabRestoreService();
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index 9b1c7d3..98e6729 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -5,9 +5,9 @@
#include "chrome/browser/shell_integration.h"
#include <windows.h>
-#include <propvarutil.h>
-#include <shlobj.h>
#include <shobjidl.h>
+#include <propkey.h>
+#include <propvarutil.h>
#include "base/command_line.h"
#include "base/file_util.h"
@@ -19,6 +19,7 @@
#include "base/task.h"
#include "base/utf_string_conversions.h"
#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_constants.h"
@@ -249,7 +250,7 @@ bool MigrateChromiumShortcutsTask::GetShortcutAppId(
PROPVARIANT appid_value;
PropVariantInit(&appid_value);
- if (FAILED(property_store->GetValue(win_util::kPKEYAppUserModelID,
+ if (FAILED(property_store->GetValue(PKEY_AppUserModel_ID,
&appid_value)))
return false;
@@ -300,7 +301,7 @@ ShellIntegration::DefaultBrowserState 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 (base::win::GetVersion() >= base::win::VERSION_VISTA) {
IApplicationAssociationRegistration* pAAR;
HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
NULL, CLSCTX_INPROC, __uuidof(IApplicationAssociationRegistration),
@@ -368,7 +369,7 @@ ShellIntegration::DefaultBrowserState ShellIntegration::IsDefaultBrowser() {
// is false.
bool ShellIntegration::IsFirefoxDefaultBrowser() {
bool ff_default = false;
- if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) {
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
std::wstring app_cmd;
RegKey key(HKEY_CURRENT_USER, ShellUtil::kRegVistaUrlPrefs, KEY_READ);
if (key.Valid() && key.ReadValue(L"Progid", &app_cmd) &&
@@ -407,7 +408,7 @@ std::wstring ShellIntegration::GetChromiumAppId(const FilePath& profile_path) {
}
void ShellIntegration::MigrateChromiumShortcuts() {
- if (win_util::GetWinVersion() < win_util::WINVERSION_WIN7)
+ if (base::win::GetVersion() < base::win::VERSION_WIN7)
return;
BrowserThread::PostTask(
diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc
index 160cbf4..c7ce959 100644
--- a/chrome/browser/views/about_chrome_view.cc
+++ b/chrome/browser/views/about_chrome_view.cc
@@ -14,6 +14,7 @@
#include "base/i18n/rtl.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/metrics/user_metrics.h"
@@ -524,12 +525,12 @@ void AboutChromeView::ViewHierarchyChanged(bool is_add,
// work as before - enabling UAC or installing the latest service pack
// for Vista is another option.
int service_pack_major = 0, service_pack_minor = 0;
- win_util::GetServicePackLevel(&service_pack_major, &service_pack_minor);
+ base::win::GetServicePackLevel(&service_pack_major, &service_pack_minor);
if (win_util::UserAccountControlIsEnabled() ||
- win_util::GetWinVersion() == win_util::WINVERSION_XP ||
- (win_util::GetWinVersion() == win_util::WINVERSION_VISTA &&
+ base::win::GetVersion() == base::win::VERSION_XP ||
+ (base::win::GetVersion() == base::win::VERSION_VISTA &&
service_pack_major >= 1) ||
- win_util::GetWinVersion() > win_util::WINVERSION_VISTA) {
+ base::win::GetVersion() > base::win::VERSION_VISTA) {
UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR);
// CheckForUpdate(false, ...) means don't upgrade yet.
google_updater_->CheckForUpdate(false, window());
diff --git a/chrome/browser/views/create_application_shortcut_view.cc b/chrome/browser/views/create_application_shortcut_view.cc
index 3308315..77e2ea6 100644
--- a/chrome/browser/views/create_application_shortcut_view.cc
+++ b/chrome/browser/views/create_application_shortcut_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,6 +8,7 @@
#include "app/resource_bundle.h"
#include "base/callback.h"
#include "base/utf_string_conversions.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -264,7 +265,7 @@ void CreateApplicationShortcutView::Init() {
profile->GetPrefs()->GetBoolean(prefs::kWebAppCreateInAppsMenu));
quick_launch_check_box_ = AddCheckbox(
- (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7) ?
+ (base::win::GetVersion() >= base::win::VERSION_WIN7) ?
l10n_util::GetString(IDS_PIN_TO_TASKBAR_CHKBOX) :
l10n_util::GetString(IDS_CREATE_SHORTCUTS_QUICK_LAUNCH_BAR_CHKBOX),
profile->GetPrefs()->GetBoolean(prefs::kWebAppCreateInQuickLaunchBar));
diff --git a/chrome/browser/views/shell_dialogs_win.cc b/chrome/browser/views/shell_dialogs_win.cc
index 1a4d04a..e8ec6e8 100644
--- a/chrome/browser/views/shell_dialogs_win.cc
+++ b/chrome/browser/views/shell_dialogs_win.cc
@@ -19,7 +19,7 @@
#include "base/string_split.h"
#include "base/thread.h"
#include "base/utf_string_conversions.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/browser_thread.h"
#include "gfx/font.h"
#include "grit/app_strings.h"
@@ -277,7 +277,7 @@ bool SaveFileAsWithFilter(HWND owner,
save_as.lpstrDefExt = &def_ext[0];
save_as.lCustData = NULL;
- if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) {
+ if (base::win::GetVersion() < base::win::VERSION_VISTA) {
// The save as on Windows XP remembers its last position,
// and if the screen resolution changed, it will be off screen.
save_as.Flags |= OFN_ENABLEHOOK;
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc
index 7923771..fc385a6 100644
--- a/chrome/browser/web_applications/web_app.cc
+++ b/chrome/browser/web_applications/web_app.cc
@@ -21,6 +21,7 @@
#include "base/thread.h"
#include "base/scoped_ptr.h"
#include "base/utf_string_conversions.h"
+#include "base/win/windows_version.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/download/download_util.h"
#include "chrome/browser/profile.h"
@@ -293,9 +294,9 @@ bool CreateShortcutTask::CreateShortcut() {
shortcut_info_.create_in_quick_launch_bar,
// For Win7, create_in_quick_launch_bar means pinning to taskbar. Use
// base::PATH_START as a flag for this case.
- (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7) ?
+ (base::win::GetVersion() >= base::win::VERSION_WIN7) ?
base::PATH_START : base::DIR_APP_DATA,
- (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7) ?
+ (base::win::GetVersion() >= base::win::VERSION_WIN7) ?
NULL : L"Microsoft\\Internet Explorer\\Quick Launch"
}
};
@@ -323,7 +324,7 @@ bool CreateShortcutTask::CreateShortcut() {
bool pin_to_taskbar =
shortcut_info_.create_in_quick_launch_bar &&
- (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7);
+ (base::win::GetVersion() >= base::win::VERSION_WIN7);
// For Win7's pinning support, any shortcut could be used. So we only create
// the shortcut file when there is no shortcut file will be created. That is,
@@ -577,7 +578,7 @@ void UpdateShortcutWorker::CheckExistingShortcuts() {
shortcut_info_.create_in_quick_launch_bar,
// For Win7, create_in_quick_launch_bar means pinning to taskbar.
base::DIR_APP_DATA,
- (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7) ?
+ (base::win::GetVersion() >= base::win::VERSION_WIN7) ?
L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar" :
L"Microsoft\\Internet Explorer\\Quick Launch"
}
diff --git a/chrome/common/sandbox_policy.cc b/chrome/common/sandbox_policy.cc
index 894778e..a5667af 100644
--- a/chrome/common/sandbox_policy.cc
+++ b/chrome/common/sandbox_policy.cc
@@ -17,7 +17,7 @@
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/trace_event.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/common/child_process_info.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
@@ -228,7 +228,7 @@ bool ApplyPolicyForUntrustedPlugin(sandbox::TargetPolicy* policy) {
policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0);
sandbox::TokenLevel initial_token = sandbox::USER_UNPROTECTED;
- if (win_util::GetWinVersion() > win_util::WINVERSION_XP) {
+ if (base::win::GetVersion() > base::win::VERSION_XP) {
// On 2003/Vista the initial token has to be restricted if the main token
// is restricted.
initial_token = sandbox::USER_RESTRICTED_SAME_ACCESS;
@@ -279,7 +279,7 @@ bool ApplyPolicyForUntrustedPlugin(sandbox::TargetPolicy* policy) {
policy))
return false;
- if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) {
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
if (!AddKeyAndSubkeys(L"HKEY_CURRENT_USER\\SOFTWARE\\AppDataLow",
sandbox::TargetPolicy::REG_ALLOW_ANY,
policy))
@@ -343,7 +343,7 @@ bool ApplyPolicyForBuiltInFlashPlugin(sandbox::TargetPolicy* policy) {
sandbox::TokenLevel initial_token = sandbox::USER_UNPROTECTED;
- if (win_util::GetWinVersion() > win_util::WINVERSION_XP)
+ if (base::win::GetVersion() > base::win::VERSION_XP)
initial_token = sandbox::USER_RESTRICTED_SAME_ACCESS;
policy->SetTokenLevel(initial_token, sandbox::USER_LIMITED);
@@ -417,7 +417,7 @@ void AddPolicyForRenderer(sandbox::TargetPolicy* policy,
policy->SetJobLevel(sandbox::JOB_LOCKDOWN, 0);
sandbox::TokenLevel initial_token = sandbox::USER_UNPROTECTED;
- if (win_util::GetWinVersion() > win_util::WINVERSION_XP) {
+ if (base::win::GetVersion() > base::win::VERSION_XP) {
// On 2003/Vista the initial token has to be restricted if the main
// token is restricted.
initial_token = sandbox::USER_RESTRICTED_SAME_ACCESS;
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index 9329215..7b674f2 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -20,7 +20,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_switches.h"
#include "chrome/installer/setup/install.h"
#include "chrome/installer/setup/setup_constants.h"
@@ -677,7 +677,7 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
return exit_code;
if (system_install && !IsUserAnAdmin()) {
- if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA &&
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA &&
!parsed_command_line.HasSwitch(installer_util::switches::kRunAsAdmin)) {
std::wstring exe = parsed_command_line.GetProgram().value();
std::wstring params(command_line);
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index 4822aa1..9ab8aab 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -12,7 +12,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/result_codes.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
@@ -468,7 +468,7 @@ installer_util::InstallStatus installer_setup::UninstallChrome(
if (remove_all &&
(!suffix.empty() || CurrentUserHasDefaultBrowser(system_uninstall)) &&
!::IsUserAnAdmin() &&
- (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) &&
+ (base::win::GetVersion() >= base::win::VERSION_VISTA) &&
!cmd_line.HasSwitch(installer_util::switches::kRunAsAdmin)) {
std::wstring exe = cmd_line.GetProgram().value();
std::wstring params(cmd_params);
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;
diff --git a/chrome/renderer/pepper_widget.cc b/chrome/renderer/pepper_widget.cc
index 9f05f2b..ba37f87 100644
--- a/chrome/renderer/pepper_widget.cc
+++ b/chrome/renderer/pepper_widget.cc
@@ -14,7 +14,7 @@
#include "webkit/glue/plugins/webplugin_delegate.h"
#if defined(OS_WIN)
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#endif
static int g_next_id;
@@ -65,7 +65,7 @@ NPError NPPaintWidget(NPP instance,
iter->second->Paint(gdc, *dirty);
#if defined(OS_WIN)
- if (win_util::GetWinVersion() == win_util::WINVERSION_XP) {
+ if (base::win::GetVersion() == base::win::VERSION_XP) {
gdc->canvas()->getTopPlatformDevice().makeOpaque(
dirty->left, dirty->top, dirty->right - dirty->left,
dirty->bottom - dirty->top);
diff --git a/chrome/test/mini_installer_test/test.cc b/chrome/test/mini_installer_test/test.cc
index 23c1682..bdc1b29 100644
--- a/chrome/test/mini_installer_test/test.cc
+++ b/chrome/test/mini_installer_test/test.cc
@@ -6,7 +6,7 @@
#include "base/file_path.h"
#include "base/platform_thread.h"
#include "base/scoped_ptr.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/util_constants.h"
@@ -51,7 +51,7 @@ class MiniInstallTest : public testing::Test {
build = L"latest";
force_tests_ = cmd->HasSwitch(switches::kInstallerTestForce);
chrome_frame_ = cmd->HasSwitch(installer_util::switches::kChromeFrame);
- if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA ||
+ if (base::win::GetVersion() < base::win::VERSION_VISTA ||
force_tests_) {
CleanTheSystem();
// Separate the test output from cleaning output
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 58a1007..4459e87 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -50,7 +50,7 @@
#include "net/base/net_util.h"
#if defined(OS_WIN)
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#endif
@@ -940,7 +940,7 @@ void UITest::StartHttpServerWithPort(const FilePath& root_directory,
// it will mess up with the command window and cause conhost.exe to crash. To
// work around this, we start the http server on the background mode.
#if defined(OS_WIN)
- if (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7)
+ if (base::win::GetVersion() >= base::win::VERSION_WIN7)
cmd_line->AppendSwitch("run_background");
#endif
diff --git a/chrome/tools/crash_service/crash_service.cc b/chrome/tools/crash_service/crash_service.cc
index fb2fa49..dcf1daa 100644
--- a/chrome/tools/crash_service/crash_service.cc
+++ b/chrome/tools/crash_service/crash_service.cc
@@ -14,7 +14,7 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "breakpad/src/client/windows/crash_generation/client_info.h"
#include "breakpad/src/client/windows/crash_generation/crash_generation_server.h"
#include "breakpad/src/client/windows/sender/crash_report_sender.h"
@@ -213,7 +213,7 @@ bool CrashService::Initialize(const std::wstring& command_line) {
SECURITY_ATTRIBUTES security_attributes = {0};
SECURITY_ATTRIBUTES* security_attributes_actual = NULL;
- if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) {
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
SECURITY_DESCRIPTOR* security_descriptor =
reinterpret_cast<SECURITY_DESCRIPTOR*>(
GetSecurityDescriptorForLowIntegrity());