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

Side by Side Diff: components/sync_driver/generic_change_processor.h

Issue 265853004: Revert of Keep track of which attachments are referenced by which sync entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | components/sync_driver/generic_change_processor.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 COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_
6 #define COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ 6 #define COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual bool SyncModelHasUserCreatedNodes(syncer::ModelType type, 91 virtual bool SyncModelHasUserCreatedNodes(syncer::ModelType type,
92 bool* has_nodes); 92 bool* has_nodes);
93 virtual bool CryptoReadyIfNecessary(syncer::ModelType type); 93 virtual bool CryptoReadyIfNecessary(syncer::ModelType type);
94 94
95 protected: 95 protected:
96 // ChangeProcessor interface. 96 // ChangeProcessor interface.
97 virtual void StartImpl() OVERRIDE; // Does nothing. 97 virtual void StartImpl() OVERRIDE; // Does nothing.
98 virtual syncer::UserShare* share_handle() const OVERRIDE; 98 virtual syncer::UserShare* share_handle() const OVERRIDE;
99 99
100 private: 100 private:
101 // Logically part of ProcessSyncChanges. 101 // Helper methods for acting on changes coming from the datatype. These are
102 // 102 // logically part of ProcessSyncChanges.
103 // |new_attachments| is an output parameter containing newly added attachments
104 // that need to be stored. This method will append to it.
105 syncer::SyncError HandleActionAdd(const syncer::SyncChange& change, 103 syncer::SyncError HandleActionAdd(const syncer::SyncChange& change,
106 const std::string& type_str, 104 const std::string& type_str,
107 const syncer::ModelType& type, 105 const syncer::ModelType& type,
108 const syncer::WriteTransaction& trans, 106 const syncer::WriteTransaction& trans,
109 syncer::WriteNode* sync_node, 107 syncer::WriteNode* sync_node);
110 syncer::AttachmentList* new_attachments);
111
112 // Logically part of ProcessSyncChanges.
113 //
114 // |new_attachments| is an output parameter containing newly added attachments
115 // that need to be stored. This method will append to it.
116 syncer::SyncError HandleActionUpdate(const syncer::SyncChange& change, 108 syncer::SyncError HandleActionUpdate(const syncer::SyncChange& change,
117 const std::string& type_str, 109 const std::string& type_str,
118 const syncer::ModelType& type, 110 const syncer::ModelType& type,
119 const syncer::WriteTransaction& trans, 111 const syncer::WriteTransaction& trans,
120 syncer::WriteNode* sync_node, 112 syncer::WriteNode* sync_node);
121 syncer::AttachmentList* new_attachments);
122 113
123 // The SyncableService this change processor will forward changes on to. 114 // The SyncableService this change processor will forward changes on to.
124 const base::WeakPtr<syncer::SyncableService> local_service_; 115 const base::WeakPtr<syncer::SyncableService> local_service_;
125 116
126 // A SyncMergeResult used to track the changes made during association. The 117 // A SyncMergeResult used to track the changes made during association. The
127 // owner will invalidate the weak pointer when association is complete. While 118 // owner will invalidate the weak pointer when association is complete. While
128 // the pointer is valid though, we increment it with any changes received 119 // the pointer is valid though, we increment it with any changes received
129 // via ProcessSyncChanges. 120 // via ProcessSyncChanges.
130 const base::WeakPtr<syncer::SyncMergeResult> merge_result_; 121 const base::WeakPtr<syncer::SyncMergeResult> merge_result_;
131 122
(...skipping 16 matching lines...) Expand all
148 base::WeakPtrFactory<syncer::AttachmentService> 139 base::WeakPtrFactory<syncer::AttachmentService>
149 attachment_service_weak_ptr_factory_; 140 attachment_service_weak_ptr_factory_;
150 syncer::AttachmentServiceProxy attachment_service_proxy_; 141 syncer::AttachmentServiceProxy attachment_service_proxy_;
151 142
152 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); 143 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor);
153 }; 144 };
154 145
155 } // namespace browser_sync 146 } // namespace browser_sync
156 147
157 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ 148 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « no previous file | components/sync_driver/generic_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698