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

Side by Side Diff: chrome/browser/nacl_host/nacl_process_host.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/memory_details_win.cc ('k') | chrome/browser/ui/views/about_chrome_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/nacl_host/nacl_process_host.h" 7 #include "chrome/browser/nacl_host/nacl_process_host.h"
8 8
9 #if defined(OS_POSIX) 9 #if defined(OS_POSIX)
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 std::vector<nacl::Handle> sockets_for_sel_ldr; 49 std::vector<nacl::Handle> sockets_for_sel_ldr;
50 }; 50 };
51 51
52 NaClProcessHost::NaClProcessHost(const std::wstring& url) 52 NaClProcessHost::NaClProcessHost(const std::wstring& url)
53 : BrowserChildProcessHost(NACL_LOADER_PROCESS, NULL), 53 : BrowserChildProcessHost(NACL_LOADER_PROCESS, NULL),
54 reply_msg_(NULL), 54 reply_msg_(NULL),
55 internal_(new NaClInternal()), 55 internal_(new NaClInternal()),
56 running_on_wow64_(false) { 56 running_on_wow64_(false) {
57 set_name(url); 57 set_name(url);
58 #if defined(OS_WIN) 58 #if defined(OS_WIN)
59 running_on_wow64_ = (base::win::GetWOW64Status() == base::win::WOW64_ENABLED); 59 running_on_wow64_ = (base::win::OSInfo::GetInstance()->wow64_status() ==
60 base::win::OSInfo::WOW64_ENABLED);
60 #endif 61 #endif
61 } 62 }
62 63
63 NaClProcessHost::~NaClProcessHost() { 64 NaClProcessHost::~NaClProcessHost() {
64 if (!reply_msg_) 65 if (!reply_msg_)
65 return; 66 return;
66 67
67 // nacl::Close() is not available at link time if DISABLE_NACL is 68 // nacl::Close() is not available at link time if DISABLE_NACL is
68 // defined, but we still compile a bunch of other code from this 69 // defined, but we still compile a bunch of other code from this
69 // file anyway. TODO(mseaborn): Make this less messy. 70 // file anyway. TODO(mseaborn): Make this less messy.
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 293 }
293 294
294 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { 295 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) {
295 NOTREACHED() << "Invalid message with type = " << msg.type(); 296 NOTREACHED() << "Invalid message with type = " << msg.type();
296 return false; 297 return false;
297 } 298 }
298 299
299 bool NaClProcessHost::CanShutdown() { 300 bool NaClProcessHost::CanShutdown() {
300 return true; 301 return true;
301 } 302 }
OLDNEW
« no previous file with comments | « chrome/browser/memory_details_win.cc ('k') | chrome/browser/ui/views/about_chrome_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698