| 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 // 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void set_notifications_enabled(bool enabled) { | 76 void set_notifications_enabled(bool enabled) { |
| 77 notifications_enabled_ = enabled; | 77 notifications_enabled_ = enabled; |
| 78 } | 78 } |
| 79 bool notifications_enabled() { return notifications_enabled_; } | 79 bool notifications_enabled() { return notifications_enabled_; } |
| 80 | 80 |
| 81 // Account name, set once a directory has been opened. | 81 // Account name, set once a directory has been opened. |
| 82 void set_account_name(const std::string name) { | 82 void set_account_name(const std::string name) { |
| 83 DCHECK(account_name_.empty()); | 83 DCHECK(account_name_.empty()); |
| 84 account_name_ = name; | 84 account_name_ = name; |
| 85 } | 85 } |
| 86 const std::string& account_name() { return account_name_; } | 86 const std::string& account_name() const { return account_name_; } |
| 87 | 87 |
| 88 void set_max_commit_batch_size(int batch_size) { | 88 void set_max_commit_batch_size(int batch_size) { |
| 89 max_commit_batch_size_ = batch_size; | 89 max_commit_batch_size_ = batch_size; |
| 90 } | 90 } |
| 91 int32 max_commit_batch_size() const { return max_commit_batch_size_; } | 91 int32 max_commit_batch_size() const { return max_commit_batch_size_; } |
| 92 | 92 |
| 93 const ModelSafeRoutingInfo& previous_session_routing_info() const { | 93 const ModelSafeRoutingInfo& previous_session_routing_info() const { |
| 94 return previous_session_routing_info_; | 94 return previous_session_routing_info_; |
| 95 } | 95 } |
| 96 | 96 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 private: | 169 private: |
| 170 SyncSessionContext* context_; | 170 SyncSessionContext* context_; |
| 171 ConflictResolver* resolver_; | 171 ConflictResolver* resolver_; |
| 172 DISALLOW_COPY_AND_ASSIGN(ScopedSessionContextConflictResolver); | 172 DISALLOW_COPY_AND_ASSIGN(ScopedSessionContextConflictResolver); |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } // namespace sessions | 175 } // namespace sessions |
| 176 } // namespace browser_sync | 176 } // namespace browser_sync |
| 177 | 177 |
| 178 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ | 178 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ |
| OLD | NEW |