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

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

Issue 7041008: Moved ScopeStopObserving to a template class in change_processor.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up long line. Created 9 years, 6 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_profile_change_processor.cc
diff --git a/chrome/browser/sync/glue/autofill_profile_change_processor.cc b/chrome/browser/sync/glue/autofill_profile_change_processor.cc
index 833e58e941d3816d1353a4fe24661c7e7e93fba9..36b137264cd4ed9bb34e23785ba76f3759c0e820 100644
--- a/chrome/browser/sync/glue/autofill_profile_change_processor.cc
+++ b/chrome/browser/sync/glue/autofill_profile_change_processor.cc
@@ -46,22 +46,12 @@ AutofillProfileChangeProcessor::AutofillProfileChangeProcessor(
AutofillProfileChangeProcessor::~AutofillProfileChangeProcessor() {}
-AutofillProfileChangeProcessor::ScopedStopObserving::ScopedStopObserving(
- AutofillProfileChangeProcessor* processor) {
- processor_ = processor;
- processor_->StopObserving();
-}
-
-AutofillProfileChangeProcessor::ScopedStopObserving::~ScopedStopObserving() {
- processor_->StartObserving();
-}
-
void AutofillProfileChangeProcessor::ApplyChangesFromSyncModel(
const sync_api::BaseTransaction *write_trans,
const sync_api::SyncManager::ChangeRecord* changes,
int change_count) {
- ScopedStopObserving observer(this);
+ ScopedStopObserving<AutofillProfileChangeProcessor> observer(this);
sync_api::ReadNode autofill_profile_root(write_trans);
if (!autofill_profile_root.InitByTagLookup(kAutofillProfileTag)) {
@@ -174,7 +164,7 @@ void AutofillProfileChangeProcessor::CommitChangesFromSyncModel() {
if (!running())
return;
- ScopedStopObserving observer(this);
+ ScopedStopObserving<AutofillProfileChangeProcessor> observer(this);
for (unsigned int i = 0;i < autofill_changes_.size(); ++i) {
if (sync_api::SyncManager::ChangeRecord::ACTION_DELETE ==
« no previous file with comments | « chrome/browser/sync/glue/autofill_profile_change_processor.h ('k') | chrome/browser/sync/glue/change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698