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_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "base/timer.h" | |
15 #include "chrome/browser/chromeos/drive/change_list_loader.h" | 14 #include "chrome/browser/chromeos/drive/change_list_loader.h" |
16 #include "chrome/browser/chromeos/drive/change_list_loader_observer.h" | 15 #include "chrome/browser/chromeos/drive/change_list_loader_observer.h" |
17 #include "chrome/browser/chromeos/drive/drive_file_system_interface.h" | 16 #include "chrome/browser/chromeos/drive/drive_file_system_interface.h" |
18 #include "chrome/browser/chromeos/drive/drive_file_system_util.h" | 17 #include "chrome/browser/chromeos/drive/drive_file_system_util.h" |
19 #include "chrome/browser/chromeos/drive/file_system/drive_operations.h" | 18 #include "chrome/browser/chromeos/drive/file_system/drive_operations.h" |
20 #include "chrome/browser/chromeos/drive/file_system/operation_observer.h" | 19 #include "chrome/browser/chromeos/drive/file_system/operation_observer.h" |
21 #include "chrome/browser/google_apis/gdata_errorcode.h" | 20 #include "chrome/browser/google_apis/gdata_errorcode.h" |
22 | 21 |
23 class PrefChangeRegistrar; | 22 class PrefChangeRegistrar; |
24 class Profile; | 23 class Profile; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // Defines set of parameters passed to an intermediate callback | 160 // Defines set of parameters passed to an intermediate callback |
162 // OnGetFileCompleteForOpen, during execution of OpenFile() method. | 161 // OnGetFileCompleteForOpen, during execution of OpenFile() method. |
163 struct GetFileCompleteForOpenParams; | 162 struct GetFileCompleteForOpenParams; |
164 | 163 |
165 // Defines set of parameters for GetResolvedFileByPath(). | 164 // Defines set of parameters for GetResolvedFileByPath(). |
166 struct GetResolvedFileParams; | 165 struct GetResolvedFileParams; |
167 | 166 |
168 // Struct used for AddUploadedFile. | 167 // Struct used for AddUploadedFile. |
169 struct AddUploadedFileParams; | 168 struct AddUploadedFileParams; |
170 | 169 |
171 // Starts and stops periodic polling. | |
172 // TODO(satorux): Remove them. crbug.com/231202 | |
173 void StartPolling(); | |
174 void StopPolling(); | |
175 | |
176 // Used to implement Reload(). | 170 // Used to implement Reload(). |
177 void ReloadAfterReset(); | 171 void ReloadAfterReset(); |
178 | 172 |
179 // Sets up ChangeListLoader. | 173 // Sets up ChangeListLoader. |
180 void SetupChangeListLoader(); | 174 void SetupChangeListLoader(); |
181 | 175 |
182 // Called on preference change. | 176 // Called on preference change. |
183 void OnDisableDriveHostedFilesChanged(); | 177 void OnDisableDriveHostedFilesChanged(); |
184 | 178 |
185 // Callback passed to ChangeListLoader from |Search| method. | 179 // Callback passed to ChangeListLoader from |Search| method. |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 DriveCache* cache_; | 442 DriveCache* cache_; |
449 | 443 |
450 // The document service owned by DriveSystemService. | 444 // The document service owned by DriveSystemService. |
451 google_apis::DriveServiceInterface* drive_service_; | 445 google_apis::DriveServiceInterface* drive_service_; |
452 | 446 |
453 // The webapps registry owned by DriveSystemService. | 447 // The webapps registry owned by DriveSystemService. |
454 DriveWebAppsRegistry* webapps_registry_; | 448 DriveWebAppsRegistry* webapps_registry_; |
455 | 449 |
456 DriveResourceMetadata* resource_metadata_; | 450 DriveResourceMetadata* resource_metadata_; |
457 | 451 |
458 // Periodic timer for checking updates. | |
459 base::Timer update_timer_; | |
460 | |
461 // Time of the last update check. | 452 // Time of the last update check. |
462 base::Time last_update_check_time_; | 453 base::Time last_update_check_time_; |
463 | 454 |
464 // Error of the last update check. | 455 // Error of the last update check. |
465 DriveFileError last_update_check_error_; | 456 DriveFileError last_update_check_error_; |
466 | 457 |
467 // True if hosted documents should be hidden. | 458 // True if hosted documents should be hidden. |
468 bool hide_hosted_docs_; | 459 bool hide_hosted_docs_; |
469 | 460 |
470 // The set of paths opened by OpenFile but not yet closed by CloseFile. | 461 // The set of paths opened by OpenFile but not yet closed by CloseFile. |
(...skipping 21 matching lines...) Expand all Loading... |
492 // Note: This should remain the last member so it'll be destroyed and | 483 // Note: This should remain the last member so it'll be destroyed and |
493 // invalidate the weak pointers before any other members are destroyed. | 484 // invalidate the weak pointers before any other members are destroyed. |
494 base::WeakPtrFactory<DriveFileSystem> weak_ptr_factory_; | 485 base::WeakPtrFactory<DriveFileSystem> weak_ptr_factory_; |
495 | 486 |
496 DISALLOW_COPY_AND_ASSIGN(DriveFileSystem); | 487 DISALLOW_COPY_AND_ASSIGN(DriveFileSystem); |
497 }; | 488 }; |
498 | 489 |
499 } // namespace drive | 490 } // namespace drive |
500 | 491 |
501 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ | 492 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
OLD | NEW |