| 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_;
|
|
|