OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void AddObserver(Observer* observer); | 112 void AddObserver(Observer* observer); |
113 void RemoveObserver(Observer* observer); | 113 void RemoveObserver(Observer* observer); |
114 | 114 |
115 // Gets the singleton instance for the |context|. | 115 // Gets the singleton instance for the |context|. |
116 static Service* Get(content::BrowserContext* context); | 116 static Service* Get(content::BrowserContext* context); |
117 | 117 |
118 // extensions::ExtensionRegistryObserver overrides. | 118 // extensions::ExtensionRegistryObserver overrides. |
119 virtual void OnExtensionUnloaded( | 119 virtual void OnExtensionUnloaded( |
120 content::BrowserContext* browser_context, | 120 content::BrowserContext* browser_context, |
121 const extensions::Extension* extension, | 121 const extensions::Extension* extension, |
122 extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE; | 122 extensions::UnloadedExtensionInfo::Reason reason) override; |
123 virtual void OnExtensionLoaded( | 123 virtual void OnExtensionLoaded( |
124 content::BrowserContext* browser_context, | 124 content::BrowserContext* browser_context, |
125 const extensions::Extension* extension) OVERRIDE; | 125 const extensions::Extension* extension) override; |
126 | 126 |
127 private: | 127 private: |
128 // Key is a pair of an extension id and file system id, which makes it | 128 // Key is a pair of an extension id and file system id, which makes it |
129 // unique among the entire service instance. | 129 // unique among the entire service instance. |
130 typedef std::pair<std::string, std::string> FileSystemKey; | 130 typedef std::pair<std::string, std::string> FileSystemKey; |
131 | 131 |
132 typedef std::map<FileSystemKey, ProvidedFileSystemInterface*> | 132 typedef std::map<FileSystemKey, ProvidedFileSystemInterface*> |
133 ProvidedFileSystemMap; | 133 ProvidedFileSystemMap; |
134 typedef std::map<std::string, FileSystemKey> MountPointNameToKeyMap; | 134 typedef std::map<std::string, FileSystemKey> MountPointNameToKeyMap; |
135 | 135 |
(...skipping 24 matching lines...) Expand all Loading... |
160 base::ThreadChecker thread_checker_; | 160 base::ThreadChecker thread_checker_; |
161 base::WeakPtrFactory<Service> weak_ptr_factory_; | 161 base::WeakPtrFactory<Service> weak_ptr_factory_; |
162 | 162 |
163 DISALLOW_COPY_AND_ASSIGN(Service); | 163 DISALLOW_COPY_AND_ASSIGN(Service); |
164 }; | 164 }; |
165 | 165 |
166 } // namespace file_system_provider | 166 } // namespace file_system_provider |
167 } // namespace chromeos | 167 } // namespace chromeos |
168 | 168 |
169 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_ | 169 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_H_ |
OLD | NEW |