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

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

Issue 167873002: sync: Improve StatusChangeChecker debug strings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_TEST_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_ 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // they're in). 175 // they're in).
176 size_t GetNumDatatypes() const; 176 size_t GetNumDatatypes() const;
177 177
178 // Gets the |auto_start_enabled_| variable from the |service_|. 178 // Gets the |auto_start_enabled_| variable from the |service_|.
179 bool AutoStartEnabled(); 179 bool AutoStartEnabled();
180 180
181 // Runs the UI message loop and waits until the Run() method of |checker| 181 // Runs the UI message loop and waits until the Run() method of |checker|
182 // returns true, indicating that the status change we are waiting for has 182 // returns true, indicating that the status change we are waiting for has
183 // taken place. Caller retains ownership of |checker|, which must outlive this 183 // taken place. Caller retains ownership of |checker|, which must outlive this
184 // method. Returns true if the status change was observed. In case of a 184 // method. Returns true if the status change was observed. In case of a
185 // timeout, we log the |source| of the call to this method, and return false. 185 // timeout, we CHECK(false).
186 bool AwaitStatusChange(StatusChangeChecker* checker, 186 bool AwaitStatusChange(StatusChangeChecker* checker);
187 const std::string& source);
188 187
189 // Returns a string that can be used as the value of an oauth2 refresh token. 188 // Returns a string that can be used as the value of an oauth2 refresh token.
190 // This function guarantees that a different string is returned each time 189 // This function guarantees that a different string is returned each time
191 // it is called. 190 // it is called.
192 std::string GenerateFakeOAuth2RefreshTokenString(); 191 std::string GenerateFakeOAuth2RefreshTokenString();
193 192
194 // Returns a string with relevant info about client's sync state (if 193 // Returns a string with relevant info about client's sync state (if
195 // available), annotated with |message|. Useful for logging. 194 // available), annotated with |message|. Useful for logging.
196 std::string GetClientInfoString(const std::string& message) const; 195 std::string GetClientInfoString(const std::string& message) const;
197 196
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 const std::string profile_debug_name_; 249 const std::string profile_debug_name_;
251 250
252 // Keeps track of the state change on which we are waiting. PSSHarness can 251 // Keeps track of the state change on which we are waiting. PSSHarness can
253 // wait on only one status change at a time. 252 // wait on only one status change at a time.
254 StatusChangeChecker* status_change_checker_; 253 StatusChangeChecker* status_change_checker_;
255 254
256 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness); 255 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness);
257 }; 256 };
258 257
259 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_ 258 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698