| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |