Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: ui/base/win/shell.cc

Issue 2909943003: Removing useless Win7 checks + standardize its use (Closed)
Patch Set: Various nits Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/base/win/shell.cc
diff --git a/ui/base/win/shell.cc b/ui/base/win/shell.cc
index 0cace9bb1ce42b1e7e665e4095a0e4e7a70452a6..dd8459e9b2e10467cff1a7f296b6f9d0f56b308d 100644
--- a/ui/base/win/shell.cc
+++ b/ui/base/win/shell.cc
@@ -19,7 +19,6 @@
#include "base/threading/thread_restrictions.h"
#include "base/win/scoped_comptr.h"
#include "base/win/win_util.h"
-#include "base/win/windows_version.h"
#include "ui/base/ui_base_switches.h"
namespace ui {
@@ -99,10 +98,6 @@ bool OpenFolderViaShell(const base::FilePath& full_path) {
bool PreventWindowFromPinning(HWND hwnd) {
DCHECK(hwnd);
- // This functionality is only available on Win7+.
- if (base::win::GetVersion() < base::win::VERSION_WIN7)
- return false;
-
base::win::ScopedComPtr<IPropertyStore> pps;
if (FAILED(
SHGetPropertyStoreForWindow(hwnd, IID_PPV_ARGS(pps.GetAddressOf()))))
@@ -122,10 +117,6 @@ void SetAppDetailsForWindow(const base::string16& app_id,
HWND hwnd) {
DCHECK(hwnd);
- // This functionality is only available on Win7+.
- if (base::win::GetVersion() < base::win::VERSION_WIN7)
- return;
-
base::win::ScopedComPtr<IPropertyStore> pps;
if (FAILED(
SHGetPropertyStoreForWindow(hwnd, IID_PPV_ARGS(pps.GetAddressOf()))))
@@ -176,10 +167,6 @@ void SetRelaunchDetailsForWindow(const base::string16& relaunch_command,
void ClearWindowPropertyStore(HWND hwnd) {
DCHECK(hwnd);
- // This functionality is only available on Win7+.
- if (base::win::GetVersion() < base::win::VERSION_WIN7)
- return;
-
base::win::ScopedComPtr<IPropertyStore> pps;
if (FAILED(
SHGetPropertyStoreForWindow(hwnd, IID_PPV_ARGS(pps.GetAddressOf()))))
@@ -208,10 +195,6 @@ bool IsAeroGlassEnabled() {
switches::kDisableDwmComposition))
return false;
- // Technically Aero glass works in Vista but we want to put XP and Vista
- // at the same feature level. See bug 426573.
- if (base::win::GetVersion() < base::win::VERSION_WIN7)
- return false;
// If composition is not enabled, we behave like on XP.
BOOL enabled = FALSE;
return SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled;
« no previous file with comments | « sandbox/win/src/process_mitigations_test.cc ('k') | ui/events/blink/web_input_event_builders_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698