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

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

Issue 1393633003: Sync: fix for the code that checks whether the initial download has completed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback Created 5 years, 2 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
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void ApplyUpdates(sessions::StatusController* status) override; 61 void ApplyUpdates(sessions::StatusController* status) override;
62 void PassiveApplyUpdates(sessions::StatusController* status) override; 62 void PassiveApplyUpdates(sessions::StatusController* status) override;
63 63
64 private: 64 private:
65 friend class DirectoryUpdateHandlerApplyUpdateTest; 65 friend class DirectoryUpdateHandlerApplyUpdateTest;
66 friend class DirectoryUpdateHandlerProcessUpdateTest; 66 friend class DirectoryUpdateHandlerProcessUpdateTest;
67 67
68 // Sometimes there is nothing to do, so we can return without doing anything. 68 // Sometimes there is nothing to do, so we can return without doing anything.
69 bool IsApplyUpdatesRequired(); 69 bool IsApplyUpdatesRequired();
70 70
71 // Called at the end of ApplyUpdates and PassiveApplyUpdates and performs
72 // steps common to both (even when IsApplyUpdatesRequired has returned
73 // false).
74 void PostApplyUpdates();
75
71 // Processes the given SyncEntities and stores their data in the directory. 76 // Processes the given SyncEntities and stores their data in the directory.
72 // Their types must match this update handler's type. 77 // Their types must match this update handler's type.
73 void UpdateSyncEntities( 78 void UpdateSyncEntities(
74 syncable::ModelNeutralWriteTransaction* trans, 79 syncable::ModelNeutralWriteTransaction* trans,
75 const SyncEntityList& applicable_updates, 80 const SyncEntityList& applicable_updates,
76 sessions::StatusController* status); 81 sessions::StatusController* status);
77 82
78 // Expires entries according to GC directives. 83 // Expires entries according to GC directives.
79 void ExpireEntriesIfNeeded( 84 void ExpireEntriesIfNeeded(
80 syncable::ModelNeutralWriteTransaction* trans, 85 syncable::ModelNeutralWriteTransaction* trans,
(...skipping 19 matching lines...) Expand all
100 DirectoryTypeDebugInfoEmitter* debug_info_emitter_; 105 DirectoryTypeDebugInfoEmitter* debug_info_emitter_;
101 106
102 scoped_ptr<sync_pb::GarbageCollectionDirective> cached_gc_directive_; 107 scoped_ptr<sync_pb::GarbageCollectionDirective> cached_gc_directive_;
103 108
104 DISALLOW_COPY_AND_ASSIGN(DirectoryUpdateHandler); 109 DISALLOW_COPY_AND_ASSIGN(DirectoryUpdateHandler);
105 }; 110 };
106 111
107 } // namespace syncer 112 } // namespace syncer
108 113
109 #endif // SYNC_ENGINE_DIRECTORY_UPDATE_HANDLER_H_ 114 #endif // SYNC_ENGINE_DIRECTORY_UPDATE_HANDLER_H_
OLDNEW
« no previous file with comments | « sync/engine/apply_control_data_updates_unittest.cc ('k') | sync/engine/directory_update_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698