| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // SyncSessionContext encapsulates the contextual information and engine | 5 // SyncSessionContext encapsulates the contextual information and engine |
| 6 // components specific to a SyncSession. A context is accessible via | 6 // components specific to a SyncSession. A context is accessible via |
| 7 // a SyncSession so that session SyncerCommands and parts of the engine have | 7 // a SyncSession so that session SyncerCommands and parts of the engine have |
| 8 // a convenient way to access other parts. In this way it can be thought of as | 8 // a convenient way to access other parts. In this way it can be thought of as |
| 9 // the surrounding environment for the SyncSession. The components of this | 9 // the surrounding environment for the SyncSession. The components of this |
| 10 // environment are either valid or not valid for the entire context lifetime, | 10 // environment are either valid or not valid for the entire context lifetime, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 const std::string& account_name() { return account_name_; } | 77 const std::string& account_name() { return account_name_; } |
| 78 | 78 |
| 79 const ModelSafeRoutingInfo& previous_session_routing_info() const { | 79 const ModelSafeRoutingInfo& previous_session_routing_info() const { |
| 80 return previous_session_routing_info_; | 80 return previous_session_routing_info_; |
| 81 } | 81 } |
| 82 | 82 |
| 83 void set_previous_session_routing_info(const ModelSafeRoutingInfo& info) { | 83 void set_previous_session_routing_info(const ModelSafeRoutingInfo& info) { |
| 84 previous_session_routing_info_ = info; | 84 previous_session_routing_info_ = info; |
| 85 } | 85 } |
| 86 | 86 |
| 87 // TODO(tim): Deprecated. Bug 26339. |
| 87 sessions::SyncSessionSnapshot* previous_session_snapshot() { | 88 sessions::SyncSessionSnapshot* previous_session_snapshot() { |
| 88 return previous_session_snapshot_.get(); | 89 return previous_session_snapshot_.get(); |
| 89 } | 90 } |
| 90 | 91 |
| 91 void set_last_snapshot(const SyncSessionSnapshot& snapshot); | 92 void set_last_snapshot(const SyncSessionSnapshot& snapshot); |
| 92 | 93 |
| 93 void NotifyListeners(const SyncEngineEvent& event) { | 94 void NotifyListeners(const SyncEngineEvent& event) { |
| 94 FOR_EACH_OBSERVER(SyncEngineEventListener, listeners_, | 95 FOR_EACH_OBSERVER(SyncEngineEventListener, listeners_, |
| 95 OnSyncEngineEvent(event)); | 96 OnSyncEngineEvent(event)); |
| 96 } | 97 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 private: | 155 private: |
| 155 SyncSessionContext* context_; | 156 SyncSessionContext* context_; |
| 156 ConflictResolver* resolver_; | 157 ConflictResolver* resolver_; |
| 157 DISALLOW_COPY_AND_ASSIGN(ScopedSessionContextConflictResolver); | 158 DISALLOW_COPY_AND_ASSIGN(ScopedSessionContextConflictResolver); |
| 158 }; | 159 }; |
| 159 | 160 |
| 160 } // namespace sessions | 161 } // namespace sessions |
| 161 } // namespace browser_sync | 162 } // namespace browser_sync |
| 162 | 163 |
| 163 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ | 164 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ |
| OLD | NEW |