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

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

Issue 8356026: [Sync] Cache encrypted types info in ProfileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test failures Created 9 years, 2 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_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 <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // the passphrase was required. 84 // the passphrase was required.
85 virtual void OnPassphraseRequired( 85 virtual void OnPassphraseRequired(
86 sync_api::PassphraseRequiredReason reason) = 0; 86 sync_api::PassphraseRequiredReason reason) = 0;
87 87
88 // Called when the passphrase provided by the user is 88 // Called when the passphrase provided by the user is
89 // accepted. After this is called, updates to sensitive nodes are 89 // accepted. After this is called, updates to sensitive nodes are
90 // encrypted using the accepted passphrase. 90 // encrypted using the accepted passphrase.
91 virtual void OnPassphraseAccepted() = 0; 91 virtual void OnPassphraseAccepted() = 0;
92 92
93 virtual void OnEncryptionComplete( 93 virtual void OnEncryptionComplete(
94 const syncable::ModelTypeSet& encrypted_types) = 0; 94 const syncable::ModelTypeSet& encrypted_types,
95 bool encrypt_everything) = 0;
95 96
96 // Called to perform migration of |types|. 97 // Called to perform migration of |types|.
97 virtual void OnMigrationNeededForTypes( 98 virtual void OnMigrationNeededForTypes(
98 const syncable::ModelTypeSet& types) = 0; 99 const syncable::ModelTypeSet& types) = 0;
99 100
100 // Inform the Frontend that new datatypes are available for registration. 101 // Inform the Frontend that new datatypes are available for registration.
101 virtual void OnDataTypesChanged(const syncable::ModelTypeSet& to_add) = 0; 102 virtual void OnDataTypesChanged(const syncable::ModelTypeSet& to_add) = 0;
102 103
103 // Called when the sync cycle returns there is an user actionable error. 104 // Called when the sync cycle returns there is an user actionable error.
104 virtual void OnActionableError( 105 virtual void OnActionableError(
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 const GoogleServiceAuthError& auth_error) OVERRIDE; 284 const GoogleServiceAuthError& auth_error) OVERRIDE;
284 virtual void OnPassphraseRequired( 285 virtual void OnPassphraseRequired(
285 sync_api::PassphraseRequiredReason reason) OVERRIDE; 286 sync_api::PassphraseRequiredReason reason) OVERRIDE;
286 virtual void OnPassphraseAccepted( 287 virtual void OnPassphraseAccepted(
287 const std::string& bootstrap_token) OVERRIDE; 288 const std::string& bootstrap_token) OVERRIDE;
288 virtual void OnStopSyncingPermanently() OVERRIDE; 289 virtual void OnStopSyncingPermanently() OVERRIDE;
289 virtual void OnUpdatedToken(const std::string& token) OVERRIDE; 290 virtual void OnUpdatedToken(const std::string& token) OVERRIDE;
290 virtual void OnClearServerDataFailed() OVERRIDE; 291 virtual void OnClearServerDataFailed() OVERRIDE;
291 virtual void OnClearServerDataSucceeded() OVERRIDE; 292 virtual void OnClearServerDataSucceeded() OVERRIDE;
292 virtual void OnEncryptionComplete( 293 virtual void OnEncryptionComplete(
293 const syncable::ModelTypeSet& encrypted_types); 294 const syncable::ModelTypeSet& encrypted_types,
295 bool encrypt_everything) OVERRIDE;
294 virtual void OnActionableError( 296 virtual void OnActionableError(
295 const browser_sync::SyncProtocolError& sync_error); 297 const browser_sync::SyncProtocolError& sync_error) OVERRIDE;
296 298
297 struct DoInitializeOptions { 299 struct DoInitializeOptions {
298 DoInitializeOptions( 300 DoInitializeOptions(
299 MessageLoop* sync_loop, 301 MessageLoop* sync_loop,
300 SyncBackendRegistrar* registrar, 302 SyncBackendRegistrar* registrar,
301 const WeakHandle<JsEventHandler>& event_handler, 303 const WeakHandle<JsEventHandler>& event_handler,
302 const GURL& service_url, 304 const GURL& service_url,
303 const scoped_refptr<net::URLRequestContextGetter>& 305 const scoped_refptr<net::URLRequestContextGetter>&
304 request_context_getter, 306 request_context_getter,
305 const sync_api::SyncCredentials& credentials, 307 const sync_api::SyncCredentials& credentials,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 void NotifyPassphraseRequired(sync_api::PassphraseRequiredReason reason); 442 void NotifyPassphraseRequired(sync_api::PassphraseRequiredReason reason);
441 443
442 // Invoked when the passphrase provided by the user has been accepted. 444 // Invoked when the passphrase provided by the user has been accepted.
443 void NotifyPassphraseAccepted(const std::string& bootstrap_token); 445 void NotifyPassphraseAccepted(const std::string& bootstrap_token);
444 446
445 // Invoked when an updated token is available from the sync server. 447 // Invoked when an updated token is available from the sync server.
446 void NotifyUpdatedToken(const std::string& token); 448 void NotifyUpdatedToken(const std::string& token);
447 449
448 // Invoked when sync finishes encrypting new datatypes or has become aware 450 // Invoked when sync finishes encrypting new datatypes or has become aware
449 // of new datatypes requiring encryption. 451 // of new datatypes requiring encryption.
450 void NotifyEncryptionComplete(const syncable::ModelTypeSet& 452 void NotifyEncryptionComplete(
451 encrypted_types); 453 const syncable::ModelTypeSet& encrypted_types,
454 bool encrypt_everything);
452 455
453 // Called from Core::OnSyncCycleCompleted to handle updating frontend 456 // Called from Core::OnSyncCycleCompleted to handle updating frontend
454 // thread components. 457 // thread components.
455 void HandleSyncCycleCompletedOnFrontendLoop( 458 void HandleSyncCycleCompletedOnFrontendLoop(
456 sessions::SyncSessionSnapshot* snapshot); 459 sessions::SyncSessionSnapshot* snapshot);
457 460
458 void HandleStopSyncingPermanentlyOnFrontendLoop(); 461 void HandleStopSyncingPermanentlyOnFrontendLoop();
459 462
460 // Called to handle success/failure of clearing server data 463 // Called to handle success/failure of clearing server data
461 void HandleClearServerDataSucceededOnFrontendLoop(); 464 void HandleClearServerDataSucceededOnFrontendLoop();
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 585
583 // UI-thread cache of the last SyncSessionSnapshot received from syncapi. 586 // UI-thread cache of the last SyncSessionSnapshot received from syncapi.
584 scoped_ptr<sessions::SyncSessionSnapshot> last_snapshot_; 587 scoped_ptr<sessions::SyncSessionSnapshot> last_snapshot_;
585 588
586 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); 589 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
587 }; 590 };
588 591
589 } // namespace browser_sync 592 } // namespace browser_sync
590 593
591 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 594 #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') | chrome/browser/sync/internal_api/sync_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698