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

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

Issue 1849563005: [Sync] Add cookie jar mismatch logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests again Created 4 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
« no previous file with comments | « sync/protocol/sync.proto ('k') | sync/sessions/sync_session_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 void set_server_enabled_pre_commit_update_avoidance(bool value) { 121 void set_server_enabled_pre_commit_update_avoidance(bool value) {
122 server_enabled_pre_commit_update_avoidance_ = value; 122 server_enabled_pre_commit_update_avoidance_ = value;
123 } 123 }
124 124
125 ModelTypeRegistry* model_type_registry() { 125 ModelTypeRegistry* model_type_registry() {
126 return model_type_registry_; 126 return model_type_registry_;
127 } 127 }
128 128
129 bool cookie_jar_mismatch() const {
130 return cookie_jar_mismatch_;
131 }
132
133 void set_cookie_jar_mismatch(bool cookie_jar_mismatch) {
134 cookie_jar_mismatch_ = cookie_jar_mismatch;
135 }
136
129 private: 137 private:
130 // Rather than force clients to set and null-out various context members, we 138 // Rather than force clients to set and null-out various context members, we
131 // extend our encapsulation boundary to scoped helpers that take care of this 139 // extend our encapsulation boundary to scoped helpers that take care of this
132 // once they are allocated. See definitions of these below. 140 // once they are allocated. See definitions of these below.
133 friend class TestScopedSessionEventListener; 141 friend class TestScopedSessionEventListener;
134 142
135 base::ObserverList<SyncEngineEventListener> listeners_; 143 base::ObserverList<SyncEngineEventListener> listeners_;
136 144
137 ServerConnectionManager* const connection_manager_; 145 ServerConnectionManager* const connection_manager_;
138 syncable::Directory* const directory_; 146 syncable::Directory* const directory_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 181
174 // Flag to enable or disable the no pre-commit GetUpdates experiment. When 182 // Flag to enable or disable the no pre-commit GetUpdates experiment. When
175 // this flag is set to false, the syncer has the option of not performing at 183 // this flag is set to false, the syncer has the option of not performing at
176 // GetUpdates request when there is nothing to fetch. 184 // GetUpdates request when there is nothing to fetch.
177 bool server_enabled_pre_commit_update_avoidance_; 185 bool server_enabled_pre_commit_update_avoidance_;
178 186
179 // If true, indicates that we've been passed a command-line flag to force 187 // If true, indicates that we've been passed a command-line flag to force
180 // enable the pre-commit update avoidance experiment described above. 188 // enable the pre-commit update avoidance experiment described above.
181 const bool client_enabled_pre_commit_update_avoidance_; 189 const bool client_enabled_pre_commit_update_avoidance_;
182 190
191 // Whether the account(s) present in the content area's cookie jar match the
192 // chrome account. If multiple accounts are present in the cookie jar, a
193 // mismatch implies all of them are different from the chrome account.
194 bool cookie_jar_mismatch_;
195
183 DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); 196 DISALLOW_COPY_AND_ASSIGN(SyncSessionContext);
184 }; 197 };
185 198
186 } // namespace sessions 199 } // namespace sessions
187 } // namespace syncer 200 } // namespace syncer
188 201
189 #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ 202 #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
OLDNEW
« no previous file with comments | « sync/protocol/sync.proto ('k') | sync/sessions/sync_session_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698