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

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

Issue 1915983003: [Sync] Fix crash in GCP when adding encrypted entry that already exists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // 127 //
128 // |new_attachments| is an output parameter containing newly added attachments 128 // |new_attachments| is an output parameter containing newly added attachments
129 // that need to be stored. This method will append to it. 129 // that need to be stored. This method will append to it.
130 syncer::SyncError HandleActionUpdate( 130 syncer::SyncError HandleActionUpdate(
131 const syncer::SyncChange& change, 131 const syncer::SyncChange& change,
132 const std::string& type_str, 132 const std::string& type_str,
133 const syncer::WriteTransaction& trans, 133 const syncer::WriteTransaction& trans,
134 syncer::WriteNode* sync_node, 134 syncer::WriteNode* sync_node,
135 syncer::AttachmentIdSet* new_attachments); 135 syncer::AttachmentIdSet* new_attachments);
136 136
137 // Handle decryption error encountered when reading existing entry. This
138 // helper funciton is used in HandleActionAdd and HandleActionUpdate.
139 syncer::SyncError HandleDecryptionError(const std::string& type_str,
140 const syncer::WriteTransaction& trans,
141 syncer::WriteNode* sync_node);
142
137 // Begin uploading attachments that have not yet been uploaded to the sync 143 // Begin uploading attachments that have not yet been uploaded to the sync
138 // server. 144 // server.
139 void UploadAllAttachmentsNotOnServer(); 145 void UploadAllAttachmentsNotOnServer();
140 146
141 const syncer::ModelType type_; 147 const syncer::ModelType type_;
142 148
143 // The SyncableService this change processor will forward changes on to. 149 // The SyncableService this change processor will forward changes on to.
144 const base::WeakPtr<syncer::SyncableService> local_service_; 150 const base::WeakPtr<syncer::SyncableService> local_service_;
145 151
146 // A SyncMergeResult used to track the changes made during association. The 152 // A SyncMergeResult used to track the changes made during association. The
(...skipping 26 matching lines...) Expand all
173 attachment_service_weak_ptr_factory_; 179 attachment_service_weak_ptr_factory_;
174 syncer::AttachmentServiceProxy attachment_service_proxy_; 180 syncer::AttachmentServiceProxy attachment_service_proxy_;
175 base::WeakPtrFactory<GenericChangeProcessor> weak_ptr_factory_; 181 base::WeakPtrFactory<GenericChangeProcessor> weak_ptr_factory_;
176 182
177 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); 183 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor);
178 }; 184 };
179 185
180 } // namespace sync_driver 186 } // namespace sync_driver
181 187
182 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_H_ 188 #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') | components/sync_driver/generic_change_processor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698