diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 01:17:37 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 01:17:37 +0000 |
commit | 1e67c2be4d77333ab9f303c8d9fa5eb58ebc6c90 (patch) | |
tree | 80434934d6420f40ea3372dc1c148123c55f6a32 /sandbox/tests | |
parent | cf50836f5fff555ab9b8d2e961029a31514ea239 (diff) | |
download | chromium_src-1e67c2be4d77333ab9f303c8d9fa5eb58ebc6c90.zip chromium_src-1e67c2be4d77333ab9f303c8d9fa5eb58ebc6c90.tar.gz chromium_src-1e67c2be4d77333ab9f303c8d9fa5eb58ebc6c90.tar.bz2 |
Create a "GetWOW64Status()" utility function and make the rest of the codebase call it.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6610029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/tests')
-rw-r--r-- | sandbox/tests/common/controller.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sandbox/tests/common/controller.cc b/sandbox/tests/common/controller.cc index 6e0f080..7efd374 100644 --- a/sandbox/tests/common/controller.cc +++ b/sandbox/tests/common/controller.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -6,9 +6,9 @@ #include <string> +#include "base/win/windows_version.h" #include "sandbox/src/sandbox_factory.h" #include "sandbox/src/sandbox_utils.h" -#include "sandbox/src/wow64.h" namespace { @@ -55,11 +55,9 @@ std::wstring MakePathToSysWow64(const wchar_t* name, bool is_obj_man_path) { namespace sandbox { std::wstring MakePathToSys(const wchar_t* name, bool is_obj_man_path) { - Wow64 current_proc(NULL, NULL); - if (current_proc.IsWow64()) + if (base::win::GetWOW64Status() == base::win::WOW64_ENABLED) return MakePathToSysWow64(name, is_obj_man_path); - else - return MakePathToSys32(name, is_obj_man_path); + return MakePathToSys32(name, is_obj_man_path); } BrokerServices* GetBroker() { @@ -140,8 +138,7 @@ bool TestRunner::AddRuleSys32(TargetPolicy::Semantics semantics, if (!AddRule(TargetPolicy::SUBSYS_FILES, semantics, win32_path.c_str())) return false; - Wow64 current_proc(NULL, NULL); - if (!current_proc.IsWow64()) + if (base::win::GetWOW64Status() != base::win::WOW64_ENABLED) return true; win32_path = MakePathToSysWow64(pattern, false); |