Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: chrome/browser/chromeos/drive/drive_file_system.h

Issue 14118006: Change owner of DriveScheduler from DriveFileSystem to DriveSystemService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_file_system.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 // The production implementation of DriveFileSystemInterface. 52 // The production implementation of DriveFileSystemInterface.
53 class DriveFileSystem : public DriveFileSystemInterface, 53 class DriveFileSystem : public DriveFileSystemInterface,
54 public ChangeListLoaderObserver, 54 public ChangeListLoaderObserver,
55 public file_system::OperationObserver { 55 public file_system::OperationObserver {
56 public: 56 public:
57 DriveFileSystem(Profile* profile, 57 DriveFileSystem(Profile* profile,
58 DriveCache* cache, 58 DriveCache* cache,
59 google_apis::DriveServiceInterface* drive_service, 59 google_apis::DriveServiceInterface* drive_service,
60 DriveScheduler* scheduler,
60 DriveWebAppsRegistry* webapps_registry, 61 DriveWebAppsRegistry* webapps_registry,
61 DriveResourceMetadata* resource_metadata, 62 DriveResourceMetadata* resource_metadata,
62 base::SequencedTaskRunner* blocking_task_runner); 63 base::SequencedTaskRunner* blocking_task_runner);
63 virtual ~DriveFileSystem(); 64 virtual ~DriveFileSystem();
64 65
65 // DriveFileSystem overrides. 66 // DriveFileSystem overrides.
66 virtual void Initialize() OVERRIDE; 67 virtual void Initialize() OVERRIDE;
67 virtual void AddObserver(DriveFileSystemObserver* observer) OVERRIDE; 68 virtual void AddObserver(DriveFileSystemObserver* observer) OVERRIDE;
68 virtual void RemoveObserver(DriveFileSystemObserver* observer) OVERRIDE; 69 virtual void RemoveObserver(DriveFileSystemObserver* observer) OVERRIDE;
69 virtual void CheckForUpdates() OVERRIDE; 70 virtual void CheckForUpdates() OVERRIDE;
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 const base::FilePath& local_cache_path); 445 const base::FilePath& local_cache_path);
445 void CheckLocalModificationAndRunAfterGetFileInfo( 446 void CheckLocalModificationAndRunAfterGetFileInfo(
446 scoped_ptr<DriveEntryProto> entry_proto, 447 scoped_ptr<DriveEntryProto> entry_proto,
447 const GetEntryInfoCallback& callback, 448 const GetEntryInfoCallback& callback,
448 base::PlatformFileInfo* file_info, 449 base::PlatformFileInfo* file_info,
449 bool get_file_info_result); 450 bool get_file_info_result);
450 451
451 // The profile hosts the DriveFileSystem via DriveSystemService. 452 // The profile hosts the DriveFileSystem via DriveSystemService.
452 Profile* profile_; 453 Profile* profile_;
453 454
454 // The cache owned by DriveSystemService. 455 // Sub components owned by DriveSystemService.
455 DriveCache* cache_; 456 DriveCache* cache_;
456
457 // The document service owned by DriveSystemService.
458 google_apis::DriveServiceInterface* drive_service_; 457 google_apis::DriveServiceInterface* drive_service_;
459 458 DriveScheduler* scheduler_;
460 // The webapps registry owned by DriveSystemService.
461 DriveWebAppsRegistry* webapps_registry_; 459 DriveWebAppsRegistry* webapps_registry_;
462
463 DriveResourceMetadata* resource_metadata_; 460 DriveResourceMetadata* resource_metadata_;
464 461
465 // Time of the last update check. 462 // Time of the last update check.
466 base::Time last_update_check_time_; 463 base::Time last_update_check_time_;
467 464
468 // Error of the last update check. 465 // Error of the last update check.
469 DriveFileError last_update_check_error_; 466 DriveFileError last_update_check_error_;
470 467
471 // True if hosted documents should be hidden. 468 // True if hosted documents should be hidden.
472 bool hide_hosted_docs_; 469 bool hide_hosted_docs_;
473 470
474 // The set of paths opened by OpenFile but not yet closed by CloseFile. 471 // The set of paths opened by OpenFile but not yet closed by CloseFile.
475 std::set<base::FilePath> open_files_; 472 std::set<base::FilePath> open_files_;
476 473
477 scoped_ptr<PrefChangeRegistrar> pref_registrar_; 474 scoped_ptr<PrefChangeRegistrar> pref_registrar_;
478 475
479 // The loader is used to load the change lists. 476 // The loader is used to load the change lists.
480 scoped_ptr<ChangeListLoader> change_list_loader_; 477 scoped_ptr<ChangeListLoader> change_list_loader_;
481 478
482 ObserverList<DriveFileSystemObserver> observers_; 479 ObserverList<DriveFileSystemObserver> observers_;
483 480
484 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 481 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
485 482
486 file_system::DriveOperations drive_operations_; 483 file_system::DriveOperations drive_operations_;
487 484
488 scoped_ptr<DriveScheduler> scheduler_;
489
490 // Polling interval for checking updates in seconds. 485 // Polling interval for checking updates in seconds.
491 int polling_interval_sec_; 486 int polling_interval_sec_;
492 487
493 // Note: This should remain the last member so it'll be destroyed and 488 // Note: This should remain the last member so it'll be destroyed and
494 // invalidate the weak pointers before any other members are destroyed. 489 // invalidate the weak pointers before any other members are destroyed.
495 base::WeakPtrFactory<DriveFileSystem> weak_ptr_factory_; 490 base::WeakPtrFactory<DriveFileSystem> weak_ptr_factory_;
496 491
497 DISALLOW_COPY_AND_ASSIGN(DriveFileSystem); 492 DISALLOW_COPY_AND_ASSIGN(DriveFileSystem);
498 }; 493 };
499 494
500 } // namespace drive 495 } // namespace drive
501 496
502 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ 497 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698