summaryrefslogtreecommitdiffstats
path: root/base/file_util_win.cc
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 /base/file_util_win.cc
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 'base/file_util_win.cc')
-rw-r--r--base/file_util_win.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index c601f46..d750749 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -23,6 +23,7 @@
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "base/win_util.h"
+#include "base/win/windows_version.h"
namespace file_util {
@@ -261,7 +262,7 @@ bool CopyDirectory(const FilePath& from_path, const FilePath& to_path,
if (!PathExists(to_path)) {
// Except that Vista fails to do that, and instead do a recursive copy if
// the target directory doesn't exist.
- if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA)
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA)
CreateDirectory(to_path);
else
ShellCopy(from_path, to_path, false);
@@ -402,7 +403,7 @@ bool CreateShortcutLink(const wchar_t *source, const wchar_t *destination,
if (icon && FAILED(i_shell_link->SetIconLocation(icon, icon_index)))
return false;
- if (app_id && (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7)) {
+ if (app_id && (base::win::GetVersion() >= base::win::VERSION_WIN7)) {
ScopedComPtr<IPropertyStore> property_store;
if (FAILED(property_store.QueryFrom(i_shell_link)))
return false;
@@ -452,7 +453,7 @@ bool UpdateShortcutLink(const wchar_t *source, const wchar_t *destination,
if (icon && FAILED(i_shell_link->SetIconLocation(icon, icon_index)))
return false;
- if (app_id && win_util::GetWinVersion() >= win_util::WINVERSION_WIN7) {
+ if (app_id && base::win::GetVersion() >= base::win::VERSION_WIN7) {
ScopedComPtr<IPropertyStore> property_store;
if (FAILED(property_store.QueryFrom(i_shell_link)))
return false;
@@ -467,7 +468,7 @@ bool UpdateShortcutLink(const wchar_t *source, const wchar_t *destination,
bool TaskbarPinShortcutLink(const wchar_t* shortcut) {
// "Pin to taskbar" is only supported after Win7.
- if (win_util::GetWinVersion() < win_util::WINVERSION_WIN7)
+ if (base::win::GetVersion() < base::win::VERSION_WIN7)
return false;
int result = reinterpret_cast<int>(ShellExecute(NULL, L"taskbarpin", shortcut,
@@ -477,7 +478,7 @@ bool TaskbarPinShortcutLink(const wchar_t* shortcut) {
bool TaskbarUnpinShortcutLink(const wchar_t* shortcut) {
// "Unpin from taskbar" is only supported after Win7.
- if (win_util::GetWinVersion() < win_util::WINVERSION_WIN7)
+ if (base::win::GetVersion() < base::win::VERSION_WIN7)
return false;
int result = reinterpret_cast<int>(ShellExecute(NULL, L"taskbarunpin",
@@ -1007,7 +1008,7 @@ bool NormalizeToNativeFilePath(const FilePath& path, FilePath* nt_path) {
bool PreReadImage(const wchar_t* file_path, size_t size_to_read,
size_t step_size) {
- if (win_util::GetWinVersion() > win_util::WINVERSION_XP) {
+ if (base::win::GetVersion() > base::win::VERSION_XP) {
// Vista+ branch. On these OSes, the forced reads through the DLL actually
// slows warm starts. The solution is to sequentially read file contents
// with an optional cap on total amount to read.