| 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_FAKE_PROVIDED_FILE_SYSTEM_H
_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H
_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H
_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H
_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 16 #include "base/task/cancelable_task_tracker.h" | 16 #include "base/task/cancelable_task_tracker.h" |
| 17 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" | 17 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" |
| 18 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte
rface.h" | 18 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte
rface.h" |
| 19 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_obse
rver.h" | 19 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_obse
rver.h" |
| 20 #include "chrome/browser/chromeos/file_system_provider/watcher.h" | 20 #include "chrome/browser/chromeos/file_system_provider/watcher.h" |
| 21 #include "storage/browser/fileapi/async_file_util.h" |
| 22 #include "storage/browser/fileapi/watcher_manager.h" |
| 21 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 22 | 24 |
| 23 class Profile; | 25 class Profile; |
| 24 | 26 |
| 25 namespace base { | 27 namespace base { |
| 26 class Time; | 28 class Time; |
| 27 } // namespace base | 29 } // namespace base |
| 28 | 30 |
| 29 namespace net { | 31 namespace net { |
| 30 class IOBuffer; | 32 class IOBuffer; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 int file_handle, | 126 int file_handle, |
| 125 net::IOBuffer* buffer, | 127 net::IOBuffer* buffer, |
| 126 int64 offset, | 128 int64 offset, |
| 127 int length, | 129 int length, |
| 128 const storage::AsyncFileUtil::StatusCallback& callback) override; | 130 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 129 virtual AbortCallback AddWatcher( | 131 virtual AbortCallback AddWatcher( |
| 130 const GURL& origin, | 132 const GURL& origin, |
| 131 const base::FilePath& entry_path, | 133 const base::FilePath& entry_path, |
| 132 bool recursive, | 134 bool recursive, |
| 133 bool persistent, | 135 bool persistent, |
| 134 const storage::AsyncFileUtil::StatusCallback& callback) override; | 136 const storage::AsyncFileUtil::StatusCallback& callback, |
| 137 const storage::WatcherManager::NotificationCallback& |
| 138 notification_callback) override; |
| 135 virtual void RemoveWatcher( | 139 virtual void RemoveWatcher( |
| 136 const GURL& origin, | 140 const GURL& origin, |
| 137 const base::FilePath& entry_path, | 141 const base::FilePath& entry_path, |
| 138 bool recursive, | 142 bool recursive, |
| 139 const storage::AsyncFileUtil::StatusCallback& callback) override; | 143 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 140 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const override; | 144 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const override; |
| 141 virtual RequestManager* GetRequestManager() override; | 145 virtual RequestManager* GetRequestManager() override; |
| 142 virtual Watchers* GetWatchers() override; | 146 virtual Watchers* GetWatchers() override; |
| 143 virtual void AddObserver(ProvidedFileSystemObserver* observer) override; | 147 virtual void AddObserver(ProvidedFileSystemObserver* observer) override; |
| 144 virtual void RemoveObserver(ProvidedFileSystemObserver* observer) override; | 148 virtual void RemoveObserver(ProvidedFileSystemObserver* observer) override; |
| 145 virtual bool Notify(const base::FilePath& entry_path, | 149 virtual bool Notify(const base::FilePath& entry_path, |
| 146 bool recursive, | 150 bool recursive, |
| 147 ProvidedFileSystemObserver::ChangeType change_type, | 151 storage::WatcherManager::ChangeType change_type, |
| 148 scoped_ptr<ProvidedFileSystemObserver::Changes> changes, | 152 scoped_ptr<ProvidedFileSystemObserver::Changes> changes, |
| 149 const std::string& tag) override; | 153 const std::string& tag) override; |
| 150 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() override; | 154 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() override; |
| 151 | 155 |
| 152 // Factory callback, to be used in Service::SetFileSystemFactory(). The | 156 // Factory callback, to be used in Service::SetFileSystemFactory(). The |
| 153 // |event_router| argument can be NULL. | 157 // |event_router| argument can be NULL. |
| 154 static ProvidedFileSystemInterface* Create( | 158 static ProvidedFileSystemInterface* Create( |
| 155 Profile* profile, | 159 Profile* profile, |
| 156 const ProvidedFileSystemInfo& file_system_info); | 160 const ProvidedFileSystemInfo& file_system_info); |
| 157 | 161 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 183 Watchers watchers_; | 187 Watchers watchers_; |
| 184 | 188 |
| 185 base::WeakPtrFactory<FakeProvidedFileSystem> weak_ptr_factory_; | 189 base::WeakPtrFactory<FakeProvidedFileSystem> weak_ptr_factory_; |
| 186 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); | 190 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); |
| 187 }; | 191 }; |
| 188 | 192 |
| 189 } // namespace file_system_provider | 193 } // namespace file_system_provider |
| 190 } // namespace chromeos | 194 } // namespace chromeos |
| 191 | 195 |
| 192 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ | 196 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ |
| OLD | NEW |