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

Side by Side Diff: chrome/browser/chromeos/drive/sync/entry_update_performer.h

Issue 408143014: Rename OperationObserver to OperationDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SYNC_ENTRY_UPDATE_PERFORMER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_UPDATE_PERFORMER_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_UPDATE_PERFORMER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_UPDATE_PERFORMER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 11 matching lines...) Expand all
22 } // namespace google_apis 22 } // namespace google_apis
23 23
24 namespace drive { 24 namespace drive {
25 25
26 class FileChange; 26 class FileChange;
27 class JobScheduler; 27 class JobScheduler;
28 class ResourceEntry; 28 class ResourceEntry;
29 struct ClientContext; 29 struct ClientContext;
30 30
31 namespace file_system { 31 namespace file_system {
32 class OperationObserver; 32 class OperationDelegate;
33 } // namespace file_system 33 } // namespace file_system
34 34
35 namespace internal { 35 namespace internal {
36 36
37 class EntryRevertPerformer; 37 class EntryRevertPerformer;
38 class FileCache; 38 class FileCache;
39 class LoaderController; 39 class LoaderController;
40 class RemovePerformer; 40 class RemovePerformer;
41 class ResourceMetadata; 41 class ResourceMetadata;
42 42
43 // This class is responsible to perform server side update of an entry. 43 // This class is responsible to perform server side update of an entry.
44 class EntryUpdatePerformer { 44 class EntryUpdatePerformer {
45 public: 45 public:
46 EntryUpdatePerformer(base::SequencedTaskRunner* blocking_task_runner, 46 EntryUpdatePerformer(base::SequencedTaskRunner* blocking_task_runner,
47 file_system::OperationObserver* observer, 47 file_system::OperationDelegate* delegate,
48 JobScheduler* scheduler, 48 JobScheduler* scheduler,
49 ResourceMetadata* metadata, 49 ResourceMetadata* metadata,
50 FileCache* cache, 50 FileCache* cache,
51 LoaderController* loader_controller); 51 LoaderController* loader_controller);
52 ~EntryUpdatePerformer(); 52 ~EntryUpdatePerformer();
53 53
54 // Requests the server to update the metadata of the entry specified by 54 // Requests the server to update the metadata of the entry specified by
55 // |local_id| with the locally stored one. 55 // |local_id| with the locally stored one.
56 // Invokes |callback| when finished with the result of the operation. 56 // Invokes |callback| when finished with the result of the operation.
57 // |callback| must not be null. 57 // |callback| must not be null.
(...skipping 18 matching lines...) Expand all
76 scoped_ptr<base::ScopedClosureRunner> loader_lock, 76 scoped_ptr<base::ScopedClosureRunner> loader_lock,
77 google_apis::GDataErrorCode status, 77 google_apis::GDataErrorCode status,
78 scoped_ptr<google_apis::FileResource> entry); 78 scoped_ptr<google_apis::FileResource> entry);
79 79
80 // Part of UpdateEntry(). Called after FinishUpdate is completed. 80 // Part of UpdateEntry(). Called after FinishUpdate is completed.
81 void UpdateEntryAfterFinish(const FileOperationCallback& callback, 81 void UpdateEntryAfterFinish(const FileOperationCallback& callback,
82 const FileChange* changed_files, 82 const FileChange* changed_files,
83 FileError error); 83 FileError error);
84 84
85 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 85 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
86 file_system::OperationObserver* observer_; 86 file_system::OperationDelegate* delegate_;
87 JobScheduler* scheduler_; 87 JobScheduler* scheduler_;
88 ResourceMetadata* metadata_; 88 ResourceMetadata* metadata_;
89 FileCache* cache_; 89 FileCache* cache_;
90 LoaderController* loader_controller_; 90 LoaderController* loader_controller_;
91 scoped_ptr<RemovePerformer> remove_performer_; 91 scoped_ptr<RemovePerformer> remove_performer_;
92 scoped_ptr<EntryRevertPerformer> entry_revert_performer_; 92 scoped_ptr<EntryRevertPerformer> entry_revert_performer_;
93 93
94 // Note: This should remain the last member so it'll be destroyed and 94 // Note: This should remain the last member so it'll be destroyed and
95 // invalidate the weak pointers before any other members are destroyed. 95 // invalidate the weak pointers before any other members are destroyed.
96 base::WeakPtrFactory<EntryUpdatePerformer> weak_ptr_factory_; 96 base::WeakPtrFactory<EntryUpdatePerformer> weak_ptr_factory_;
97 DISALLOW_COPY_AND_ASSIGN(EntryUpdatePerformer); 97 DISALLOW_COPY_AND_ASSIGN(EntryUpdatePerformer);
98 }; 98 };
99 99
100 } // namespace internal 100 } // namespace internal
101 } // namespace drive 101 } // namespace drive
102 102
103 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_UPDATE_PERFORMER_H_ 103 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_UPDATE_PERFORMER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698