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

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

Issue 343073003: Files.app: Provide detailed change information on onDirectoryChanged event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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_REVERT_PERFORMER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_REVERT_PERFORMER_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_REVERT_PERFORMER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_REVERT_PERFORMER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "chrome/browser/chromeos/drive/file_errors.h" 14 #include "chrome/browser/chromeos/drive/file_errors.h"
15 #include "google_apis/drive/gdata_errorcode.h" 15 #include "google_apis/drive/gdata_errorcode.h"
16 16
17 namespace base { 17 namespace base {
18 class SequencedTaskRunner; 18 class SequencedTaskRunner;
19 } // namespace base 19 } // namespace base
20 20
21 namespace google_apis { 21 namespace google_apis {
22 class FileResource; 22 class FileResource;
23 } // namespace google_apis 23 } // namespace google_apis
24 24
25 namespace drive { 25 namespace drive {
26 26
27 class FileChange;
27 class JobScheduler; 28 class JobScheduler;
28 class ResourceEntry; 29 class ResourceEntry;
29 struct ClientContext; 30 struct ClientContext;
30 31
31 namespace file_system { 32 namespace file_system {
32 class OperationObserver; 33 class OperationObserver;
33 } // namespace file_system 34 } // namespace file_system
34 35
35 namespace internal { 36 namespace internal {
36 37
(...skipping 24 matching lines...) Expand all
61 FileError error); 62 FileError error);
62 63
63 // Part of RevertEntry(). Called after GetFileResource is completed. 64 // Part of RevertEntry(). Called after GetFileResource is completed.
64 void RevertEntryAfterGetFileResource( 65 void RevertEntryAfterGetFileResource(
65 const FileOperationCallback& callback, 66 const FileOperationCallback& callback,
66 const std::string& local_id, 67 const std::string& local_id,
67 google_apis::GDataErrorCode status, 68 google_apis::GDataErrorCode status,
68 scoped_ptr<google_apis::FileResource> entry); 69 scoped_ptr<google_apis::FileResource> entry);
69 70
70 // Part of RevertEntry(). Called after local metadata is updated. 71 // Part of RevertEntry(). Called after local metadata is updated.
71 void RevertEntryAfterFinishRevert( 72 void RevertEntryAfterFinishRevert(const FileOperationCallback& callback,
72 const FileOperationCallback& callback, 73 const FileChange* changed_files,
73 const std::set<base::FilePath>* changed_directories, 74 FileError error);
74 FileError error);
75 75
76 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 76 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
77 file_system::OperationObserver* observer_; 77 file_system::OperationObserver* observer_;
78 JobScheduler* scheduler_; 78 JobScheduler* scheduler_;
79 ResourceMetadata* metadata_; 79 ResourceMetadata* metadata_;
80 80
81 // Note: This should remain the last member so it'll be destroyed and 81 // Note: This should remain the last member so it'll be destroyed and
82 // invalidate the weak pointers before any other members are destroyed. 82 // invalidate the weak pointers before any other members are destroyed.
83 base::WeakPtrFactory<EntryRevertPerformer> weak_ptr_factory_; 83 base::WeakPtrFactory<EntryRevertPerformer> weak_ptr_factory_;
84 DISALLOW_COPY_AND_ASSIGN(EntryRevertPerformer); 84 DISALLOW_COPY_AND_ASSIGN(EntryRevertPerformer);
85 }; 85 };
86 86
87 } // namespace internal 87 } // namespace internal
88 } // namespace drive 88 } // namespace drive
89 89
90 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_REVERT_PERFORMER_H_ 90 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_SYNC_ENTRY_REVERT_PERFORMER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_unittest.cc ('k') | chrome/browser/chromeos/drive/sync/entry_revert_performer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698