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

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

Issue 10875064: Rename SyncNotifier->Invalidator and SyncNotifierObserver->InvalidationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to ToT for landing Created 8 years, 3 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_H_ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 22 matching lines...) Expand all
33 #include "content/public/browser/notification_observer.h" 33 #include "content/public/browser/notification_observer.h"
34 #include "content/public/browser/notification_registrar.h" 34 #include "content/public/browser/notification_registrar.h"
35 #include "content/public/browser/notification_types.h" 35 #include "content/public/browser/notification_types.h"
36 #include "googleurl/src/gurl.h" 36 #include "googleurl/src/gurl.h"
37 #include "sync/internal_api/public/base/model_type.h" 37 #include "sync/internal_api/public/base/model_type.h"
38 #include "sync/internal_api/public/engine/model_safe_worker.h" 38 #include "sync/internal_api/public/engine/model_safe_worker.h"
39 #include "sync/internal_api/public/sync_manager_factory.h" 39 #include "sync/internal_api/public/sync_manager_factory.h"
40 #include "sync/internal_api/public/util/experiments.h" 40 #include "sync/internal_api/public/util/experiments.h"
41 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" 41 #include "sync/internal_api/public/util/unrecoverable_error_handler.h"
42 #include "sync/js/sync_js_controller.h" 42 #include "sync/js/sync_js_controller.h"
43 #include "sync/notifier/sync_notifier_registrar.h" 43 #include "sync/notifier/invalidator_registrar.h"
44 44
45 class Profile; 45 class Profile;
46 class ProfileSyncComponentsFactory; 46 class ProfileSyncComponentsFactory;
47 class SigninManager; 47 class SigninManager;
48 class SyncGlobalError; 48 class SyncGlobalError;
49 49
50 namespace browser_sync { 50 namespace browser_sync {
51 class BackendMigrator; 51 class BackendMigrator;
52 class ChangeProcessor; 52 class ChangeProcessor;
53 class DataTypeManager; 53 class DataTypeManager;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 void GetDataTypeControllerStates( 251 void GetDataTypeControllerStates(
252 browser_sync::DataTypeController::StateMap* state_map) const; 252 browser_sync::DataTypeController::StateMap* state_map) const;
253 253
254 // Disables sync for user. Use ShowLoginDialog to enable. 254 // Disables sync for user. Use ShowLoginDialog to enable.
255 virtual void DisableForUser(); 255 virtual void DisableForUser();
256 256
257 // Whether sync is enabled by user or not. 257 // Whether sync is enabled by user or not.
258 virtual bool HasSyncSetupCompleted() const; 258 virtual bool HasSyncSetupCompleted() const;
259 virtual void SetSyncSetupCompleted(); 259 virtual void SetSyncSetupCompleted();
260 260
261 // syncer::SyncNotifier implementation (via SyncFrontend). 261 // syncer::InvalidationHandler implementation (via SyncFrontend).
262 virtual void OnNotificationsEnabled() OVERRIDE; 262 virtual void OnNotificationsEnabled() OVERRIDE;
263 virtual void OnNotificationsDisabled( 263 virtual void OnNotificationsDisabled(
264 syncer::NotificationsDisabledReason reason) OVERRIDE; 264 syncer::NotificationsDisabledReason reason) OVERRIDE;
265 virtual void OnIncomingNotification( 265 virtual void OnIncomingNotification(
266 const syncer::ObjectIdStateMap& id_state_map, 266 const syncer::ObjectIdStateMap& id_state_map,
267 syncer::IncomingNotificationSource source) OVERRIDE; 267 syncer::IncomingNotificationSource source) OVERRIDE;
268 268
269 // SyncFrontend implementation. 269 // SyncFrontend implementation.
270 virtual void OnBackendInitialized( 270 virtual void OnBackendInitialized(
271 const syncer::WeakHandle<syncer::JsBackend>& js_backend, 271 const syncer::WeakHandle<syncer::JsBackend>& js_backend,
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 590
591 // NOTE(akalin): Invalidations that come in during browser shutdown may get 591 // NOTE(akalin): Invalidations that come in during browser shutdown may get
592 // dropped. This won't matter once we have an Acknowledge API, though: see 592 // dropped. This won't matter once we have an Acknowledge API, though: see
593 // http://crbug.com/78462 and http://crbug.com/124149. 593 // http://crbug.com/78462 and http://crbug.com/124149.
594 594
595 // Starts sending notifications to |handler|. |handler| must not be NULL, 595 // Starts sending notifications to |handler|. |handler| must not be NULL,
596 // and it must already be registered. 596 // and it must already be registered.
597 // 597 //
598 // Handler registrations are persisted across restarts of sync. 598 // Handler registrations are persisted across restarts of sync.
599 virtual void RegisterInvalidationHandler( 599 virtual void RegisterInvalidationHandler(
600 syncer::SyncNotifierObserver* handler) OVERRIDE; 600 syncer::InvalidationHandler* handler) OVERRIDE;
601 601
602 // Updates the set of ObjectIds associated with |handler|. |handler| must 602 // Updates the set of ObjectIds associated with |handler|. |handler| must
603 // not be NULL, and must already be registered. An ID must be registered for 603 // not be NULL, and must already be registered. An ID must be registered for
604 // at most one handler. 604 // at most one handler.
605 // 605 //
606 // Registered IDs are persisted across restarts of sync. 606 // Registered IDs are persisted across restarts of sync.
607 virtual void UpdateRegisteredInvalidationIds( 607 virtual void UpdateRegisteredInvalidationIds(
608 syncer::SyncNotifierObserver* handler, 608 syncer::InvalidationHandler* handler,
609 const syncer::ObjectIdSet& ids) OVERRIDE; 609 const syncer::ObjectIdSet& ids) OVERRIDE;
610 610
611 // Stops sending notifications to |handler|. |handler| must not be NULL, and 611 // Stops sending notifications to |handler|. |handler| must not be NULL, and
612 // it must already be registered. Note that this doesn't unregister the IDs 612 // it must already be registered. Note that this doesn't unregister the IDs
613 // associated with |handler|. 613 // associated with |handler|.
614 // 614 //
615 // Handler registrations are persisted across restarts of sync. 615 // Handler registrations are persisted across restarts of sync.
616 virtual void UnregisterInvalidationHandler( 616 virtual void UnregisterInvalidationHandler(
617 syncer::SyncNotifierObserver* handler) OVERRIDE; 617 syncer::InvalidationHandler* handler) OVERRIDE;
618 618
619 // ProfileKeyedService implementation. 619 // ProfileKeyedService implementation.
620 virtual void Shutdown() OVERRIDE; 620 virtual void Shutdown() OVERRIDE;
621 621
622 protected: 622 protected:
623 // Used by test classes that derive from ProfileSyncService. 623 // Used by test classes that derive from ProfileSyncService.
624 virtual browser_sync::SyncBackendHost* GetBackendForTest(); 624 virtual browser_sync::SyncBackendHost* GetBackendForTest();
625 625
626 // Helper to install and configure a data type manager. 626 // Helper to install and configure a data type manager.
627 void ConfigureDataTypeManager(); 627 void ConfigureDataTypeManager();
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 // data types. 884 // data types.
885 bool setup_in_progress_; 885 bool setup_in_progress_;
886 886
887 // The set of currently enabled sync experiments. 887 // The set of currently enabled sync experiments.
888 syncer::Experiments current_experiments; 888 syncer::Experiments current_experiments;
889 889
890 // Factory the backend will use to build the SyncManager. 890 // Factory the backend will use to build the SyncManager.
891 syncer::SyncManagerFactory sync_manager_factory_; 891 syncer::SyncManagerFactory sync_manager_factory_;
892 892
893 // Dispatches invalidations to handlers. 893 // Dispatches invalidations to handlers.
894 syncer::SyncNotifierRegistrar notifier_registrar_; 894 syncer::InvalidatorRegistrar invalidator_registrar_;
895 895
896 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); 896 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
897 }; 897 };
898 898
899 bool ShouldShowActionOnUI( 899 bool ShouldShowActionOnUI(
900 const syncer::SyncProtocolError& error); 900 const syncer::SyncProtocolError& error);
901 901
902 902
903 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 903 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/invalidation_frontend.h ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698