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

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

Issue 102133008: drive: Call OnDirectoryChanged from EntryRevertPerformer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test Created 7 years 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_REMOVE_PERFORMER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_REMOVE_PERFORMER_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_REMOVE_PERFORMER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_REMOVE_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"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/chromeos/drive/file_errors.h" 12 #include "chrome/browser/chromeos/drive/file_errors.h"
13 #include "google_apis/drive/gdata_errorcode.h" 13 #include "google_apis/drive/gdata_errorcode.h"
14 14
15 namespace base { 15 namespace base {
16 class SequencedTaskRunner; 16 class SequencedTaskRunner;
17 } 17 }
18 18
19 namespace google_apis { 19 namespace google_apis {
20 class ResourceEntry; 20 class ResourceEntry;
21 } 21 }
22 22
23 namespace drive { 23 namespace drive {
24 24
25 class JobScheduler; 25 class JobScheduler;
26 class ResourceEntry; 26 class ResourceEntry;
27 27
28 namespace file_system {
29 class OperationObserver;
30 } // namespace file_system
31
28 namespace internal { 32 namespace internal {
29 33
30 class EntryRevertPerformer; 34 class EntryRevertPerformer;
31 class ResourceMetadata; 35 class ResourceMetadata;
32 36
33 // This class encapsulates the drive Remove function. It is responsible for 37 // This class encapsulates the drive Remove function. It is responsible for
34 // sending the request to the drive API, then updating the local state and 38 // sending the request to the drive API, then updating the local state and
35 // metadata to reflect the new state. 39 // metadata to reflect the new state.
36 class RemovePerformer { 40 class RemovePerformer {
37 public: 41 public:
38 RemovePerformer(base::SequencedTaskRunner* blocking_task_runner, 42 RemovePerformer(base::SequencedTaskRunner* blocking_task_runner,
43 file_system::OperationObserver* observer,
39 JobScheduler* scheduler, 44 JobScheduler* scheduler,
40 ResourceMetadata* metadata); 45 ResourceMetadata* metadata);
41 ~RemovePerformer(); 46 ~RemovePerformer();
42 47
43 // Removes the resource. 48 // Removes the resource.
44 // 49 //
45 // |callback| must not be null. 50 // |callback| must not be null.
46 void Remove(const std::string& local_id, 51 void Remove(const std::string& local_id,
47 const FileOperationCallback& callback); 52 const FileOperationCallback& callback);
48 53
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // 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
90 // invalidate the weak pointers before any other members are destroyed. 95 // invalidate the weak pointers before any other members are destroyed.
91 base::WeakPtrFactory<RemovePerformer> weak_ptr_factory_; 96 base::WeakPtrFactory<RemovePerformer> weak_ptr_factory_;
92 DISALLOW_COPY_AND_ASSIGN(RemovePerformer); 97 DISALLOW_COPY_AND_ASSIGN(RemovePerformer);
93 }; 98 };
94 99
95 } // namespace internal 100 } // namespace internal
96 } // namespace drive 101 } // namespace drive
97 102
98 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_REMOVE_PERFORMER_H_ 103 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_REMOVE_PERFORMER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698