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

Side by Side Diff: chrome/browser/sync/glue/session_change_processor.h

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, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_GLUE_SESSION_CHANGE_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SESSION_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_CHANGE_PROCESSOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_CHANGE_PROCESSOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 virtual void ApplyChangesFromSyncModel( 50 virtual void ApplyChangesFromSyncModel(
51 const sync_api::BaseTransaction* trans, 51 const sync_api::BaseTransaction* trans,
52 const sync_api::ImmutableChangeRecordList& changes) OVERRIDE; 52 const sync_api::ImmutableChangeRecordList& changes) OVERRIDE;
53 53
54 protected: 54 protected:
55 // ChangeProcessor implementation. 55 // ChangeProcessor implementation.
56 virtual void StartImpl(Profile* profile) OVERRIDE; 56 virtual void StartImpl(Profile* profile) OVERRIDE;
57 virtual void StopImpl() OVERRIDE; 57 virtual void StopImpl() OVERRIDE;
58 58
59 private: 59 private:
60 friend class ScopedStopObserving<SessionChangeProcessor>;
60 void StartObserving(); 61 void StartObserving();
61 void StopObserving(); 62 void StopObserving();
62 SessionModelAssociator* session_model_associator_; 63 SessionModelAssociator* session_model_associator_;
63 content::NotificationRegistrar notification_registrar_; 64 content::NotificationRegistrar notification_registrar_;
64 65
65 // Owner of the SessionService. Non-NULL iff |running()| is true. 66 // Owner of the SessionService. Non-NULL iff |running()| is true.
66 Profile* profile_; 67 Profile* profile_;
67 68
68 // To bypass some checks/codepaths not applicable in tests. 69 // To bypass some checks/codepaths not applicable in tests.
69 bool setup_for_test_; 70 bool setup_for_test_;
70 71
71 DISALLOW_COPY_AND_ASSIGN(SessionChangeProcessor); 72 DISALLOW_COPY_AND_ASSIGN(SessionChangeProcessor);
72 }; 73 };
73 74
74 } // namespace browser_sync 75 } // namespace browser_sync
75 76
76 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_CHANGE_PROCESSOR_H_ 77 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_CHANGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/password_change_processor.cc ('k') | chrome/browser/sync/glue/session_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698