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

Side by Side Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 8760011: Move the ProcessType enum out to its own file. This is in preparation for getting rid of ChildPro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 9 years 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 static bool RunningOnWOW64() { 101 static bool RunningOnWOW64() {
102 #if defined(OS_WIN) 102 #if defined(OS_WIN)
103 return (base::win::OSInfo::GetInstance()->wow64_status() == 103 return (base::win::OSInfo::GetInstance()->wow64_status() ==
104 base::win::OSInfo::WOW64_ENABLED); 104 base::win::OSInfo::WOW64_ENABLED);
105 #else 105 #else
106 return false; 106 return false;
107 #endif 107 #endif
108 } 108 }
109 109
110 NaClProcessHost::NaClProcessHost(const std::wstring& url) 110 NaClProcessHost::NaClProcessHost(const std::wstring& url)
111 : BrowserChildProcessHost(NACL_LOADER_PROCESS), 111 : BrowserChildProcessHost(content::PROCESS_TYPE_NACL_LOADER),
112 reply_msg_(NULL), 112 reply_msg_(NULL),
113 internal_(new NaClInternal()), 113 internal_(new NaClInternal()),
114 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 114 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
115 set_name(WideToUTF16Hack(url)); 115 set_name(WideToUTF16Hack(url));
116 } 116 }
117 117
118 NaClProcessHost::~NaClProcessHost() { 118 NaClProcessHost::~NaClProcessHost() {
119 for (size_t i = 0; i < internal_->sockets_for_renderer.size(); i++) { 119 for (size_t i = 0; i < internal_->sockets_for_renderer.size(); i++) {
120 if (nacl::Close(internal_->sockets_for_renderer[i]) != 0) { 120 if (nacl::Close(internal_->sockets_for_renderer[i]) != 0) {
121 LOG(ERROR) << "nacl::Close() failed"; 121 LOG(ERROR) << "nacl::Close() failed";
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 } 513 }
514 514
515 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { 515 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) {
516 NOTREACHED() << "Invalid message with type = " << msg.type(); 516 NOTREACHED() << "Invalid message with type = " << msg.type();
517 return false; 517 return false;
518 } 518 }
519 519
520 bool NaClProcessHost::CanShutdown() { 520 bool NaClProcessHost::CanShutdown() {
521 return true; 521 return true;
522 } 522 }
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_broker_service_win.cc ('k') | chrome/browser/renderer_host/chrome_render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698