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_PROVIDED_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | |
8 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info .h" | 9 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info .h" |
9 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte rface.h" | 10 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte rface.h" |
10 #include "chrome/browser/chromeos/file_system_provider/request_manager.h" | 11 #include "chrome/browser/chromeos/file_system_provider/request_manager.h" |
12 #include "webkit/browser/fileapi/async_file_util.h" | |
13 | |
14 namespace base { | |
15 class FilePath; | |
16 } // namespace base | |
11 | 17 |
12 namespace extensions { | 18 namespace extensions { |
13 class EventRouter; | 19 class EventRouter; |
14 } // namespace extensions | 20 } // namespace extensions |
15 | 21 |
16 namespace chromeos { | 22 namespace chromeos { |
17 namespace file_system_provider { | 23 namespace file_system_provider { |
18 | 24 |
19 // Provided file system implementation. Forwards requests between providers and | 25 // Provided file system implemenrtation. Forwards requests between providers and |
kinaba
2014/04/25 06:35:06
nit: implementation
mtomasz
2014/04/28 00:42:47
Done.
| |
20 // clients. | 26 // clients. |
21 class ProvidedFileSystem : public ProvidedFileSystemInterface { | 27 class ProvidedFileSystem : public ProvidedFileSystemInterface { |
22 public: | 28 public: |
23 ProvidedFileSystem(extensions::EventRouter* event_router, | 29 ProvidedFileSystem(extensions::EventRouter* event_router, |
24 const ProvidedFileSystemInfo& file_system_info); | 30 const ProvidedFileSystemInfo& file_system_info); |
25 virtual ~ProvidedFileSystem(); | 31 virtual ~ProvidedFileSystem(); |
26 | 32 |
27 // ProvidedFileSystemInterface overrides. | 33 // ProvidedFileSystemInterface overrides. |
28 virtual bool RequestUnmount( | 34 virtual void RequestUnmount( |
29 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; | 35 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; |
30 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE; | 36 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE; |
31 virtual RequestManager* GetRequestManager() OVERRIDE; | 37 virtual RequestManager* GetRequestManager() OVERRIDE; |
38 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() OVERRIDE; | |
32 | 39 |
33 private: | 40 private: |
34 extensions::EventRouter* event_router_; | 41 extensions::EventRouter* event_router_; |
35 RequestManager request_manager_; | 42 RequestManager request_manager_; |
36 ProvidedFileSystemInfo file_system_info_; | 43 ProvidedFileSystemInfo file_system_info_; |
44 base::WeakPtrFactory<ProvidedFileSystemInterface> weak_ptr_factory_; | |
37 | 45 |
38 DISALLOW_COPY_AND_ASSIGN(ProvidedFileSystem); | 46 DISALLOW_COPY_AND_ASSIGN(ProvidedFileSystem); |
39 }; | 47 }; |
40 | 48 |
41 } // namespace file_system_provider | 49 } // namespace file_system_provider |
42 } // namespace chromeos | 50 } // namespace chromeos |
43 | 51 |
44 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_H_ | 52 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_H_ |
OLD | NEW |