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

Side by Side Diff: chrome/common/section_util_win.cc

Issue 6677064: Remove last dependencies on chrome\common from chrome\plugin. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/section_util_win.h ('k') | chrome/plugin/plugin_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/common/section_util_win.h"
6
7 namespace chrome {
8
9 HANDLE GetSectionFromProcess(HANDLE section, HANDLE process, bool read_only) {
10 HANDLE valid_section = NULL;
11 DWORD access = STANDARD_RIGHTS_REQUIRED | FILE_MAP_READ;
12 if (!read_only)
13 access |= FILE_MAP_WRITE;
14 DuplicateHandle(process, section, GetCurrentProcess(), &valid_section, access,
15 FALSE, 0);
16 return valid_section;
17 }
18
19 HANDLE GetSectionForProcess(HANDLE section, HANDLE process, bool read_only) {
20 HANDLE valid_section = NULL;
21 DWORD access = STANDARD_RIGHTS_REQUIRED | FILE_MAP_READ;
22 if (!read_only)
23 access |= FILE_MAP_WRITE;
24 DuplicateHandle(GetCurrentProcess(), section, process, &valid_section, access,
25 FALSE, 0);
26 return valid_section;
27 }
28
29 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/section_util_win.h ('k') | chrome/plugin/plugin_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698