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

Side by Side Diff: content/common/sandbox_win.cc

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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 | « content/common/font_list_win.cc ('k') | content/renderer/npapi/webplugin_delegate_proxy.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/common/sandbox_win.h" 5 #include "content/common/sandbox_win.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 688
689 base::HandlesToInheritVector handles = handles_to_inherit; 689 base::HandlesToInheritVector handles = handles_to_inherit;
690 if (!handles_to_inherit.empty()) { 690 if (!handles_to_inherit.empty()) {
691 options.inherit_handles = true; 691 options.inherit_handles = true;
692 options.handles_to_inherit = &handles; 692 options.handles_to_inherit = &handles;
693 } 693 }
694 base::Process process = base::LaunchProcess(*cmd_line, options); 694 base::Process process = base::LaunchProcess(*cmd_line, options);
695 695
696 // TODO(rvargas) crbug.com/417532: Don't share a raw handle. 696 // TODO(rvargas) crbug.com/417532: Don't share a raw handle.
697 g_broker_services->AddTargetPeer(process.Handle()); 697 g_broker_services->AddTargetPeer(process.Handle());
698 return process.Pass(); 698 return process;
699 } 699 }
700 700
701 sandbox::TargetPolicy* policy = g_broker_services->CreatePolicy(); 701 sandbox::TargetPolicy* policy = g_broker_services->CreatePolicy();
702 702
703 // Add any handles to be inherited to the policy. 703 // Add any handles to be inherited to the policy.
704 for (HANDLE handle : handles_to_inherit) 704 for (HANDLE handle : handles_to_inherit)
705 policy->AddHandleToShare(handle); 705 policy->AddHandleToShare(handle);
706 706
707 // Pre-startup mitigations. 707 // Pre-startup mitigations.
708 sandbox::MitigationFlags mitigations = 708 sandbox::MitigationFlags mitigations =
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 } 878 }
879 879
880 return false; 880 return false;
881 } 881 }
882 882
883 bool BrokerAddTargetPeer(HANDLE peer_process) { 883 bool BrokerAddTargetPeer(HANDLE peer_process) {
884 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; 884 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK;
885 } 885 }
886 886
887 } // namespace content 887 } // namespace content
OLDNEW
« no previous file with comments | « content/common/font_list_win.cc ('k') | content/renderer/npapi/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698