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

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

Issue 6713107: Make the windows_version.h functions threadsafe by using a singleton. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
Index: sandbox/tests/common/controller.cc
===================================================================
--- sandbox/tests/common/controller.cc (revision 80667)
+++ sandbox/tests/common/controller.cc (working copy)
@@ -55,9 +55,10 @@
namespace sandbox {
std::wstring MakePathToSys(const wchar_t* name, bool is_obj_man_path) {
- if (base::win::GetWOW64Status() == base::win::WOW64_ENABLED)
- return MakePathToSysWow64(name, is_obj_man_path);
- return MakePathToSys32(name, is_obj_man_path);
+ return (base::win::OSInfo::GetInstance()->wow64_status() ==
+ base::win::OSInfo::WOW64_ENABLED) ?
rvargas (doing something else) 2011/04/06 23:28:05 nit: The previous structure was easier to read...
Peter Kasting 2011/04/07 00:29:19 Yeah, having to linebreak + indent the conditional
+ MakePathToSysWow64(name, is_obj_man_path) :
+ MakePathToSys32(name, is_obj_man_path);
}
BrokerServices* GetBroker() {
@@ -138,7 +139,8 @@
if (!AddRule(TargetPolicy::SUBSYS_FILES, semantics, win32_path.c_str()))
return false;
- if (base::win::GetWOW64Status() != base::win::WOW64_ENABLED)
+ if (base::win::OSInfo::GetInstance()->wow64_status() !=
+ base::win::OSInfo::WOW64_ENABLED)
return true;
win32_path = MakePathToSysWow64(pattern, false);

Powered by Google App Engine
This is Rietveld 408576698