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

Side by Side Diff: chrome/browser/sync/glue/password_change_processor.cc

Issue 9978017: [Sync] - Upload the callstacks for errors so that the line number of error is in callstack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/sync/glue/password_change_processor.h" 5 #include "chrome/browser/sync/glue/password_change_processor.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 } 215 }
216 } 216 }
217 217
218 void PasswordChangeProcessor::CommitChangesFromSyncModel() { 218 void PasswordChangeProcessor::CommitChangesFromSyncModel() {
219 DCHECK(expected_loop_ == MessageLoop::current()); 219 DCHECK(expected_loop_ == MessageLoop::current());
220 if (!running()) 220 if (!running())
221 return; 221 return;
222 ScopedStopObserving<PasswordChangeProcessor> stop_observing(this); 222 ScopedStopObserving<PasswordChangeProcessor> stop_observing(this);
223 223
224 if (!model_associator_->WriteToPasswordStore(&new_passwords_, 224 SyncError error = model_associator_->WriteToPasswordStore(
225 &updated_passwords_, 225 &new_passwords_,
226 &deleted_passwords_)) { 226 &updated_passwords_,
227 &deleted_passwords_);
228 if (error.IsSet()) {
227 error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE, 229 error_handler()->OnSingleDatatypeUnrecoverableError(FROM_HERE,
228 "Error writing passwords"); 230 "Error writing passwords");
229 return; 231 return;
230 } 232 }
231 233
232 deleted_passwords_.clear(); 234 deleted_passwords_.clear();
233 new_passwords_.clear(); 235 new_passwords_.clear();
234 updated_passwords_.clear(); 236 updated_passwords_.clear();
235 } 237 }
236 238
(...skipping 17 matching lines...) Expand all
254 256
255 void PasswordChangeProcessor::StopObserving() { 257 void PasswordChangeProcessor::StopObserving() {
256 DCHECK(expected_loop_ == MessageLoop::current()); 258 DCHECK(expected_loop_ == MessageLoop::current());
257 notification_registrar_.Remove( 259 notification_registrar_.Remove(
258 this, 260 this,
259 chrome::NOTIFICATION_LOGINS_CHANGED, 261 chrome::NOTIFICATION_LOGINS_CHANGED,
260 content::Source<PasswordStore>(password_store_)); 262 content::Source<PasswordStore>(password_store_));
261 } 263 }
262 264
263 } // namespace browser_sync 265 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698