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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_system_service.h

Issue 10832241: Drive: Removes unused cache files after the initial feed fetch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move the ownership of |stale_cache_files_remover_| to GDataSystemService (reverting Patch Set 15) Created 8 years, 4 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
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_GDATA_GDATA_SYSTEM_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 10 matching lines...) Expand all
21 21
22 class DriveCache; 22 class DriveCache;
23 class DriveServiceInterface; 23 class DriveServiceInterface;
24 class DriveWebAppsRegistry; 24 class DriveWebAppsRegistry;
25 class FileWriteHelper; 25 class FileWriteHelper;
26 class GDataContactsService; 26 class GDataContactsService;
27 class GDataDownloadObserver; 27 class GDataDownloadObserver;
28 class GDataFileSystemInterface; 28 class GDataFileSystemInterface;
29 class GDataSyncClient; 29 class GDataSyncClient;
30 class GDataUploader; 30 class GDataUploader;
31 class StaleCacheFilesRemover;
31 32
32 // GDataSystemService runs the GData system, including the GData file system 33 // GDataSystemService runs the GData system, including the GData file system
33 // implementation for the file manager, and some other sub systems. 34 // implementation for the file manager, and some other sub systems.
34 // 35 //
35 // The class is essentially a container that manages lifetime of the objects 36 // The class is essentially a container that manages lifetime of the objects
36 // that are used to run the GData system. The GDataSystemService object is 37 // that are used to run the GData system. The GDataSystemService object is
37 // created per-profile. 38 // created per-profile.
38 class GDataSystemService : public ProfileKeyedService { 39 class GDataSystemService : public ProfileKeyedService {
39 public: 40 public:
40 DriveServiceInterface* drive_service() { return drive_service_.get(); } 41 DriveServiceInterface* drive_service() { return drive_service_.get(); }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 79 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
79 DriveCache* cache_; 80 DriveCache* cache_;
80 scoped_ptr<DriveServiceInterface> drive_service_; 81 scoped_ptr<DriveServiceInterface> drive_service_;
81 scoped_ptr<GDataUploader> uploader_; 82 scoped_ptr<GDataUploader> uploader_;
82 scoped_ptr<DriveWebAppsRegistry> webapps_registry_; 83 scoped_ptr<DriveWebAppsRegistry> webapps_registry_;
83 scoped_ptr<GDataFileSystemInterface> file_system_; 84 scoped_ptr<GDataFileSystemInterface> file_system_;
84 scoped_ptr<FileWriteHelper> file_write_helper_; 85 scoped_ptr<FileWriteHelper> file_write_helper_;
85 scoped_ptr<GDataDownloadObserver> download_observer_; 86 scoped_ptr<GDataDownloadObserver> download_observer_;
86 scoped_ptr<GDataSyncClient> sync_client_; 87 scoped_ptr<GDataSyncClient> sync_client_;
87 scoped_ptr<GDataContactsService> contacts_service_; 88 scoped_ptr<GDataContactsService> contacts_service_;
89 scoped_ptr<StaleCacheFilesRemover> stale_cache_files_remover_;
88 base::WeakPtrFactory<GDataSystemService> weak_ptr_factory_; 90 base::WeakPtrFactory<GDataSystemService> weak_ptr_factory_;
89 91
90 DISALLOW_COPY_AND_ASSIGN(GDataSystemService); 92 DISALLOW_COPY_AND_ASSIGN(GDataSystemService);
91 }; 93 };
92 94
93 // Singleton that owns all GDataSystemServices and associates them with 95 // Singleton that owns all GDataSystemServices and associates them with
94 // Profiles. 96 // Profiles.
95 class GDataSystemServiceFactory : public ProfileKeyedServiceFactory { 97 class GDataSystemServiceFactory : public ProfileKeyedServiceFactory {
96 public: 98 public:
97 // Returns the GDataSystemService for |profile|, creating it if it is not 99 // Returns the GDataSystemService for |profile|, creating it if it is not
(...skipping 26 matching lines...) Expand all
124 virtual ~GDataSystemServiceFactory(); 126 virtual ~GDataSystemServiceFactory();
125 127
126 // ProfileKeyedServiceFactory: 128 // ProfileKeyedServiceFactory:
127 virtual ProfileKeyedService* BuildServiceInstanceFor( 129 virtual ProfileKeyedService* BuildServiceInstanceFor(
128 Profile* profile) const OVERRIDE; 130 Profile* profile) const OVERRIDE;
129 }; 131 };
130 132
131 } // namespace gdata 133 } // namespace gdata
132 134
133 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_ 135 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698