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

Side by Side Diff: sandbox/win/src/handle_closer.h

Issue 119713003: Add base:: to string16s in sandbox/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « sandbox/win/src/broker_services.cc ('k') | sandbox/win/src/handle_closer.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 #ifndef SANDBOX_SRC_HANDLE_CLOSER_H_ 5 #ifndef SANDBOX_SRC_HANDLE_CLOSER_H_
6 #define SANDBOX_SRC_HANDLE_CLOSER_H_ 6 #define SANDBOX_SRC_HANDLE_CLOSER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "sandbox/win/src/interception.h" 13 #include "sandbox/win/src/interception.h"
14 #include "sandbox/win/src/sandbox_types.h" 14 #include "sandbox/win/src/sandbox_types.h"
15 #include "sandbox/win/src/target_process.h" 15 #include "sandbox/win/src/target_process.h"
16 16
17 namespace sandbox { 17 namespace sandbox {
18 18
19 // This is a map of handle-types to names that we need to close in the 19 // This is a map of handle-types to names that we need to close in the
20 // target process. A null set means we need to close all handles of the 20 // target process. A null set means we need to close all handles of the
21 // given type. 21 // given type.
22 typedef std::map<const string16, std::set<const string16> > HandleMap; 22 typedef std::map<const base::string16, std::set<const base::string16> >
23 HandleMap;
23 24
24 // Type and set of corresponding handle names to close. 25 // Type and set of corresponding handle names to close.
25 struct HandleListEntry { 26 struct HandleListEntry {
26 size_t record_bytes; // Rounded to sizeof(size_t) bytes. 27 size_t record_bytes; // Rounded to sizeof(size_t) bytes.
27 size_t offset_to_names; // Nul terminated strings of name_count names. 28 size_t offset_to_names; // Nul terminated strings of name_count names.
28 size_t name_count; 29 size_t name_count;
29 char16 handle_type[1]; 30 char16 handle_type[1];
30 }; 31 };
31 32
32 // Global parameters and a pointer to the list of entries. 33 // Global parameters and a pointer to the list of entries.
(...skipping 28 matching lines...) Expand all
61 62
62 // Serializes the handle list into the target process. 63 // Serializes the handle list into the target process.
63 bool SetupHandleList(void* buffer, size_t buffer_bytes); 64 bool SetupHandleList(void* buffer, size_t buffer_bytes);
64 65
65 HandleMap handles_to_close_; 66 HandleMap handles_to_close_;
66 67
67 DISALLOW_COPY_AND_ASSIGN(HandleCloser); 68 DISALLOW_COPY_AND_ASSIGN(HandleCloser);
68 }; 69 };
69 70
70 // Returns the object manager's name associated with a handle 71 // Returns the object manager's name associated with a handle
71 bool GetHandleName(HANDLE handle, string16* handle_name); 72 bool GetHandleName(HANDLE handle, base::string16* handle_name);
72 73
73 } // namespace sandbox 74 } // namespace sandbox
74 75
75 #endif // SANDBOX_SRC_HANDLE_CLOSER_H_ 76 #endif // SANDBOX_SRC_HANDLE_CLOSER_H_
OLDNEW
« no previous file with comments | « sandbox/win/src/broker_services.cc ('k') | sandbox/win/src/handle_closer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698