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

Side by Side Diff: chrome/browser/sync/profile_sync_service_harness.h

Issue 6902101: Refactor sync passphrase setup flow and fix passphrase tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove OnPassphraseFailed; Plumb enum all the way through; Shave yak. 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 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 WAITING_FOR_PASSPHRASE_ACCEPTED, 165 WAITING_FOR_PASSPHRASE_ACCEPTED,
166 166
167 // The sync client anticipates encryption of new datatypes. 167 // The sync client anticipates encryption of new datatypes.
168 WAITING_FOR_ENCRYPTION, 168 WAITING_FOR_ENCRYPTION,
169 169
170 // The sync client is waiting for the datatype manager to be configured and 170 // The sync client is waiting for the datatype manager to be configured and
171 // for sync to be fully initialized. Used after a browser restart, where a 171 // for sync to be fully initialized. Used after a browser restart, where a
172 // full sync cycle is not expected to occur. 172 // full sync cycle is not expected to occur.
173 WAITING_FOR_SYNC_CONFIGURATION, 173 WAITING_FOR_SYNC_CONFIGURATION,
174 174
175 // The sync client needs a passphrase in order to decrypt data.
176 PASSPHRASE_REQUIRED_FOR_DECRYPTION,
177
175 // The sync client cannot reach the server. 178 // The sync client cannot reach the server.
176 SERVER_UNREACHABLE, 179 SERVER_UNREACHABLE,
177 180
178 // The sync client is fully synced and there are no pending updates. 181 // The sync client is fully synced and there are no pending updates.
179 FULLY_SYNCED, 182 FULLY_SYNCED,
180 183
181 // Syncing is disabled for the client. 184 // Syncing is disabled for the client.
182 SYNC_DISABLED, 185 SYNC_DISABLED,
183 186
184 NUMBER_OF_STATES, 187 NUMBER_OF_STATES,
(...skipping 24 matching lines...) Expand all
209 void LogClientInfo(const std::string& message); 212 void LogClientInfo(const std::string& message);
210 213
211 // Gets the current progress indicator of the current sync session 214 // Gets the current progress indicator of the current sync session
212 // for a particular datatype. 215 // for a particular datatype.
213 std::string GetUpdatedTimestamp(syncable::ModelType model_type); 216 std::string GetUpdatedTimestamp(syncable::ModelType model_type);
214 217
215 // When in WAITING_FOR_ENCRYPTION state, we check to see if this type is now 218 // When in WAITING_FOR_ENCRYPTION state, we check to see if this type is now
216 // encrypted to determine if we're done. 219 // encrypted to determine if we're done.
217 syncable::ModelType waiting_for_encryption_type_; 220 syncable::ModelType waiting_for_encryption_type_;
218 221
222 // The WaitState in which the sync client currently is. Helps determine what
223 // action to take when RunStateChangeMachine() is called.
219 WaitState wait_state_; 224 WaitState wait_state_;
220 225
226 // Sync profile associated with this sync client.
221 Profile* profile_; 227 Profile* profile_;
228
229 // ProfileSyncService object associated with |profile_|.
222 ProfileSyncService* service_; 230 ProfileSyncService* service_;
223 231
224 // The harness of the client whose update progress marker we're expecting 232 // The harness of the client whose update progress marker we're expecting
225 // eventually match. 233 // eventually match.
226 ProfileSyncServiceHarness* timestamp_match_partner_; 234 ProfileSyncServiceHarness* timestamp_match_partner_;
227 235
228 // Credentials used for GAIA authentication. 236 // Credentials used for GAIA authentication.
229 std::string username_; 237 std::string username_;
230 std::string password_; 238 std::string password_;
231 239
232 // Client ID, used for logging purposes. 240 // Client ID, used for logging purposes.
233 int id_; 241 int id_;
234 242
235 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness); 243 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness);
236 }; 244 };
237 245
238 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ 246 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698