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

Side by Side Diff: sync/engine/directory_update_handler.h

Issue 260613002: sync: Expose DirectoryDebugInfoEmitters in engine (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comment Created 6 years, 7 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 | « sync/engine/directory_commit_contributor.cc ('k') | sync/engine/directory_update_handler.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SYNC_ENGINE_DIRECTORY_UPDATE_HANDLER_H_ 5 #ifndef SYNC_ENGINE_DIRECTORY_UPDATE_HANDLER_H_
6 #define SYNC_ENGINE_DIRECTORY_UPDATE_HANDLER_H_ 6 #define SYNC_ENGINE_DIRECTORY_UPDATE_HANDLER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 14 matching lines...) Expand all
25 namespace syncer { 25 namespace syncer {
26 26
27 namespace sessions { 27 namespace sessions {
28 class StatusController; 28 class StatusController;
29 } 29 }
30 30
31 namespace syncable { 31 namespace syncable {
32 class Directory; 32 class Directory;
33 } 33 }
34 34
35 class DirectoryTypeDebugInfoEmitter;
35 class ModelSafeWorker; 36 class ModelSafeWorker;
36 37
37 // This class represents the syncable::Directory's processes for requesting and 38 // This class represents the syncable::Directory's processes for requesting and
38 // processing updates from the sync server. 39 // processing updates from the sync server.
39 // 40 //
40 // Each instance of this class represents a particular type in the 41 // Each instance of this class represents a particular type in the
41 // syncable::Directory. It can store and retreive that type's progress markers. 42 // syncable::Directory. It can store and retreive that type's progress markers.
42 // It can also process a set of received SyncEntities and store their data. 43 // It can also process a set of received SyncEntities and store their data.
43 class SYNC_EXPORT_PRIVATE DirectoryUpdateHandler : public UpdateHandler { 44 class SYNC_EXPORT_PRIVATE DirectoryUpdateHandler : public UpdateHandler {
44 public: 45 public:
45 DirectoryUpdateHandler(syncable::Directory* dir, 46 DirectoryUpdateHandler(syncable::Directory* dir,
46 ModelType type, 47 ModelType type,
47 scoped_refptr<ModelSafeWorker> worker); 48 scoped_refptr<ModelSafeWorker> worker,
49 DirectoryTypeDebugInfoEmitter* debug_info_emitter);
48 virtual ~DirectoryUpdateHandler(); 50 virtual ~DirectoryUpdateHandler();
49 51
50 // UpdateHandler implementation. 52 // UpdateHandler implementation.
51 virtual void GetDownloadProgress( 53 virtual void GetDownloadProgress(
52 sync_pb::DataTypeProgressMarker* progress_marker) const OVERRIDE; 54 sync_pb::DataTypeProgressMarker* progress_marker) const OVERRIDE;
53 virtual void GetDataTypeContext(sync_pb::DataTypeContext* context) const 55 virtual void GetDataTypeContext(sync_pb::DataTypeContext* context) const
54 OVERRIDE; 56 OVERRIDE;
55 virtual SyncerError ProcessGetUpdatesResponse( 57 virtual SyncerError ProcessGetUpdatesResponse(
56 const sync_pb::DataTypeProgressMarker& progress_marker, 58 const sync_pb::DataTypeProgressMarker& progress_marker,
57 const sync_pb::DataTypeContext& mutated_context, 59 const sync_pb::DataTypeContext& mutated_context,
(...skipping 28 matching lines...) Expand all
86 88
87 bool IsValidProgressMarker( 89 bool IsValidProgressMarker(
88 const sync_pb::DataTypeProgressMarker& progress_marker) const; 90 const sync_pb::DataTypeProgressMarker& progress_marker) const;
89 91
90 // Skips all checks and goes straight to applying the updates. 92 // Skips all checks and goes straight to applying the updates.
91 SyncerError ApplyUpdatesImpl(sessions::StatusController* status); 93 SyncerError ApplyUpdatesImpl(sessions::StatusController* status);
92 94
93 syncable::Directory* dir_; 95 syncable::Directory* dir_;
94 ModelType type_; 96 ModelType type_;
95 scoped_refptr<ModelSafeWorker> worker_; 97 scoped_refptr<ModelSafeWorker> worker_;
98 DirectoryTypeDebugInfoEmitter* debug_info_emitter_;
96 99
97 scoped_ptr<sync_pb::GarbageCollectionDirective> cached_gc_directive_; 100 scoped_ptr<sync_pb::GarbageCollectionDirective> cached_gc_directive_;
98 101
99 DISALLOW_COPY_AND_ASSIGN(DirectoryUpdateHandler); 102 DISALLOW_COPY_AND_ASSIGN(DirectoryUpdateHandler);
100 }; 103 };
101 104
102 } // namespace syncer 105 } // namespace syncer
103 106
104 #endif // SYNC_ENGINE_DIRECTORY_UPDATE_HANDLER_H_ 107 #endif // SYNC_ENGINE_DIRECTORY_UPDATE_HANDLER_H_
OLDNEW
« no previous file with comments | « sync/engine/directory_commit_contributor.cc ('k') | sync/engine/directory_update_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698