| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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. Unlike the SyncSession, the context | 6 // components specific to a SyncSession. Unlike the SyncSession, the context |
| 7 // can be reused across several sync cycles. | 7 // can be reused across several sync cycles. |
| 8 // | 8 // |
| 9 // The context does not take ownership of its pointer members. It's up to | 9 // The context does not take ownership of its pointer members. It's up to |
| 10 // the surrounding classes to ensure those members remain valid while the | 10 // the surrounding classes to ensure those members remain valid while the |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 DCHECK(account_name_.empty()); | 87 DCHECK(account_name_.empty()); |
| 88 account_name_ = name; | 88 account_name_ = name; |
| 89 } | 89 } |
| 90 const std::string& account_name() const { return account_name_; } | 90 const std::string& account_name() const { return account_name_; } |
| 91 | 91 |
| 92 void set_max_commit_batch_size(int batch_size) { | 92 void set_max_commit_batch_size(int batch_size) { |
| 93 max_commit_batch_size_ = batch_size; | 93 max_commit_batch_size_ = batch_size; |
| 94 } | 94 } |
| 95 int32 max_commit_batch_size() const { return max_commit_batch_size_; } | 95 int32 max_commit_batch_size() const { return max_commit_batch_size_; } |
| 96 | 96 |
| 97 void NotifyListeners(const SyncEngineEvent& event) { | 97 ObserverList<SyncEngineEventListener>* listeners() { |
| 98 FOR_EACH_OBSERVER(SyncEngineEventListener, listeners_, | 98 return &listeners_; |
| 99 OnSyncEngineEvent(event)); | |
| 100 } | 99 } |
| 101 | 100 |
| 102 TrafficRecorder* traffic_recorder() { | 101 TrafficRecorder* traffic_recorder() { |
| 103 return traffic_recorder_; | 102 return traffic_recorder_; |
| 104 } | 103 } |
| 105 | 104 |
| 106 bool keystore_encryption_enabled() const { | 105 bool keystore_encryption_enabled() const { |
| 107 return keystore_encryption_enabled_; | 106 return keystore_encryption_enabled_; |
| 108 } | 107 } |
| 109 | 108 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // enable the pre-commit update avoidance experiment described above. | 191 // enable the pre-commit update avoidance experiment described above. |
| 193 const bool client_enabled_pre_commit_update_avoidance_; | 192 const bool client_enabled_pre_commit_update_avoidance_; |
| 194 | 193 |
| 195 DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); | 194 DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); |
| 196 }; | 195 }; |
| 197 | 196 |
| 198 } // namespace sessions | 197 } // namespace sessions |
| 199 } // namespace syncer | 198 } // namespace syncer |
| 200 | 199 |
| 201 #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ | 200 #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ |
| OLD | NEW |