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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host.h

Issue 10584019: sync: Remove ClearUserData command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.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 (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_GLUE_SYNC_BACKEND_HOST_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 virtual void OnSyncConfigureRetry() = 0; 72 virtual void OnSyncConfigureRetry() = 0;
73 73
74 // The status of the connection to the sync server has changed. 74 // The status of the connection to the sync server has changed.
75 virtual void OnConnectionStatusChange( 75 virtual void OnConnectionStatusChange(
76 sync_api::ConnectionStatus status) = 0; 76 sync_api::ConnectionStatus status) = 0;
77 77
78 // We are no longer permitted to communicate with the server. Sync should 78 // We are no longer permitted to communicate with the server. Sync should
79 // be disabled and state cleaned up at once. 79 // be disabled and state cleaned up at once.
80 virtual void OnStopSyncingPermanently() = 0; 80 virtual void OnStopSyncingPermanently() = 0;
81 81
82 // Called to handle success/failure of clearing server data
83 virtual void OnClearServerDataSucceeded() = 0;
84 virtual void OnClearServerDataFailed() = 0;
85
86 // The syncer requires a passphrase to decrypt sensitive updates. This is 82 // The syncer requires a passphrase to decrypt sensitive updates. This is
87 // called when the first sensitive data type is setup by the user and anytime 83 // called when the first sensitive data type is setup by the user and anytime
88 // the passphrase is changed by another synced client. |reason| denotes why 84 // the passphrase is changed by another synced client. |reason| denotes why
89 // the passphrase was required. |pending_keys| is a copy of the 85 // the passphrase was required. |pending_keys| is a copy of the
90 // cryptographer's pending keys to be passed on to the frontend in order to 86 // cryptographer's pending keys to be passed on to the frontend in order to
91 // be cached. 87 // be cached.
92 virtual void OnPassphraseRequired( 88 virtual void OnPassphraseRequired(
93 sync_api::PassphraseRequiredReason reason, 89 sync_api::PassphraseRequiredReason reason,
94 const sync_pb::EncryptedData& pending_keys) = 0; 90 const sync_pb::EncryptedData& pending_keys) = 0;
95 91
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // be called synchronously with the data type's model association so 239 // be called synchronously with the data type's model association so
244 // no changes are dropped between model association and change 240 // no changes are dropped between model association and change
245 // processor activation. 241 // processor activation.
246 void ActivateDataType( 242 void ActivateDataType(
247 syncable::ModelType type, ModelSafeGroup group, 243 syncable::ModelType type, ModelSafeGroup group,
248 ChangeProcessor* change_processor); 244 ChangeProcessor* change_processor);
249 245
250 // Deactivates change processing for the given data type. 246 // Deactivates change processing for the given data type.
251 void DeactivateDataType(syncable::ModelType type); 247 void DeactivateDataType(syncable::ModelType type);
252 248
253 // Asks the server to clear all data associated with ChromeSync.
254 virtual bool RequestClearServerData();
255
256 // Called on |frontend_loop_| to obtain a handle to the UserShare needed 249 // Called on |frontend_loop_| to obtain a handle to the UserShare needed
257 // for creating transactions. 250 // for creating transactions.
258 sync_api::UserShare* GetUserShare() const; 251 sync_api::UserShare* GetUserShare() const;
259 252
260 // Called from any thread to obtain current status information in detailed or 253 // Called from any thread to obtain current status information in detailed or
261 // summarized form. 254 // summarized form.
262 Status GetDetailedStatus(); 255 Status GetDetailedStatus();
263 sessions::SyncSessionSnapshot GetLastSessionSnapshot() const; 256 sessions::SyncSessionSnapshot GetLastSessionSnapshot() const;
264 257
265 // Determines if the underlying sync engine has made any local changes to 258 // Determines if the underlying sync engine has made any local changes to
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // everything flag changes. 438 // everything flag changes.
446 void NotifyEncryptedTypesChanged( 439 void NotifyEncryptedTypesChanged(
447 syncable::ModelTypeSet encrypted_types, 440 syncable::ModelTypeSet encrypted_types,
448 bool encrypt_everything); 441 bool encrypt_everything);
449 442
450 // Invoked when sync finishes encrypting new datatypes. 443 // Invoked when sync finishes encrypting new datatypes.
451 void NotifyEncryptionComplete(); 444 void NotifyEncryptionComplete();
452 445
453 void HandleStopSyncingPermanentlyOnFrontendLoop(); 446 void HandleStopSyncingPermanentlyOnFrontendLoop();
454 447
455 // Called to handle success/failure of clearing server data
456 void HandleClearServerDataSucceededOnFrontendLoop();
457 void HandleClearServerDataFailedOnFrontendLoop();
458
459 // Dispatched to from OnConnectionStatusChange to handle updating 448 // Dispatched to from OnConnectionStatusChange to handle updating
460 // frontend UI components. 449 // frontend UI components.
461 void HandleConnectionStatusChangeOnFrontendLoop( 450 void HandleConnectionStatusChangeOnFrontendLoop(
462 sync_api::ConnectionStatus status); 451 sync_api::ConnectionStatus status);
463 452
464 // Called when configuration of the Nigori node has completed as 453 // Called when configuration of the Nigori node has completed as
465 // part of the initialization process. 454 // part of the initialization process.
466 void HandleNigoriConfigurationCompletedOnFrontendLoop( 455 void HandleNigoriConfigurationCompletedOnFrontendLoop(
467 const WeakHandle<JsBackend>& js_backend, 456 const WeakHandle<JsBackend>& js_backend,
468 syncable::ModelTypeSet failed_configuration_types); 457 syncable::ModelTypeSet failed_configuration_types);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 513
525 // UI-thread cache of the last SyncSessionSnapshot received from syncapi. 514 // UI-thread cache of the last SyncSessionSnapshot received from syncapi.
526 sessions::SyncSessionSnapshot last_snapshot_; 515 sessions::SyncSessionSnapshot last_snapshot_;
527 516
528 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); 517 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
529 }; 518 };
530 519
531 } // namespace browser_sync 520 } // namespace browser_sync
532 521
533 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 522 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698