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

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

Issue 1166473003: Add a method BrokerDuplicateSharedMemoryHandle() to the sandbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared_memory_add_helper_methods
Patch Set: Pass SharedMemoryHandle by const ref. Created 5 years, 6 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/sandbox_init_mac.cc ('k') | content/public/common/sandbox_init.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) 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/public/common/sandbox_init.h" 5 #include "content/public/common/sandbox_init.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/common/sandbox_win.h" 9 #include "content/common/sandbox_win.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 24 matching lines...) Expand all
35 return true; 35 return true;
36 } 36 }
37 37
38 if (command_line.HasSwitch(switches::kNoSandbox)) 38 if (command_line.HasSwitch(switches::kNoSandbox))
39 return true; 39 return true;
40 40
41 sandbox::TargetServices* target_services = sandbox_info->target_services; 41 sandbox::TargetServices* target_services = sandbox_info->target_services;
42 return InitTargetServices(target_services); 42 return InitTargetServices(target_services);
43 } 43 }
44 44
45 bool BrokerDuplicateSharedMemoryHandle(
46 const base::SharedMemoryHandle& source_handle,
47 base::ProcessId target_process_id,
48 base::SharedMemoryHandle* target_handle) {
49 return BrokerDuplicateHandle(source_handle, target_process_id, target_handle,
50 0, DUPLICATE_SAME_ACCESS);
51 }
52
45 } // namespace content 53 } // namespace content
OLDNEW
« no previous file with comments | « content/common/sandbox_init_mac.cc ('k') | content/public/common/sandbox_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698