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

Unified Diff: sandbox/linux/seccomp/maps.h

Issue 661438: Seccomp sandbox changes (performance and correctness fixes, primarily targetting x86-32) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/seccomp/library.cc ('k') | sandbox/linux/seccomp/maps.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp/maps.h
===================================================================
--- sandbox/linux/seccomp/maps.h (revision 39965)
+++ sandbox/linux/seccomp/maps.h (working copy)
@@ -1,3 +1,7 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
#ifndef MAPS_H__
#define MAPS_H__
@@ -2,5 +6,8 @@
#include <elf.h>
+#include <functional>
+#include <map>
#include <string>
-#include <vector>
+#include "allocator.h"
+
#if defined(__x86_64__)
@@ -19,6 +26,9 @@
class Maps {
friend class Library;
public:
+ typedef std::basic_string<char, std::char_traits<char>,
+ SystemAllocator<char> > string;
+
Maps(int proc_self_maps);
~Maps() { }
@@ -26,7 +36,8 @@
// A map with all the libraries currently loaded into the application.
// The key is a unique combination of device number, inode number, and
// file name. It should be treated as opaque.
- typedef std::map<std::string, Library> LibraryMap;
+ typedef std::map<string, Library, std::less<string>,
+ SystemAllocator<string> > LibraryMap;
friend class Iterator;
class Iterator {
friend class Maps;
@@ -44,7 +55,7 @@
Library* operator*() const;
bool operator==(const Iterator& iter) const;
bool operator!=(const Iterator& iter) const;
- std::string name() const;
+ string name() const;
protected:
mutable LibraryMap::iterator iter_;
« no previous file with comments | « sandbox/linux/seccomp/library.cc ('k') | sandbox/linux/seccomp/maps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698