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

Unified Diff: chrome/browser/sync/glue/autofill_change_processor.cc

Issue 8341094: Changed change processors to use ScopedStopObserving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary call to StartObserving(). Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/autofill_change_processor.cc
diff --git a/chrome/browser/sync/glue/autofill_change_processor.cc b/chrome/browser/sync/glue/autofill_change_processor.cc
index f92f2dfdb11ddb9785e5f307c892ec56b99f640e..afdc701557f8c3ce1c05d6e000b1aa94d3fa5637 100644
--- a/chrome/browser/sync/glue/autofill_change_processor.cc
+++ b/chrome/browser/sync/glue/autofill_change_processor.cc
@@ -196,7 +196,7 @@ void AutofillChangeProcessor::ApplyChangesFromSyncModel(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
if (!running())
return;
- StopObserving();
+ ScopedStopObserving<AutofillChangeProcessor> stop_observing(this);
sync_api::ReadNode autofill_root(trans);
if (!autofill_root.InitByTagLookup(kAutofillTag)) {
@@ -249,15 +249,13 @@ void AutofillChangeProcessor::ApplyChangesFromSyncModel(
NOTREACHED() << "Autofill specifics has no data!";
}
}
-
- StartObserving();
}
void AutofillChangeProcessor::CommitChangesFromSyncModel() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
if (!running())
return;
- StopObserving();
+ ScopedStopObserving<AutofillChangeProcessor> stop_observing(this);
std::vector<AutofillEntry> new_entries;
for (unsigned int i = 0; i < autofill_changes_.size(); i++) {
@@ -300,7 +298,6 @@ void AutofillChangeProcessor::CommitChangesFromSyncModel() {
WebDataService::NotifyOfMultipleAutofillChanges(
profile_->GetWebDataService(Profile::EXPLICIT_ACCESS));
- StartObserving();
}
void AutofillChangeProcessor::ApplySyncAutofillEntryDelete(
« no previous file with comments | « chrome/browser/sync/glue/autofill_change_processor.h ('k') | chrome/browser/sync/glue/password_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698