diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 19:26:05 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 19:26:05 +0000 |
commit | 6e5e68de1f394c1ca53f4017f8bcb82d7cd8168c (patch) | |
tree | 20e2bc5e399c1c0cf6a322322c5a03861b8febb8 /base/win | |
parent | 60d470a3b90a6b91123b31f5c3de0cfaa668b075 (diff) | |
download | chromium_src-6e5e68de1f394c1ca53f4017f8bcb82d7cd8168c.zip chromium_src-6e5e68de1f394c1ca53f4017f8bcb82d7cd8168c.tar.gz chromium_src-6e5e68de1f394c1ca53f4017f8bcb82d7cd8168c.tar.bz2 |
Move GetWindowsArchitecture() to windows_version.h.
BUG=none
TEST=none
TBR=brettw
Review URL: http://codereview.chromium.org/6624025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76947 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/win')
-rw-r--r-- | base/win/win_util.cc | 11 | ||||
-rw-r--r-- | base/win/win_util.h | 14 | ||||
-rw-r--r-- | base/win/windows_version.cc | 11 | ||||
-rw-r--r-- | base/win/windows_version.h | 14 |
4 files changed, 25 insertions, 25 deletions
diff --git a/base/win/win_util.cc b/base/win/win_util.cc index 93c086a..76d8c5d 100644 --- a/base/win/win_util.cc +++ b/base/win/win_util.cc @@ -100,17 +100,6 @@ bool UserAccountControlIsEnabled() { return (uac_enabled != 0); } -WindowsArchitecture GetWindowsArchitecture() { - SYSTEM_INFO system_info; - GetNativeSystemInfo(&system_info); - switch (system_info.wProcessorArchitecture) { - case PROCESSOR_ARCHITECTURE_INTEL: return X86_ARCHITECTURE; - case PROCESSOR_ARCHITECTURE_AMD64: return X64_ARCHITECTURE; - case PROCESSOR_ARCHITECTURE_IA64: return IA64_ARCHITECTURE; - default: return OTHER_ARCHITECTURE; - } -} - bool SetAppIdForPropertyStore(IPropertyStore* property_store, const wchar_t* app_id) { DCHECK(property_store); diff --git a/base/win/win_util.h b/base/win/win_util.h index 3520622..c9bdce80 100644 --- a/base/win/win_util.h +++ b/base/win/win_util.h @@ -58,20 +58,6 @@ bool IsAltPressed(); // if the OS is Vista or later. bool UserAccountControlIsEnabled(); -enum WindowsArchitecture { - X86_ARCHITECTURE, - X64_ARCHITECTURE, - IA64_ARCHITECTURE, - OTHER_ARCHITECTURE, -}; - -// Returns the processor architecture this copy of Windows natively uses. -// For example, given an x64-capable processor, we have three possibilities: -// 32-bit Chrome running on 32-bit Windows: X86_ARCHITECTURE -// 32-bit Chrome running on 64-bit Windows via WOW64: X64_ARCHITECTURE -// 64-bit Chrome running on 64-bit Windows: X64_ARCHITECTURE -WindowsArchitecture GetWindowsArchitecture(); - // Sets the application id in given IPropertyStore. The function is intended // for tagging application/chromium shortcut, browser window and jump list for // Win7. diff --git a/base/win/windows_version.cc b/base/win/windows_version.cc index 9abf1d2..d53148d 100644 --- a/base/win/windows_version.cc +++ b/base/win/windows_version.cc @@ -68,6 +68,17 @@ void GetServicePackLevel(int* major, int* minor) { *minor = service_pack_minor; } +WindowsArchitecture GetWindowsArchitecture() { + SYSTEM_INFO system_info; + GetNativeSystemInfo(&system_info); + switch (system_info.wProcessorArchitecture) { + case PROCESSOR_ARCHITECTURE_INTEL: return X86_ARCHITECTURE; + case PROCESSOR_ARCHITECTURE_AMD64: return X64_ARCHITECTURE; + case PROCESSOR_ARCHITECTURE_IA64: return IA64_ARCHITECTURE; + default: return OTHER_ARCHITECTURE; + } +} + WOW64Status GetWOW64Status() { static WOW64Status wow64_status = GetWOW64StatusForProcess(GetCurrentProcess()); diff --git a/base/win/windows_version.h b/base/win/windows_version.h index bdd783d..df3cc35 100644 --- a/base/win/windows_version.h +++ b/base/win/windows_version.h @@ -30,6 +30,20 @@ Version GetVersion(); // Returns the major and minor version of the service pack installed. void GetServicePackLevel(int* major, int* minor); +enum WindowsArchitecture { + X86_ARCHITECTURE, + X64_ARCHITECTURE, + IA64_ARCHITECTURE, + OTHER_ARCHITECTURE, +}; + +// Returns the processor architecture this copy of Windows natively uses. +// For example, given an x64-capable processor, we have three possibilities: +// 32-bit Chrome running on 32-bit Windows: X86_ARCHITECTURE +// 32-bit Chrome running on 64-bit Windows via WOW64: X64_ARCHITECTURE +// 64-bit Chrome running on 64-bit Windows: X64_ARCHITECTURE +WindowsArchitecture GetWindowsArchitecture(); + enum WOW64Status { WOW64_DISABLED, WOW64_ENABLED, |