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

Side by Side Diff: chrome/browser/sync/sessions/sync_session_context.h

Issue 6874018: make new syncer thread the default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Send for CR. Created 9 years, 8 months 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 // 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 int32 max_commit_batch_size() const { return max_commit_batch_size_; } 85 int32 max_commit_batch_size() const { return max_commit_batch_size_; }
86 86
87 const ModelSafeRoutingInfo& previous_session_routing_info() const { 87 const ModelSafeRoutingInfo& previous_session_routing_info() const {
88 return previous_session_routing_info_; 88 return previous_session_routing_info_;
89 } 89 }
90 90
91 void set_previous_session_routing_info(const ModelSafeRoutingInfo& info) { 91 void set_previous_session_routing_info(const ModelSafeRoutingInfo& info) {
92 previous_session_routing_info_ = info; 92 previous_session_routing_info_ = info;
93 } 93 }
94 94
95 // TODO(tim): Deprecated. Bug 26339.
96 sessions::SyncSessionSnapshot* previous_session_snapshot() {
97 return previous_session_snapshot_.get();
98 }
99
100 void set_last_snapshot(const SyncSessionSnapshot& snapshot); 95 void set_last_snapshot(const SyncSessionSnapshot& snapshot);
tim (not reviewing) 2011/04/18 16:11:47 is this still needed? I can't recall
lipalani1 2011/04/18 20:36:41 Done.
101 96
102 void NotifyListeners(const SyncEngineEvent& event) { 97 void NotifyListeners(const SyncEngineEvent& event) {
103 FOR_EACH_OBSERVER(SyncEngineEventListener, listeners_, 98 FOR_EACH_OBSERVER(SyncEngineEventListener, listeners_,
104 OnSyncEngineEvent(event)); 99 OnSyncEngineEvent(event));
105 } 100 }
106 101
107 private: 102 private:
108 // Rather than force clients to set and null-out various context members, we 103 // Rather than force clients to set and null-out various context members, we
109 // extend our encapsulation boundary to scoped helpers that take care of this 104 // extend our encapsulation boundary to scoped helpers that take care of this
110 // once they are allocated. See definitions of these below. 105 // once they are allocated. See definitions of these below.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 private: 161 private:
167 SyncSessionContext* context_; 162 SyncSessionContext* context_;
168 ConflictResolver* resolver_; 163 ConflictResolver* resolver_;
169 DISALLOW_COPY_AND_ASSIGN(ScopedSessionContextConflictResolver); 164 DISALLOW_COPY_AND_ASSIGN(ScopedSessionContextConflictResolver);
170 }; 165 };
171 166
172 } // namespace sessions 167 } // namespace sessions
173 } // namespace browser_sync 168 } // namespace browser_sync
174 169
175 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ 170 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698