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

Side by Side Diff: maps.h

Issue 11547014: Make Maps constructor explicit. (Closed) Base URL: http://seccompsandbox.googlecode.com/svn/trunk/
Patch Set: Created 8 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 | « no previous file | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 MAPS_H__ 5 #ifndef MAPS_H__
6 #define MAPS_H__ 6 #define MAPS_H__
7 7
8 #include <elf.h> 8 #include <elf.h>
9 #include <functional> 9 #include <functional>
10 #include <map> 10 #include <map>
(...skipping 11 matching lines...) Expand all
22 22
23 namespace playground { 23 namespace playground {
24 24
25 class Library; 25 class Library;
26 class Maps { 26 class Maps {
27 friend class Library; 27 friend class Library;
28 public: 28 public:
29 typedef std::basic_string<char, std::char_traits<char>, 29 typedef std::basic_string<char, std::char_traits<char>,
30 SystemAllocator<char> > string; 30 SystemAllocator<char> > string;
31 31
32 Maps(int proc_self_maps); 32 explicit Maps(int proc_self_maps);
33 ~Maps(); 33 ~Maps();
34 34
35 protected: 35 protected:
36 // A map with all the libraries currently loaded into the application. 36 // A map with all the libraries currently loaded into the application.
37 // The key is a unique combination of device number, inode number, and 37 // The key is a unique combination of device number, inode number, and
38 // file name. It should be treated as opaque. 38 // file name. It should be treated as opaque.
39 typedef std::map<string, Library, std::less<string>, 39 typedef std::map<string, Library, std::less<string>,
40 SystemAllocator<std::pair<const string, 40 SystemAllocator<std::pair<const string,
41 Library> > > LibraryMap; 41 Library> > > LibraryMap;
42 friend class Iterator; 42 friend class Iterator;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 const Iterator begin_iter_; 86 const Iterator begin_iter_;
87 const Iterator end_iter_; 87 const Iterator end_iter_;
88 88
89 LibraryMap libs_; 89 LibraryMap libs_;
90 char* vsyscall_; 90 char* vsyscall_;
91 }; 91 };
92 92
93 } // namespace 93 } // namespace
94 94
95 #endif // MAPS_H__ 95 #endif // MAPS_H__
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698