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

Side by Side Diff: storage/browser/fileapi/external_mount_points.h

Issue 2347253002: Remove stl_util's STLDeleteContainerPairSecondPointers from storage/. (Closed)
Patch Set: danakj Created 4 years, 3 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
« no previous file with comments | « no previous file | storage/browser/fileapi/external_mount_points.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 STORAGE_BROWSER_FILEAPI_EXTERNAL_MOUNT_POINTS_H_ 5 #ifndef STORAGE_BROWSER_FILEAPI_EXTERNAL_MOUNT_POINTS_H_
6 #define STORAGE_BROWSER_FILEAPI_EXTERNAL_MOUNT_POINTS_H_ 6 #define STORAGE_BROWSER_FILEAPI_EXTERNAL_MOUNT_POINTS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/synchronization/lock.h" 15 #include "base/synchronization/lock.h"
15 #include "storage/browser/fileapi/mount_points.h" 16 #include "storage/browser/fileapi/mount_points.h"
16 #include "storage/browser/storage_browser_export.h" 17 #include "storage/browser/storage_browser_export.h"
17 #include "storage/common/fileapi/file_system_mount_option.h" 18 #include "storage/common/fileapi/file_system_mount_option.h"
18 #include "storage/common/fileapi/file_system_types.h" 19 #include "storage/common/fileapi/file_system_types.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 113
113 // Revoke all registered filesystems. Used only by testing (for clean-ups). 114 // Revoke all registered filesystems. Used only by testing (for clean-ups).
114 void RevokeAllFileSystems(); 115 void RevokeAllFileSystems();
115 116
116 private: 117 private:
117 friend class base::RefCountedThreadSafe<ExternalMountPoints>; 118 friend class base::RefCountedThreadSafe<ExternalMountPoints>;
118 119
119 // Represents each file system instance (defined in the .cc). 120 // Represents each file system instance (defined in the .cc).
120 class Instance; 121 class Instance;
121 122
122 typedef std::map<std::string, Instance*> NameToInstance; 123 typedef std::map<std::string, std::unique_ptr<Instance>> NameToInstance;
123 124
124 // Reverse map from registered path to its corresponding mount name. 125 // Reverse map from registered path to its corresponding mount name.
125 typedef std::map<base::FilePath, std::string> PathToName; 126 typedef std::map<base::FilePath, std::string> PathToName;
126 127
127 // Use |GetSystemInstance| of |CreateRefCounted| to get an instance. 128 // Use |GetSystemInstance| of |CreateRefCounted| to get an instance.
128 ExternalMountPoints(); 129 ExternalMountPoints();
129 ~ExternalMountPoints() override; 130 ~ExternalMountPoints() override;
130 131
131 // MountPoint overrides. 132 // MountPoint overrides.
132 FileSystemURL CrackFileSystemURL(const FileSystemURL& url) const override; 133 FileSystemURL CrackFileSystemURL(const FileSystemURL& url) const override;
(...skipping 16 matching lines...) Expand all
149 150
150 NameToInstance instance_map_; 151 NameToInstance instance_map_;
151 PathToName path_to_name_map_; 152 PathToName path_to_name_map_;
152 153
153 DISALLOW_COPY_AND_ASSIGN(ExternalMountPoints); 154 DISALLOW_COPY_AND_ASSIGN(ExternalMountPoints);
154 }; 155 };
155 156
156 } // namespace storage 157 } // namespace storage
157 158
158 #endif // STORAGE_BROWSER_FILEAPI_EXTERNAL_MOUNT_POINTS_H_ 159 #endif // STORAGE_BROWSER_FILEAPI_EXTERNAL_MOUNT_POINTS_H_
OLDNEW
« no previous file with comments | « no previous file | storage/browser/fileapi/external_mount_points.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698