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

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

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Disables sync for a particular sync datatype. Returns true on success. 154 // Disables sync for a particular sync datatype. Returns true on success.
155 bool DisableSyncForDatatype(syncable::ModelType datatype); 155 bool DisableSyncForDatatype(syncable::ModelType datatype);
156 156
157 // Enables sync for all sync datatypes. Returns true on success. 157 // Enables sync for all sync datatypes. Returns true on success.
158 bool EnableSyncForAllDatatypes(); 158 bool EnableSyncForAllDatatypes();
159 159
160 // Disables sync for all sync datatypes. Returns true on success. 160 // Disables sync for all sync datatypes. Returns true on success.
161 bool DisableSyncForAllDatatypes(); 161 bool DisableSyncForAllDatatypes();
162 162
163 // Returns a snapshot of the current sync session. 163 // Returns a snapshot of the current sync session.
164 csync::sessions::SyncSessionSnapshot GetLastSessionSnapshot() const; 164 syncer::sessions::SyncSessionSnapshot GetLastSessionSnapshot() const;
165 165
166 // Encrypt the datatype |type|. This method will block while the sync backend 166 // Encrypt the datatype |type|. This method will block while the sync backend
167 // host performs the encryption or a timeout is reached. 167 // host performs the encryption or a timeout is reached.
168 // PostCondition: 168 // PostCondition:
169 // returns: True if |type| was encrypted and we are fully synced. 169 // returns: True if |type| was encrypted and we are fully synced.
170 // False if we timed out. 170 // False if we timed out.
171 bool EnableEncryptionForType(syncable::ModelType type); 171 bool EnableEncryptionForType(syncable::ModelType type);
172 172
173 // Wait until |type| is encrypted or we time out. 173 // Wait until |type| is encrypted or we time out.
174 // PostCondition: 174 // PostCondition:
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 // Finite state machine for controlling state. Returns true only if a state 283 // Finite state machine for controlling state. Returns true only if a state
284 // change has taken place. 284 // change has taken place.
285 bool RunStateChangeMachine(); 285 bool RunStateChangeMachine();
286 286
287 // Returns true if a status change took place, false on timeout. 287 // Returns true if a status change took place, false on timeout.
288 bool AwaitStatusChangeWithTimeout(int timeout_milliseconds, 288 bool AwaitStatusChangeWithTimeout(int timeout_milliseconds,
289 const std::string& reason); 289 const std::string& reason);
290 290
291 // A helper for implementing IsDataSynced() and IsFullySynced(). 291 // A helper for implementing IsDataSynced() and IsFullySynced().
292 bool IsDataSyncedImpl( 292 bool IsDataSyncedImpl(
293 const csync::sessions::SyncSessionSnapshot& snapshot); 293 const syncer::sessions::SyncSessionSnapshot& snapshot);
294 294
295 // Returns true if the sync client has no unsynced items. 295 // Returns true if the sync client has no unsynced items.
296 bool IsDataSynced(); 296 bool IsDataSynced();
297 297
298 // Returns true if the sync client has no unsynced items and its progress 298 // Returns true if the sync client has no unsynced items and its progress
299 // markers are believed to be up to date. 299 // markers are believed to be up to date.
300 // 300 //
301 // Although we can't detect when commits from other clients invalidate our 301 // Although we can't detect when commits from other clients invalidate our
302 // local progress markers, we do know when our own commits have invalidated 302 // local progress markers, we do know when our own commits have invalidated
303 // our timestmaps. This check returns true when this client has, to the best 303 // our timestmaps. This check returns true when this client has, to the best
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 // Flag set to true when we're waiting for a status change to happen. Used to 362 // Flag set to true when we're waiting for a status change to happen. Used to
363 // avoid triggering internal state machine logic on unexpected sync observer 363 // avoid triggering internal state machine logic on unexpected sync observer
364 // callbacks. 364 // callbacks.
365 bool waiting_for_status_change_; 365 bool waiting_for_status_change_;
366 366
367 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness); 367 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness);
368 }; 368 };
369 369
370 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ 370 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_bookmark_unittest.cc ('k') | chrome/browser/sync/profile_sync_service_harness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698