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

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

Issue 23670006: Use DriveService for proper resource id resolution in ChangeListLoader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/change_list_loader.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_CHANGE_LIST_LOADER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 14 matching lines...) Expand all
25 class SequencedTaskRunner; 25 class SequencedTaskRunner;
26 } // namespace base 26 } // namespace base
27 27
28 namespace google_apis { 28 namespace google_apis {
29 class AboutResource; 29 class AboutResource;
30 class ResourceList; 30 class ResourceList;
31 } // namespace google_apis 31 } // namespace google_apis
32 32
33 namespace drive { 33 namespace drive {
34 34
35 class DriveServiceInterface;
35 class JobScheduler; 36 class JobScheduler;
36 class ResourceEntry; 37 class ResourceEntry;
37 38
38 namespace internal { 39 namespace internal {
39 40
40 class ChangeList; 41 class ChangeList;
41 class ChangeListLoaderObserver; 42 class ChangeListLoaderObserver;
42 class ChangeListProcessor; 43 class ChangeListProcessor;
43 class DirectoryFetchInfo; 44 class DirectoryFetchInfo;
44 class ResourceMetadata; 45 class ResourceMetadata;
(...skipping 12 matching lines...) Expand all
57 // "resource list" refers to metadata from the server when fetching the full 58 // "resource list" refers to metadata from the server when fetching the full
58 // resource metadata, or fetching directory contents, whereas "change list" 59 // resource metadata, or fetching directory contents, whereas "change list"
59 // refers to metadata from the server when fetching changes (delta). 60 // refers to metadata from the server when fetching changes (delta).
60 class ChangeListLoader { 61 class ChangeListLoader {
61 public: 62 public:
62 // Resource feed fetcher from the server. 63 // Resource feed fetcher from the server.
63 class FeedFetcher; 64 class FeedFetcher;
64 65
65 ChangeListLoader(base::SequencedTaskRunner* blocking_task_runner, 66 ChangeListLoader(base::SequencedTaskRunner* blocking_task_runner,
66 ResourceMetadata* resource_metadata, 67 ResourceMetadata* resource_metadata,
67 JobScheduler* scheduler); 68 JobScheduler* scheduler,
69 DriveServiceInterface* drive_service);
68 ~ChangeListLoader(); 70 ~ChangeListLoader();
69 71
70 // Indicates whether there is a request for full resource list or change 72 // Indicates whether there is a request for full resource list or change
71 // list fetching is in flight (i.e. directory contents fetching does not 73 // list fetching is in flight (i.e. directory contents fetching does not
72 // count). 74 // count).
73 bool IsRefreshing() const; 75 bool IsRefreshing() const;
74 76
75 // Adds and removes the observer. 77 // Adds and removes the observer.
76 void AddObserver(ChangeListLoaderObserver* observer); 78 void AddObserver(ChangeListLoaderObserver* observer);
77 void RemoveObserver(ChangeListLoaderObserver* observer); 79 void RemoveObserver(ChangeListLoaderObserver* observer);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // Notifies directory changes per the result of the change list processing. 260 // Notifies directory changes per the result of the change list processing.
259 void UpdateFromChangeListAfterApply( 261 void UpdateFromChangeListAfterApply(
260 ChangeListProcessor* change_list_processor, 262 ChangeListProcessor* change_list_processor,
261 bool should_notify, 263 bool should_notify,
262 base::Time start_time, 264 base::Time start_time,
263 const base::Closure& callback); 265 const base::Closure& callback);
264 266
265 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 267 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
266 ResourceMetadata* resource_metadata_; // Not owned. 268 ResourceMetadata* resource_metadata_; // Not owned.
267 JobScheduler* scheduler_; // Not owned. 269 JobScheduler* scheduler_; // Not owned.
270 DriveServiceInterface* drive_service_; // Not owned.
268 ObserverList<ChangeListLoaderObserver> observers_; 271 ObserverList<ChangeListLoaderObserver> observers_;
269 typedef std::map<std::string, std::vector<FileOperationCallback> > 272 typedef std::map<std::string, std::vector<FileOperationCallback> >
270 LoadCallbackMap; 273 LoadCallbackMap;
271 LoadCallbackMap pending_load_callback_; 274 LoadCallbackMap pending_load_callback_;
272 FileOperationCallback pending_update_check_callback_; 275 FileOperationCallback pending_update_check_callback_;
273 276
274 // Running feed fetcher. 277 // Running feed fetcher.
275 scoped_ptr<FeedFetcher> change_feed_fetcher_; 278 scoped_ptr<FeedFetcher> change_feed_fetcher_;
276 279
277 // Set of the running feed fetcher for the fast fetch. 280 // Set of the running feed fetcher for the fast fetch.
(...skipping 13 matching lines...) Expand all
291 // Note: This should remain the last member so it'll be destroyed and 294 // Note: This should remain the last member so it'll be destroyed and
292 // invalidate its weak pointers before any other members are destroyed. 295 // invalidate its weak pointers before any other members are destroyed.
293 base::WeakPtrFactory<ChangeListLoader> weak_ptr_factory_; 296 base::WeakPtrFactory<ChangeListLoader> weak_ptr_factory_;
294 DISALLOW_COPY_AND_ASSIGN(ChangeListLoader); 297 DISALLOW_COPY_AND_ASSIGN(ChangeListLoader);
295 }; 298 };
296 299
297 } // namespace internal 300 } // namespace internal
298 } // namespace drive 301 } // namespace drive
299 302
300 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_ 303 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/change_list_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698