Skip to content

Commit

Permalink
Move GetWindowsArchitecture() to windows_version.h.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pkasting@chromium.org committed Mar 4, 2011
1 parent 60d470a commit 6e5e68d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 26 deletions.
11 changes: 0 additions & 11 deletions base/win/win_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
14 changes: 0 additions & 14 deletions base/win/win_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 11 additions & 0 deletions base/win/windows_version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
14 changes: 14 additions & 0 deletions base/win/windows_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/memory_details_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/win/scoped_handle.h"
#include "base/win/win_util.h"
#include "base/win/windows_version.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/url_constants.h"
Expand Down

0 comments on commit 6e5e68d

Please sign in to comment.