| OLD | NEW |
| 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 STORAGE_BROWSER_FILEAPI_ISOLATED_CONTEXT_H_ | 5 #ifndef STORAGE_BROWSER_FILEAPI_ISOLATED_CONTEXT_H_ |
| 6 #define STORAGE_BROWSER_FILEAPI_ISOLATED_CONTEXT_H_ | 6 #define STORAGE_BROWSER_FILEAPI_ISOLATED_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 FileSystemURL CrackURL(const GURL& url) const override; | 154 FileSystemURL CrackURL(const GURL& url) const override; |
| 155 FileSystemURL CreateCrackedFileSystemURL( | 155 FileSystemURL CreateCrackedFileSystemURL( |
| 156 const GURL& origin, | 156 const GURL& origin, |
| 157 FileSystemType type, | 157 FileSystemType type, |
| 158 const base::FilePath& path) const override; | 158 const base::FilePath& path) const override; |
| 159 | 159 |
| 160 // Returns the virtual root path that looks like /<filesystem_id>. | 160 // Returns the virtual root path that looks like /<filesystem_id>. |
| 161 base::FilePath CreateVirtualRootPath(const std::string& filesystem_id) const; | 161 base::FilePath CreateVirtualRootPath(const std::string& filesystem_id) const; |
| 162 | 162 |
| 163 private: | 163 private: |
| 164 friend struct base::DefaultLazyInstanceTraits<IsolatedContext>; | 164 friend struct base::LazyInstanceTraitsBase<IsolatedContext>; |
| 165 | 165 |
| 166 // Represents each file system instance (defined in the .cc). | 166 // Represents each file system instance (defined in the .cc). |
| 167 class Instance; | 167 class Instance; |
| 168 | 168 |
| 169 // Obtain an instance of this class via GetInstance(). | 169 // Obtain an instance of this class via GetInstance(). |
| 170 IsolatedContext(); | 170 IsolatedContext(); |
| 171 ~IsolatedContext() override; | 171 ~IsolatedContext() override; |
| 172 | 172 |
| 173 // MountPoints overrides. | 173 // MountPoints overrides. |
| 174 FileSystemURL CrackFileSystemURL(const FileSystemURL& url) const override; | 174 FileSystemURL CrackFileSystemURL(const FileSystemURL& url) const override; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 187 | 187 |
| 188 // Reverse map from registered path to IDs. | 188 // Reverse map from registered path to IDs. |
| 189 std::map<base::FilePath, std::set<std::string>> path_to_id_map_; | 189 std::map<base::FilePath, std::set<std::string>> path_to_id_map_; |
| 190 | 190 |
| 191 DISALLOW_COPY_AND_ASSIGN(IsolatedContext); | 191 DISALLOW_COPY_AND_ASSIGN(IsolatedContext); |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 } // namespace storage | 194 } // namespace storage |
| 195 | 195 |
| 196 #endif // STORAGE_BROWSER_FILEAPI_ISOLATED_CONTEXT_H_ | 196 #endif // STORAGE_BROWSER_FILEAPI_ISOLATED_CONTEXT_H_ |
| OLD | NEW |