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

Side by Side Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 2846293002: Make PlatformFileForTransit its own class on Windows. (Closed)
Patch Set: Change message serialization to write nothing if the handle isn't valid. Created 3 years, 7 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
« no previous file with comments | « no previous file | ipc/ipc_message_utils.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/nacl/renderer/ppb_nacl_private.h" 5 #include "components/nacl/renderer/ppb_nacl_private.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 454 }
455 } 455 }
456 } 456 }
457 457
458 IPC::PlatformFileForTransit nexe_for_transit = 458 IPC::PlatformFileForTransit nexe_for_transit =
459 IPC::InvalidPlatformFileForTransit(); 459 IPC::InvalidPlatformFileForTransit();
460 #if defined(OS_POSIX) 460 #if defined(OS_POSIX)
461 if (nexe_file_info->handle != PP_kInvalidFileHandle) 461 if (nexe_file_info->handle != PP_kInvalidFileHandle)
462 nexe_for_transit = base::FileDescriptor(nexe_file_info->handle, true); 462 nexe_for_transit = base::FileDescriptor(nexe_file_info->handle, true);
463 #elif defined(OS_WIN) 463 #elif defined(OS_WIN)
464 nexe_for_transit = IPC::PlatformFileForTransit(nexe_file_info->handle, 464 nexe_for_transit = IPC::PlatformFileForTransit(nexe_file_info->handle);
465 base::GetCurrentProcId());
466 #else 465 #else
467 # error Unsupported target platform. 466 # error Unsupported target platform.
468 #endif 467 #endif
469 468
470 std::string error_message_string; 469 std::string error_message_string;
471 NaClLaunchResult launch_result; 470 NaClLaunchResult launch_result;
472 if (!sender->Send(new NaClHostMsg_LaunchNaCl( 471 if (!sender->Send(new NaClHostMsg_LaunchNaCl(
473 NaClLaunchParams( 472 NaClLaunchParams(
474 instance_info.url.spec(), 473 instance_info.url.spec(),
475 nexe_for_transit, 474 nexe_for_transit,
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1744 // Mark the request as requesting a PNaCl bitcode file, 1743 // Mark the request as requesting a PNaCl bitcode file,
1745 // so that component updater can detect this user action. 1744 // so that component updater can detect this user action.
1746 url_request.AddHTTPHeaderField( 1745 url_request.AddHTTPHeaderField(
1747 blink::WebString::FromUTF8("Accept"), 1746 blink::WebString::FromUTF8("Accept"),
1748 blink::WebString::FromUTF8("application/x-pnacl, */*")); 1747 blink::WebString::FromUTF8("application/x-pnacl, */*"));
1749 url_request.SetRequestContext(blink::WebURLRequest::kRequestContextObject); 1748 url_request.SetRequestContext(blink::WebURLRequest::kRequestContextObject);
1750 downloader->Load(url_request); 1749 downloader->Load(url_request);
1751 } 1750 }
1752 1751
1753 } // namespace nacl 1752 } // namespace nacl
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698