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

Side by Side Diff: chrome/nacl/nacl_listener.cc

Issue 7547002: Reenable the --enable-nacl-debug switch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/nacl/nacl_listener.h ('k') | chrome/nacl/nacl_main.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 "chrome/nacl/nacl_listener.h" 5 #include "chrome/nacl/nacl_listener.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 } // namespace 69 } // namespace
70 #endif // defined(OS_MACOSX) 70 #endif // defined(OS_MACOSX)
71 71
72 extern "C" void NaClMainForChromium(int handle_count, 72 extern "C" void NaClMainForChromium(int handle_count,
73 const NaClHandle* handles, 73 const NaClHandle* handles,
74 int debug); 74 int debug);
75 extern "C" void NaClSetIrtFileDesc(int fd); 75 extern "C" void NaClSetIrtFileDesc(int fd);
76 76
77 NaClListener::NaClListener() {} 77 NaClListener::NaClListener() : debug_enabled_(false) {}
78 78
79 NaClListener::~NaClListener() {} 79 NaClListener::~NaClListener() {}
80 80
81 void NaClListener::Listen() { 81 void NaClListener::Listen() {
82 std::string channel_name = 82 std::string channel_name =
83 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 83 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
84 switches::kProcessChannelID); 84 switches::kProcessChannelID);
85 IPC::Channel channel(channel_name, IPC::Channel::MODE_CLIENT, this); 85 IPC::Channel channel(channel_name, IPC::Channel::MODE_CLIENT, this);
86 CHECK(channel.Connect()); 86 CHECK(channel.Connect());
87 MessageLoop::current()->Run(); 87 MessageLoop::current()->Run();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 int irt_desc = irt_handle; 124 int irt_desc = irt_handle;
125 #endif 125 #endif
126 NaClSetIrtFileDesc(irt_desc); 126 NaClSetIrtFileDesc(irt_desc);
127 } 127 }
128 128
129 scoped_array<NaClHandle> array(new NaClHandle[handles.size()]); 129 scoped_array<NaClHandle> array(new NaClHandle[handles.size()]);
130 for (size_t i = 0; i < handles.size(); i++) { 130 for (size_t i = 0; i < handles.size(); i++) {
131 array[i] = nacl::ToNativeHandle(handles[i]); 131 array[i] = nacl::ToNativeHandle(handles[i]);
132 } 132 }
133 NaClMainForChromium(static_cast<int>(handles.size()), array.get(), 133 NaClMainForChromium(static_cast<int>(handles.size()), array.get(),
134 false /* debug */); 134 debug_enabled_);
135 NOTREACHED(); 135 NOTREACHED();
136 } 136 }
OLDNEW
« no previous file with comments | « chrome/nacl/nacl_listener.h ('k') | chrome/nacl/nacl_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698