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

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

Issue 7481009: Test birtday error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review Created 9 years, 5 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // Blocks the caller until the datatype manager is configured and sync has 66 // Blocks the caller until the datatype manager is configured and sync has
67 // been initialized (for example, after a browser restart). Returns true if 67 // been initialized (for example, after a browser restart). Returns true if
68 // the wait was successful. 68 // the wait was successful.
69 bool AwaitSyncRestart(); 69 bool AwaitSyncRestart();
70 70
71 // Blocks the caller until this harness has completed a single sync cycle 71 // Blocks the caller until this harness has completed a single sync cycle
72 // since the previous one. Returns true if a sync cycle has completed. 72 // since the previous one. Returns true if a sync cycle has completed.
73 bool AwaitSyncCycleCompletion(const std::string& reason); 73 bool AwaitSyncCycleCompletion(const std::string& reason);
74 74
75 // Blocks the caller until the sync has been disabled for this client. Returns
76 // true if sync is disabled.
77 bool AwaitSyncDisabled(const std::string& reason);
78
75 // Blocks the caller until this harness has observed that the sync engine 79 // Blocks the caller until this harness has observed that the sync engine
76 // has downloaded all the changes seen by the |partner| harness's client. 80 // has downloaded all the changes seen by the |partner| harness's client.
77 bool WaitUntilTimestampMatches( 81 bool WaitUntilTimestampMatches(
78 ProfileSyncServiceHarness* partner, const std::string& reason); 82 ProfileSyncServiceHarness* partner, const std::string& reason);
79 83
80 // Calling this acts as a barrier and blocks the caller until |this| and 84 // Calling this acts as a barrier and blocks the caller until |this| and
81 // |partner| have both completed a sync cycle. When calling this method, 85 // |partner| have both completed a sync cycle. When calling this method,
82 // the |partner| should be the passive responder who responds to the actions 86 // the |partner| should be the passive responder who responds to the actions
83 // of |this|. This method relies upon the synchronization of callbacks 87 // of |this|. This method relies upon the synchronization of callbacks
84 // from the message queue. Returns true if two sync cycles have completed. 88 // from the message queue. Returns true if two sync cycles have completed.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 WAITING_FOR_PASSPHRASE_ACCEPTED, 180 WAITING_FOR_PASSPHRASE_ACCEPTED,
177 181
178 // The sync client anticipates encryption of new datatypes. 182 // The sync client anticipates encryption of new datatypes.
179 WAITING_FOR_ENCRYPTION, 183 WAITING_FOR_ENCRYPTION,
180 184
181 // The sync client is waiting for the datatype manager to be configured and 185 // The sync client is waiting for the datatype manager to be configured and
182 // for sync to be fully initialized. Used after a browser restart, where a 186 // for sync to be fully initialized. Used after a browser restart, where a
183 // full sync cycle is not expected to occur. 187 // full sync cycle is not expected to occur.
184 WAITING_FOR_SYNC_CONFIGURATION, 188 WAITING_FOR_SYNC_CONFIGURATION,
185 189
190 // The sync client is waiting for the sync to be disabled for this client.
191 WAITING_FOR_SYNC_DISABLED,
192
186 // The sync client needs a passphrase in order to decrypt data. 193 // The sync client needs a passphrase in order to decrypt data.
187 SET_PASSPHRASE_FAILED, 194 SET_PASSPHRASE_FAILED,
188 195
189 // The sync client cannot reach the server. 196 // The sync client cannot reach the server.
190 SERVER_UNREACHABLE, 197 SERVER_UNREACHABLE,
191 198
192 // The sync client is fully synced and there are no pending updates. 199 // The sync client is fully synced and there are no pending updates.
193 FULLY_SYNCED, 200 FULLY_SYNCED,
194 201
195 // Syncing is disabled for the client. 202 // Syncing is disabled for the client.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 std::string username_; 259 std::string username_;
253 std::string password_; 260 std::string password_;
254 261
255 // Used for logging. 262 // Used for logging.
256 const std::string profile_debug_name_; 263 const std::string profile_debug_name_;
257 264
258 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness); 265 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness);
259 }; 266 };
260 267
261 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ 268 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698