summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-15 01:59:15 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-15 01:59:15 +0000
commit935aa54d9a5e2e617c61c9f8dcea398768413443 (patch)
tree3df9ec9316cd4d5b7171e5c6c869a01d823cc507 /app
parent7d1f3348c26eda2d1656860c821d335bf94d4cda (diff)
downloadchromium_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 'app')
-rw-r--r--app/animation.cc4
-rw-r--r--app/animation_unittest.cc4
-rw-r--r--app/l10n_util_unittest.cc4
-rw-r--r--app/l10n_util_win.cc8
-rw-r--r--app/resource_bundle_win.cc5
-rw-r--r--app/win_util.cc7
6 files changed, 16 insertions, 16 deletions
diff --git a/app/animation.cc b/app/animation.cc
index 2dc2bcf6..edb1232 100644
--- a/app/animation.cc
+++ b/app/animation.cc
@@ -8,7 +8,7 @@
#include "gfx/rect.h"
#if defined(OS_WIN)
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#endif
Animation::Animation(base::TimeDelta timer_interval)
@@ -90,7 +90,7 @@ void Animation::SetContainer(AnimationContainer* container) {
// static
bool Animation::ShouldRenderRichAnimation() {
#if defined(OS_WIN)
- if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) {
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
BOOL result;
// Get "Turn off all unnecessary animations" value.
if (::SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &result, 0)) {
diff --git a/app/animation_unittest.cc b/app/animation_unittest.cc
index df0b262b..280e74f 100644
--- a/app/animation_unittest.cc
+++ b/app/animation_unittest.cc
@@ -5,7 +5,7 @@
#include "app/linear_animation.h"
#include "app/test_animation_delegate.h"
#if defined(OS_WIN)
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#endif
#include "testing/gtest/include/gtest/gtest.h"
@@ -122,7 +122,7 @@ TEST_F(AnimationTest, DeleteFromEnd) {
TEST_F(AnimationTest, ShouldRenderRichAnimation) {
#if defined(OS_WIN)
- if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) {
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
BOOL result;
ASSERT_NE(
0, ::SystemParametersInfo(SPI_GETCLIENTAREAANIMATION, 0, &result, 0));
diff --git a/app/l10n_util_unittest.cc b/app/l10n_util_unittest.cc
index 85c5296..4a15903 100644
--- a/app/l10n_util_unittest.cc
+++ b/app/l10n_util_unittest.cc
@@ -22,7 +22,7 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#if defined(OS_WIN)
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
#endif
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -239,7 +239,7 @@ TEST_F(L10nUtilTest, GetAppLocale) {
EXPECT_EQ("en-US", l10n_util::GetApplicationLocale("en"));
// Amharic should be blocked unless OS is Vista or newer.
- if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) {
+ if (base::win::GetVersion() < base::win::VERSION_VISTA) {
SetICUDefaultLocale("am");
EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(""));
SetICUDefaultLocale("en-GB");
diff --git a/app/l10n_util_win.cc b/app/l10n_util_win.cc
index 4d22dd3..2f1f627 100644
--- a/app/l10n_util_win.cc
+++ b/app/l10n_util_win.cc
@@ -10,9 +10,7 @@
#include "app/l10n_util_win.h"
#include "base/i18n/rtl.h"
#include "base/string_number_conversions.h"
-//#include "base/string_util.h"
-#include "base/win_util.h"
-
+#include "base/win/windows_version.h"
#include "grit/app_locale_settings.h"
namespace {
@@ -86,7 +84,7 @@ bool IsLocaleSupportedByOS(const std::string& locale) {
// On Win XP, no Ethiopic/Amahric font is availabel out of box. We hard-coded
// 'Abyssinica SIL' in the resource bundle to use in the UI. Check
// for its presence to determine whether or not to support Amharic UI on XP.
- return (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA ||
+ return (base::win::GetVersion() >= base::win::VERSION_VISTA ||
!LowerCaseEqualsASCII(locale, "am") || IsFontPresent(L"Abyssinica SIL"));
}
@@ -102,7 +100,7 @@ bool NeedOverrideDefaultUIFont(std::wstring* override_font_family,
// we need separate ui font specifications.
int ui_font_family_id = IDS_UI_FONT_FAMILY;
int ui_font_size_scaler_id = IDS_UI_FONT_SIZE_SCALER;
- if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) {
+ if (base::win::GetVersion() < base::win::VERSION_VISTA) {
ui_font_family_id = IDS_UI_FONT_FAMILY_XP;
ui_font_size_scaler_id = IDS_UI_FONT_SIZE_SCALER_XP;
}
diff --git a/app/resource_bundle_win.cc b/app/resource_bundle_win.cc
index 6676dc6..369ee40 100644
--- a/app/resource_bundle_win.cc
+++ b/app/resource_bundle_win.cc
@@ -17,14 +17,15 @@
#include "base/resource_util.h"
#include "base/stl_util-inl.h"
#include "base/string_piece.h"
-#include "base/win_util.h"
+#include "base/win/windows_version.h"
+
#include "gfx/font.h"
namespace {
// Returns the flags that should be passed to LoadLibraryEx.
DWORD GetDataDllLoadFlags() {
- if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA)
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA)
return LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE | LOAD_LIBRARY_AS_IMAGE_RESOURCE;
return DONT_RESOLVE_DLL_REFERENCES;
diff --git a/app/win_util.cc b/app/win_util.cc
index 657c695f..5232e34 100644
--- a/app/win_util.cc
+++ b/app/win_util.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.
@@ -24,6 +24,7 @@
#include "base/scoped_handle_win.h"
#include "base/string_util.h"
#include "base/win_util.h"
+#include "base/win/windows_version.h"
#include "gfx/codec/png_codec.h"
#include "gfx/gdi_util.h"
@@ -99,7 +100,7 @@ bool IsDrag(const POINT& origin, const POINT& current) {
}
bool ShouldUseVistaFrame() {
- if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA)
+ if (base::win::GetVersion() < base::win::VERSION_VISTA)
return false;
// If composition is not enabled, we behave like on XP.
BOOL f;
@@ -545,7 +546,7 @@ gfx::Font GetWindowTitleFont() {
void SetAppIdForWindow(const std::wstring& app_id, HWND hwnd) {
// This functionality is only available on Win7+.
- if (win_util::GetWinVersion() < win_util::WINVERSION_WIN7)
+ if (base::win::GetVersion() < base::win::VERSION_WIN7)
return;
// Load Shell32.dll into memory.