| 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_DRIVE_DRIVE_INTEGRATION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_INTEGRATION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_INTEGRATION_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_INTEGRATION_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace google_apis { | 27 namespace google_apis { |
| 28 class DriveServiceInterface; | 28 class DriveServiceInterface; |
| 29 } | 29 } |
| 30 | 30 |
| 31 namespace drive { | 31 namespace drive { |
| 32 | 32 |
| 33 class DebugInfoCollector; | 33 class DebugInfoCollector; |
| 34 class DownloadHandler; | 34 class DownloadHandler; |
| 35 class DriveWebAppsRegistry; | 35 class DriveAppRegistry; |
| 36 class FileSystemInterface; | 36 class FileSystemInterface; |
| 37 class FileSystemProxy; | 37 class FileSystemProxy; |
| 38 class FileWriteHelper; | 38 class FileWriteHelper; |
| 39 class JobListInterface; | 39 class JobListInterface; |
| 40 | 40 |
| 41 namespace internal { | 41 namespace internal { |
| 42 class FileCache; | 42 class FileCache; |
| 43 class ResourceMetadata; | 43 class ResourceMetadata; |
| 44 class SyncClient; | 44 class SyncClient; |
| 45 } // namespace internal | 45 } // namespace internal |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 google_apis::DriveServiceInterface* drive_service() { | 100 google_apis::DriveServiceInterface* drive_service() { |
| 101 return drive_service_.get(); | 101 return drive_service_.get(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 DebugInfoCollector* debug_info_collector() { | 104 DebugInfoCollector* debug_info_collector() { |
| 105 return debug_info_collector_.get(); | 105 return debug_info_collector_.get(); |
| 106 } | 106 } |
| 107 FileSystemInterface* file_system() { return file_system_.get(); } | 107 FileSystemInterface* file_system() { return file_system_.get(); } |
| 108 FileWriteHelper* file_write_helper() { return file_write_helper_.get(); } | 108 FileWriteHelper* file_write_helper() { return file_write_helper_.get(); } |
| 109 DownloadHandler* download_handler() { return download_handler_.get(); } | 109 DownloadHandler* download_handler() { return download_handler_.get(); } |
| 110 DriveWebAppsRegistry* webapps_registry() { return webapps_registry_.get(); } | 110 DriveAppRegistry* drive_app_registry() { return drive_app_registry_.get(); } |
| 111 JobListInterface* job_list() { return scheduler_.get(); } | 111 JobListInterface* job_list() { return scheduler_.get(); } |
| 112 | 112 |
| 113 // Clears all the local cache files and in-memory data, and remounts the | 113 // Clears all the local cache files and in-memory data, and remounts the |
| 114 // file system. |callback| is called with true when this operation is done | 114 // file system. |callback| is called with true when this operation is done |
| 115 // successfully. Otherwise, |callback| is called with false. | 115 // successfully. Otherwise, |callback| is called with false. |
| 116 // |callback| must not be null. | 116 // |callback| must not be null. |
| 117 void ClearCacheAndRemountFileSystem( | 117 void ClearCacheAndRemountFileSystem( |
| 118 const base::Callback<void(bool)>& callback); | 118 const base::Callback<void(bool)>& callback); |
| 119 | 119 |
| 120 // Reloads and remounts the file system. | 120 // Reloads and remounts the file system. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 151 friend class DriveIntegrationServiceFactory; | 151 friend class DriveIntegrationServiceFactory; |
| 152 | 152 |
| 153 Profile* profile_; | 153 Profile* profile_; |
| 154 // True if Drive is disabled due to initialization errors. | 154 // True if Drive is disabled due to initialization errors. |
| 155 bool drive_disabled_; | 155 bool drive_disabled_; |
| 156 | 156 |
| 157 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 157 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 158 scoped_ptr<internal::FileCache, util::DestroyHelper> cache_; | 158 scoped_ptr<internal::FileCache, util::DestroyHelper> cache_; |
| 159 scoped_ptr<google_apis::DriveServiceInterface> drive_service_; | 159 scoped_ptr<google_apis::DriveServiceInterface> drive_service_; |
| 160 scoped_ptr<JobScheduler> scheduler_; | 160 scoped_ptr<JobScheduler> scheduler_; |
| 161 scoped_ptr<DriveWebAppsRegistry> webapps_registry_; | 161 scoped_ptr<DriveAppRegistry> drive_app_registry_; |
| 162 scoped_ptr<internal::ResourceMetadata, | 162 scoped_ptr<internal::ResourceMetadata, |
| 163 util::DestroyHelper> resource_metadata_; | 163 util::DestroyHelper> resource_metadata_; |
| 164 scoped_ptr<FileSystemInterface> file_system_; | 164 scoped_ptr<FileSystemInterface> file_system_; |
| 165 scoped_ptr<FileWriteHelper> file_write_helper_; | 165 scoped_ptr<FileWriteHelper> file_write_helper_; |
| 166 scoped_ptr<DownloadHandler> download_handler_; | 166 scoped_ptr<DownloadHandler> download_handler_; |
| 167 scoped_ptr<internal::SyncClient> sync_client_; | 167 scoped_ptr<internal::SyncClient> sync_client_; |
| 168 scoped_refptr<FileSystemProxy> file_system_proxy_; | 168 scoped_refptr<FileSystemProxy> file_system_proxy_; |
| 169 scoped_ptr<DebugInfoCollector> debug_info_collector_; | 169 scoped_ptr<DebugInfoCollector> debug_info_collector_; |
| 170 | 170 |
| 171 ObserverList<DriveIntegrationServiceObserver> observers_; | 171 ObserverList<DriveIntegrationServiceObserver> observers_; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 // BrowserContextKeyedServiceFactory: | 226 // BrowserContextKeyedServiceFactory: |
| 227 virtual BrowserContextKeyedService* BuildServiceInstanceFor( | 227 virtual BrowserContextKeyedService* BuildServiceInstanceFor( |
| 228 content::BrowserContext* context) const OVERRIDE; | 228 content::BrowserContext* context) const OVERRIDE; |
| 229 | 229 |
| 230 FactoryCallback factory_for_test_; | 230 FactoryCallback factory_for_test_; |
| 231 }; | 231 }; |
| 232 | 232 |
| 233 } // namespace drive | 233 } // namespace drive |
| 234 | 234 |
| 235 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_INTEGRATION_SERVICE_H_ | 235 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_INTEGRATION_SERVICE_H_ |
| OLD | NEW |