| 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 CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 // Triggered when the feed from the server is loaded. | 141 // Triggered when the feed from the server is loaded. |
| 142 virtual void OnFeedFromServerLoaded() {} | 142 virtual void OnFeedFromServerLoaded() {} |
| 143 | 143 |
| 144 protected: | 144 protected: |
| 145 virtual ~Observer() {} | 145 virtual ~Observer() {} |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 // Initializes the object. This function should be called before any | 148 // Initializes the object. This function should be called before any |
| 149 // other functions. | 149 // other functions. |
| 150 virtual void Initialize() = 0; | 150 virtual void Initialize(bool use_drive_api) = 0; |
| 151 | 151 |
| 152 // Adds and removes the observer. | 152 // Adds and removes the observer. |
| 153 virtual void AddObserver(Observer* observer) = 0; | 153 virtual void AddObserver(Observer* observer) = 0; |
| 154 virtual void RemoveObserver(Observer* observer) = 0; | 154 virtual void RemoveObserver(Observer* observer) = 0; |
| 155 | 155 |
| 156 // Starts and stops periodic updates. | 156 // Starts and stops periodic updates. |
| 157 virtual void StartUpdates() = 0; | 157 virtual void StartUpdates() = 0; |
| 158 virtual void StopUpdates() = 0; | 158 virtual void StopUpdates() = 0; |
| 159 | 159 |
| 160 // Checks for updates on the server. | 160 // Checks for updates on the server. |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 GDataFileSystem( | 394 GDataFileSystem( |
| 395 Profile* profile, | 395 Profile* profile, |
| 396 GDataCache* cache, | 396 GDataCache* cache, |
| 397 DocumentsServiceInterface* documents_service, | 397 DocumentsServiceInterface* documents_service, |
| 398 GDataUploaderInterface* uploader, | 398 GDataUploaderInterface* uploader, |
| 399 DriveWebAppsRegistryInterface* webapps_registry, | 399 DriveWebAppsRegistryInterface* webapps_registry, |
| 400 const base::SequencedWorkerPool::SequenceToken& sequence_token); | 400 const base::SequencedWorkerPool::SequenceToken& sequence_token); |
| 401 virtual ~GDataFileSystem(); | 401 virtual ~GDataFileSystem(); |
| 402 | 402 |
| 403 // GDataFileSystem overrides. | 403 // GDataFileSystem overrides. |
| 404 virtual void Initialize() OVERRIDE; | 404 virtual void Initialize(bool use_drive_api) OVERRIDE; |
| 405 virtual void AddObserver(Observer* observer) OVERRIDE; | 405 virtual void AddObserver(Observer* observer) OVERRIDE; |
| 406 virtual void RemoveObserver(Observer* observer) OVERRIDE; | 406 virtual void RemoveObserver(Observer* observer) OVERRIDE; |
| 407 virtual void StartUpdates() OVERRIDE; | 407 virtual void StartUpdates() OVERRIDE; |
| 408 virtual void StopUpdates() OVERRIDE; | 408 virtual void StopUpdates() OVERRIDE; |
| 409 virtual void CheckForUpdates() OVERRIDE; | 409 virtual void CheckForUpdates() OVERRIDE; |
| 410 virtual void GetFileInfoByResourceId( | 410 virtual void GetFileInfoByResourceId( |
| 411 const std::string& resource_id, | 411 const std::string& resource_id, |
| 412 const GetFileInfoWithFilePathCallback& callback) OVERRIDE; | 412 const GetFileInfoWithFilePathCallback& callback) OVERRIDE; |
| 413 virtual void Search(const std::string& search_query, | 413 virtual void Search(const std::string& search_query, |
| 414 const SearchCallback& callback) OVERRIDE; | 414 const SearchCallback& callback) OVERRIDE; |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 scoped_ptr<PrefChangeRegistrar> pref_registrar_; | 1264 scoped_ptr<PrefChangeRegistrar> pref_registrar_; |
| 1265 | 1265 |
| 1266 // WeakPtrFactory and WeakPtr bound to the UI thread. | 1266 // WeakPtrFactory and WeakPtr bound to the UI thread. |
| 1267 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; | 1267 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; |
| 1268 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 1268 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
| 1269 | 1269 |
| 1270 ObserverList<Observer> observers_; | 1270 ObserverList<Observer> observers_; |
| 1271 | 1271 |
| 1272 // The token is used to post tasks to the blocking pool in sequence. | 1272 // The token is used to post tasks to the blocking pool in sequence. |
| 1273 const base::SequencedWorkerPool::SequenceToken sequence_token_; | 1273 const base::SequencedWorkerPool::SequenceToken sequence_token_; |
| 1274 |
| 1275 // If true use Drive v2 API instead of Document List API. |
| 1276 bool use_drive_api_; |
| 1274 }; | 1277 }; |
| 1275 | 1278 |
| 1276 } // namespace gdata | 1279 } // namespace gdata |
| 1277 | 1280 |
| 1278 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 1281 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| OLD | NEW |