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

Unified Diff: sandbox/tests/common/controller.cc

Issue 6610029: Create a "GetWOW64Status()" utility function and make the rest of the codebas... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
« base/win/windows_version.cc ('K') | « sandbox/src/service_resolver_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/tests/common/controller.cc
===================================================================
--- sandbox/tests/common/controller.cc (revision 76817)
+++ sandbox/tests/common/controller.cc (working copy)
@@ -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 @@
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 @@
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);
« base/win/windows_version.cc ('K') | « sandbox/src/service_resolver_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698