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

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

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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/nacl_host/nacl_process_host.h ('k') | chrome/browser/plugin_data_remover.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 return; 275 return;
276 } 276 }
277 memory_fd.auto_close = true; 277 memory_fd.auto_close = true;
278 handles_for_sel_ldr.push_back(memory_fd); 278 handles_for_sel_ldr.push_back(memory_fd);
279 #endif 279 #endif
280 280
281 Send(new NaClProcessMsg_Start(handles_for_sel_ldr)); 281 Send(new NaClProcessMsg_Start(handles_for_sel_ldr));
282 sockets_for_sel_ldr_.clear(); 282 sockets_for_sel_ldr_.clear();
283 } 283 }
284 284
285 void NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { 285 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) {
286 NOTREACHED() << "Invalid message with type = " << msg.type(); 286 NOTREACHED() << "Invalid message with type = " << msg.type();
287 return false;
287 } 288 }
288 289
289 bool NaClProcessHost::CanShutdown() { 290 bool NaClProcessHost::CanShutdown() {
290 return true; 291 return true;
291 } 292 }
292 293
293 #if defined(OS_WIN) 294 #if defined(OS_WIN)
294 // TODO(gregoryd): invoke CheckIsWow64 only once, not for each NaClProcessHost 295 // TODO(gregoryd): invoke CheckIsWow64 only once, not for each NaClProcessHost
295 typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); 296 typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
296 void NaClProcessHost::CheckIsWow64() { 297 void NaClProcessHost::CheckIsWow64() {
297 LPFN_ISWOW64PROCESS fnIsWow64Process; 298 LPFN_ISWOW64PROCESS fnIsWow64Process;
298 299
299 fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress( 300 fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
300 GetModuleHandle(TEXT("kernel32")), 301 GetModuleHandle(TEXT("kernel32")),
301 "IsWow64Process"); 302 "IsWow64Process");
302 303
303 if (fnIsWow64Process != NULL) { 304 if (fnIsWow64Process != NULL) {
304 BOOL bIsWow64 = FALSE; 305 BOOL bIsWow64 = FALSE;
305 if (fnIsWow64Process(GetCurrentProcess(),&bIsWow64)) { 306 if (fnIsWow64Process(GetCurrentProcess(),&bIsWow64)) {
306 if (bIsWow64) { 307 if (bIsWow64) {
307 running_on_wow64_ = true; 308 running_on_wow64_ = true;
308 } 309 }
309 } 310 }
310 } 311 }
311 } 312 }
312 #endif 313 #endif
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.h ('k') | chrome/browser/plugin_data_remover.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698