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

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: Upload before submit. 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);
101
102 void NotifyListeners(const SyncEngineEvent& event) { 95 void NotifyListeners(const SyncEngineEvent& event) {
103 FOR_EACH_OBSERVER(SyncEngineEventListener, listeners_, 96 FOR_EACH_OBSERVER(SyncEngineEventListener, listeners_,
104 OnSyncEngineEvent(event)); 97 OnSyncEngineEvent(event));
105 } 98 }
106 99
107 private: 100 private:
108 // Rather than force clients to set and null-out various context members, we 101 // 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 102 // extend our encapsulation boundary to scoped helpers that take care of this
110 // once they are allocated. See definitions of these below. 103 // once they are allocated. See definitions of these below.
111 friend class ScopedSessionContextConflictResolver; 104 friend class ScopedSessionContextConflictResolver;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 private: 159 private:
167 SyncSessionContext* context_; 160 SyncSessionContext* context_;
168 ConflictResolver* resolver_; 161 ConflictResolver* resolver_;
169 DISALLOW_COPY_AND_ASSIGN(ScopedSessionContextConflictResolver); 162 DISALLOW_COPY_AND_ASSIGN(ScopedSessionContextConflictResolver);
170 }; 163 };
171 164
172 } // namespace sessions 165 } // namespace sessions
173 } // namespace browser_sync 166 } // namespace browser_sync
174 167
175 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ 168 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_password_unittest.cc ('k') | chrome/browser/sync/sessions/sync_session_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698