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

Unified Diff: chrome/browser/sync/glue/session_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/session_change_processor.cc
diff --git a/chrome/browser/sync/glue/session_change_processor.cc b/chrome/browser/sync/glue/session_change_processor.cc
index 4160df92a322e6dbabb3f97733fa1a384cd474aa..f649e574fa9b403d9b5393313210e816bb55dcce 100644
--- a/chrome/browser/sync/glue/session_change_processor.cc
+++ b/chrome/browser/sync/glue/session_change_processor.cc
@@ -214,7 +214,7 @@ void SessionChangeProcessor::ApplyChangesFromSyncModel(
return;
}
- StopObserving();
+ ScopedStopObserving<SessionChangeProcessor> stop_observing(this);
sync_api::ReadNode root(trans);
if (!root.InitByTagLookup(kSessionsTag)) {
@@ -261,7 +261,6 @@ void SessionChangeProcessor::ApplyChangesFromSyncModel(
// if encryption was turned on. In that case, the data is still the same,
// so we can ignore.
LOG(WARNING) << "Dropping modification to local session.";
- StartObserving();
return;
}
const base::Time& mtime = sync_node.GetModificationTime();
@@ -274,8 +273,6 @@ void SessionChangeProcessor::ApplyChangesFromSyncModel(
chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED,
content::Source<Profile>(profile_),
content::NotificationService::NoDetails());
-
- StartObserving();
}
void SessionChangeProcessor::StartImpl(Profile* profile) {
« no previous file with comments | « chrome/browser/sync/glue/session_change_processor.h ('k') | chrome/browser/sync/glue/theme_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698