diff options
author | dcheng <dcheng@chromium.org> | 2014-10-21 04:13:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-21 11:13:20 +0000 |
commit | 0cd9ff92b2dbc83fe8c3664b48041c7ced683c9c (patch) | |
tree | 34810f47ea5b7f10fd9dfb98e8f5700f462c2a0a | |
parent | 9a74ddccb2e98ec53906278be3705274b95e500c (diff) | |
download | chromium_src-0cd9ff92b2dbc83fe8c3664b48041c7ced683c9c.zip chromium_src-0cd9ff92b2dbc83fe8c3664b48041c7ced683c9c.tar.gz chromium_src-0cd9ff92b2dbc83fe8c3664b48041c7ced683c9c.tar.bz2 |
Standardize usage of virtual/override/final in chrome/browser/sync/
This patch was automatically generated by applying clang fixit hints
generated by the plugin to the source tree.
BUG=417463
TBR=zea@chromium.org
Review URL: https://codereview.chromium.org/666733003
Cr-Commit-Position: refs/heads/master@{#300454}
110 files changed, 820 insertions, 986 deletions
diff --git a/chrome/browser/sync/backend_unrecoverable_error_handler.h b/chrome/browser/sync/backend_unrecoverable_error_handler.h index 49ff801..d73fa5a 100644 --- a/chrome/browser/sync/backend_unrecoverable_error_handler.h +++ b/chrome/browser/sync/backend_unrecoverable_error_handler.h @@ -21,9 +21,9 @@ class BackendUnrecoverableErrorHandler public: BackendUnrecoverableErrorHandler( const syncer::WeakHandle<ProfileSyncService>& service); - virtual ~BackendUnrecoverableErrorHandler(); - virtual void OnUnrecoverableError(const tracked_objects::Location& from_here, - const std::string& message) override; + ~BackendUnrecoverableErrorHandler() override; + void OnUnrecoverableError(const tracked_objects::Location& from_here, + const std::string& message) override; private: syncer::WeakHandle<ProfileSyncService> service_; diff --git a/chrome/browser/sync/backup_rollback_controller_unittest.cc b/chrome/browser/sync/backup_rollback_controller_unittest.cc index 8252c36..0e1ecc8 100644 --- a/chrome/browser/sync/backup_rollback_controller_unittest.cc +++ b/chrome/browser/sync/backup_rollback_controller_unittest.cc @@ -31,13 +31,11 @@ class FakeSyncPrefs : public sync_driver::SyncPrefs { public: FakeSyncPrefs() : rollback_tries_left_(0) {} - virtual int GetRemainingRollbackTries() const override { + int GetRemainingRollbackTries() const override { return rollback_tries_left_; } - virtual void SetRemainingRollbackTries(int v) override { - rollback_tries_left_ = v; - } + void SetRemainingRollbackTries(int v) override { rollback_tries_left_ = v; } private: int rollback_tries_left_; diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.h b/chrome/browser/sync/glue/autofill_data_type_controller.h index f96e149..f8f8b59 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller.h +++ b/chrome/browser/sync/glue/autofill_data_type_controller.h @@ -30,21 +30,20 @@ class AutofillDataTypeController Profile* profile); // NonUIDataTypeController implementation. - virtual syncer::ModelType type() const override; - virtual syncer::ModelSafeGroup model_safe_group() const override; + syncer::ModelType type() const override; + syncer::ModelSafeGroup model_safe_group() const override; // NonFrontendDatatypeController override, needed as stop-gap until bug // 163431 is addressed / implemented. - virtual void StartAssociating(const StartCallback& start_callback) override; + void StartAssociating(const StartCallback& start_callback) override; protected: - virtual ~AutofillDataTypeController(); + ~AutofillDataTypeController() override; // NonUIDataTypeController implementation. - virtual bool PostTaskOnBackendThread( - const tracked_objects::Location& from_here, - const base::Closure& task) override; - virtual bool StartModels() override; + bool PostTaskOnBackendThread(const tracked_objects::Location& from_here, + const base::Closure& task) override; + bool StartModels() override; private: friend class AutofillDataTypeControllerTest; diff --git a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc index 22df3eb..ffa7545 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc @@ -41,14 +41,14 @@ using testing::Return; class NoOpAutofillBackend : public AutofillWebDataBackend { public: NoOpAutofillBackend() {} - virtual ~NoOpAutofillBackend() {} - virtual WebDatabase* GetDatabase() override { return NULL; } - virtual void AddObserver( + ~NoOpAutofillBackend() override {} + WebDatabase* GetDatabase() override { return NULL; } + void AddObserver( autofill::AutofillWebDataServiceObserverOnDBThread* observer) override {} - virtual void RemoveObserver( + void RemoveObserver( autofill::AutofillWebDataServiceObserverOnDBThread* observer) override {} - virtual void RemoveExpiredFormElements() override {} - virtual void NotifyOfMultipleAutofillChanges() override {} + void RemoveExpiredFormElements() override {} + void NotifyOfMultipleAutofillChanges() override {} }; // Fake WebDataService implementation that stubs out the database loading. @@ -70,11 +70,9 @@ class FakeWebDataService : public AutofillWebDataService { db_loaded_callback_.Run(); } - virtual bool IsDatabaseLoaded() override { - return is_database_loaded_; - } + bool IsDatabaseLoaded() override { return is_database_loaded_; } - virtual void RegisterDBLoadedCallback( + void RegisterDBLoadedCallback( const base::Callback<void(void)>& callback) override { db_loaded_callback_ = callback; } @@ -90,8 +88,7 @@ class FakeWebDataService : public AutofillWebDataService { } private: - virtual ~FakeWebDataService() { - } + ~FakeWebDataService() override {} void CreateSyncableService() { ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB)); @@ -118,7 +115,7 @@ class MockWebDataServiceWrapperSyncable : public MockWebDataServiceWrapper { : MockWebDataServiceWrapper(new FakeWebDataService(), NULL) { } - virtual void Shutdown() override { + void Shutdown() override { static_cast<FakeWebDataService*>( fake_autofill_web_data_.get())->ShutdownOnUIThread(); // Make sure WebDataService is shutdown properly on DB thread before we diff --git a/chrome/browser/sync/glue/autofill_profile_data_type_controller.h b/chrome/browser/sync/glue/autofill_profile_data_type_controller.h index f1a2cb8..ec96d0d 100644 --- a/chrome/browser/sync/glue/autofill_profile_data_type_controller.h +++ b/chrome/browser/sync/glue/autofill_profile_data_type_controller.h @@ -29,21 +29,20 @@ class AutofillProfileDataTypeController Profile* profile); // NonUIDataTypeController implementation. - virtual syncer::ModelType type() const override; - virtual syncer::ModelSafeGroup model_safe_group() const override; + syncer::ModelType type() const override; + syncer::ModelSafeGroup model_safe_group() const override; // PersonalDataManagerObserver implementation: - virtual void OnPersonalDataChanged() override; + void OnPersonalDataChanged() override; protected: - virtual ~AutofillProfileDataTypeController(); + ~AutofillProfileDataTypeController() override; // NonUIDataTypeController implementation. - virtual bool PostTaskOnBackendThread( - const tracked_objects::Location& from_here, - const base::Closure& task) override; - virtual bool StartModels() override; - virtual void StopModels() override; + bool PostTaskOnBackendThread(const tracked_objects::Location& from_here, + const base::Closure& task) override; + bool StartModels() override; + void StopModels() override; private: // Callback to notify that WebDatabase has loaded. diff --git a/chrome/browser/sync/glue/bookmark_change_processor.h b/chrome/browser/sync/glue/bookmark_change_processor.h index 7807b8d..ff0605f 100644 --- a/chrome/browser/sync/glue/bookmark_change_processor.h +++ b/chrome/browser/sync/glue/bookmark_change_processor.h @@ -38,41 +38,39 @@ class BookmarkChangeProcessor : public BookmarkModelObserver, BookmarkChangeProcessor(Profile* profile, BookmarkModelAssociator* model_associator, sync_driver::DataTypeErrorHandler* error_handler); - virtual ~BookmarkChangeProcessor(); + ~BookmarkChangeProcessor() override; // BookmarkModelObserver implementation. // BookmarkModel -> sync API model change application. - virtual void BookmarkModelLoaded(BookmarkModel* model, - bool ids_reassigned) override; - virtual void BookmarkModelBeingDeleted(BookmarkModel* model) override; - virtual void BookmarkNodeMoved(BookmarkModel* model, - const BookmarkNode* old_parent, - int old_index, - const BookmarkNode* new_parent, - int new_index) override; - virtual void BookmarkNodeAdded(BookmarkModel* model, - const BookmarkNode* parent, - int index) override; - virtual void BookmarkNodeRemoved(BookmarkModel* model, - const BookmarkNode* parent, - int index, - const BookmarkNode* node, + void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; + void BookmarkModelBeingDeleted(BookmarkModel* model) override; + void BookmarkNodeMoved(BookmarkModel* model, + const BookmarkNode* old_parent, + int old_index, + const BookmarkNode* new_parent, + int new_index) override; + void BookmarkNodeAdded(BookmarkModel* model, + const BookmarkNode* parent, + int index) override; + void BookmarkNodeRemoved(BookmarkModel* model, + const BookmarkNode* parent, + int index, + const BookmarkNode* node, + const std::set<GURL>& removed_urls) override; + void BookmarkAllUserNodesRemoved(BookmarkModel* model, const std::set<GURL>& removed_urls) override; - virtual void BookmarkAllUserNodesRemoved( - BookmarkModel* model, - const std::set<GURL>& removed_urls) override; - virtual void BookmarkNodeChanged(BookmarkModel* model, - const BookmarkNode* node) override; - virtual void BookmarkMetaInfoChanged(BookmarkModel* model, - const BookmarkNode* node) override; - virtual void BookmarkNodeFaviconChanged(BookmarkModel* model, - const BookmarkNode* node) override; - virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, - const BookmarkNode* node) override; + void BookmarkNodeChanged(BookmarkModel* model, + const BookmarkNode* node) override; + void BookmarkMetaInfoChanged(BookmarkModel* model, + const BookmarkNode* node) override; + void BookmarkNodeFaviconChanged(BookmarkModel* model, + const BookmarkNode* node) override; + void BookmarkNodeChildrenReordered(BookmarkModel* model, + const BookmarkNode* node) override; // The change processor implementation, responsible for applying changes from // the sync model to the bookmarks model. - virtual void ApplyChangesFromSyncModel( + void ApplyChangesFromSyncModel( const syncer::BaseTransaction* trans, int64 model_version, const syncer::ImmutableChangeRecordList& changes) override; @@ -148,7 +146,7 @@ class BookmarkChangeProcessor : public BookmarkModelObserver, const std::vector<const BookmarkNode*>& nodes); protected: - virtual void StartImpl() override; + void StartImpl() override; private: enum MoveOrCreate { diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller.h b/chrome/browser/sync/glue/bookmark_data_type_controller.h index 5fda813..c16c409 100644 --- a/chrome/browser/sync/glue/bookmark_data_type_controller.h +++ b/chrome/browser/sync/glue/bookmark_data_type_controller.h @@ -25,26 +25,25 @@ class BookmarkDataTypeController : public FrontendDataTypeController, ProfileSyncService* sync_service); // FrontendDataTypeController interface. - virtual syncer::ModelType type() const override; + syncer::ModelType type() const override; // content::NotificationObserver interface. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; private: - virtual ~BookmarkDataTypeController(); + ~BookmarkDataTypeController() override; // FrontendDataTypeController interface. - virtual bool StartModels() override; - virtual void CleanUpState() override; - virtual void CreateSyncComponents() override; + bool StartModels() override; + void CleanUpState() override; + void CreateSyncComponents() override; // BaseBookmarkModelObserver interface. - virtual void BookmarkModelChanged() override; - virtual void BookmarkModelLoaded(BookmarkModel* model, - bool ids_reassigned) override; - virtual void BookmarkModelBeingDeleted(BookmarkModel* model) override; + void BookmarkModelChanged() override; + void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; + void BookmarkModelBeingDeleted(BookmarkModel* model) override; // Helper that returns true iff both the bookmark model and the history // service have finished loading. diff --git a/chrome/browser/sync/glue/bookmark_model_associator.h b/chrome/browser/sync/glue/bookmark_model_associator.h index 6d2326f..199c83e 100644 --- a/chrome/browser/sync/glue/bookmark_model_associator.h +++ b/chrome/browser/sync/glue/bookmark_model_associator.h @@ -46,7 +46,7 @@ class BookmarkModelAssociator syncer::UserShare* user_share, sync_driver::DataTypeErrorHandler* unrecoverable_error_handler, bool expect_mobile_bookmarks_folder); - virtual ~BookmarkModelAssociator(); + ~BookmarkModelAssociator() override; // Updates the visibility of the permanents node in the BookmarkModel. void UpdatePermanentNodeVisibility(); @@ -60,44 +60,43 @@ class BookmarkModelAssociator // node. After successful completion, the models should be identical and // corresponding. Returns true on success. On failure of this step, we // should abort the sync operation and report an error to the user. - virtual syncer::SyncError AssociateModels( + syncer::SyncError AssociateModels( syncer::SyncMergeResult* local_merge_result, syncer::SyncMergeResult* syncer_merge_result) override; - virtual syncer::SyncError DisassociateModels() override; + syncer::SyncError DisassociateModels() override; // The has_nodes out param is true if the sync model has nodes other // than the permanent tagged nodes. - virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes) override; + bool SyncModelHasUserCreatedNodes(bool* has_nodes) override; // Returns sync id for the given bookmark node id. // Returns syncer::kInvalidId if the sync node is not found for the given // bookmark node id. - virtual int64 GetSyncIdFromChromeId(const int64& node_id) override; + int64 GetSyncIdFromChromeId(const int64& node_id) override; // Returns the bookmark node for the given sync id. // Returns NULL if no bookmark node is found for the given sync id. - virtual const BookmarkNode* GetChromeNodeFromSyncId(int64 sync_id) override; + const BookmarkNode* GetChromeNodeFromSyncId(int64 sync_id) override; // Initializes the given sync node from the given bookmark node id. // Returns false if no sync node was found for the given bookmark node id or // if the initialization of sync node fails. - virtual bool InitSyncNodeFromChromeId( - const int64& node_id, - syncer::BaseNode* sync_node) override; + bool InitSyncNodeFromChromeId(const int64& node_id, + syncer::BaseNode* sync_node) override; // Associates the given bookmark node with the given sync id. - virtual void Associate(const BookmarkNode* node, int64 sync_id) override; + void Associate(const BookmarkNode* node, int64 sync_id) override; // Remove the association that corresponds to the given sync id. - virtual void Disassociate(int64 sync_id) override; + void Disassociate(int64 sync_id) override; - virtual void AbortAssociation() override { + void AbortAssociation() override { // No implementation needed, this associator runs on the main // thread. } // See ModelAssociator interface. - virtual bool CryptoReadyIfNecessary() override; + bool CryptoReadyIfNecessary() override; protected: // Stores the id of the node with the given tag in |sync_id|. diff --git a/chrome/browser/sync/glue/browser_thread_model_worker.h b/chrome/browser/sync/glue/browser_thread_model_worker.h index 766576a..241f5fc 100644 --- a/chrome/browser/sync/glue/browser_thread_model_worker.h +++ b/chrome/browser/sync/glue/browser_thread_model_worker.h @@ -29,13 +29,13 @@ class BrowserThreadModelWorker : public syncer::ModelSafeWorker { syncer::WorkerLoopDestructionObserver* observer); // syncer::ModelSafeWorker implementation. Called on the sync thread. - virtual void RegisterForLoopDestruction() override; - virtual syncer::ModelSafeGroup GetModelSafeGroup() override; + void RegisterForLoopDestruction() override; + syncer::ModelSafeGroup GetModelSafeGroup() override; protected: - virtual ~BrowserThreadModelWorker(); + ~BrowserThreadModelWorker() override; - virtual syncer::SyncerError DoWorkAndWaitUntilDoneImpl( + syncer::SyncerError DoWorkAndWaitUntilDoneImpl( const syncer::WorkCallback& work) override; // Marked pure virtual so subclasses have to override, but there is @@ -61,13 +61,12 @@ class DatabaseModelWorker : public BrowserThreadModelWorker { explicit DatabaseModelWorker(syncer::WorkerLoopDestructionObserver* observer); protected: - virtual void CallDoWorkAndSignalTask( - const syncer::WorkCallback& work, - base::WaitableEvent* done, - syncer::SyncerError* error) override; + void CallDoWorkAndSignalTask(const syncer::WorkCallback& work, + base::WaitableEvent* done, + syncer::SyncerError* error) override; private: - virtual ~DatabaseModelWorker(); + ~DatabaseModelWorker() override; }; class FileModelWorker : public BrowserThreadModelWorker { @@ -75,13 +74,12 @@ class FileModelWorker : public BrowserThreadModelWorker { explicit FileModelWorker(syncer::WorkerLoopDestructionObserver* observer); protected: - virtual void CallDoWorkAndSignalTask( - const syncer::WorkCallback& work, - base::WaitableEvent* done, - syncer::SyncerError* error) override; + void CallDoWorkAndSignalTask(const syncer::WorkCallback& work, + base::WaitableEvent* done, + syncer::SyncerError* error) override; private: - virtual ~FileModelWorker(); + ~FileModelWorker() override; }; } // namespace browser_sync diff --git a/chrome/browser/sync/glue/extension_backed_data_type_controller.h b/chrome/browser/sync/glue/extension_backed_data_type_controller.h index 9669606..dbe9ad7 100644 --- a/chrome/browser/sync/glue/extension_backed_data_type_controller.h +++ b/chrome/browser/sync/glue/extension_backed_data_type_controller.h @@ -28,21 +28,20 @@ class ExtensionBackedDataTypeController Profile* profile); // UIDataTypeController overrides. - virtual bool ReadyForStart() const override; - virtual bool StartModels() override; + bool ReadyForStart() const override; + bool StartModels() override; // ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded( - content::BrowserContext* browser_context, - const extensions::Extension* extension) override; - virtual void OnExtensionUnloaded( + void OnExtensionLoaded(content::BrowserContext* browser_context, + const extensions::Extension* extension) override; + void OnExtensionUnloaded( content::BrowserContext* browser_context, const extensions::Extension* extension, extensions::UnloadedExtensionInfo::Reason reason) override; private: // Refcounted via DataTypeController. - virtual ~ExtensionBackedDataTypeController(); + ~ExtensionBackedDataTypeController() override; // Returns whether the extension syncing this type is enabled. bool IsSyncingExtensionEnabled() const; diff --git a/chrome/browser/sync/glue/extension_data_type_controller.h b/chrome/browser/sync/glue/extension_data_type_controller.h index 7c023fb..f84649f 100644 --- a/chrome/browser/sync/glue/extension_data_type_controller.h +++ b/chrome/browser/sync/glue/extension_data_type_controller.h @@ -25,10 +25,10 @@ class ExtensionDataTypeController : public sync_driver::UIDataTypeController { Profile* profile); private: - virtual ~ExtensionDataTypeController(); + ~ExtensionDataTypeController() override; // DataTypeController implementations. - virtual bool StartModels() override; + bool StartModels() override; Profile* const profile_; diff --git a/chrome/browser/sync/glue/extension_setting_data_type_controller.h b/chrome/browser/sync/glue/extension_setting_data_type_controller.h index e6a1927..156847b 100644 --- a/chrome/browser/sync/glue/extension_setting_data_type_controller.h +++ b/chrome/browser/sync/glue/extension_setting_data_type_controller.h @@ -33,17 +33,16 @@ class ExtensionSettingDataTypeController Profile* profile); // NonFrontendDataTypeController implementation - virtual syncer::ModelType type() const override; - virtual syncer::ModelSafeGroup model_safe_group() const override; + syncer::ModelType type() const override; + syncer::ModelSafeGroup model_safe_group() const override; private: - virtual ~ExtensionSettingDataTypeController(); + ~ExtensionSettingDataTypeController() override; // NonFrontendDataTypeController implementation. - virtual bool PostTaskOnBackendThread( - const tracked_objects::Location& from_here, - const base::Closure& task) override; - virtual bool StartModels() override; + bool PostTaskOnBackendThread(const tracked_objects::Location& from_here, + const base::Closure& task) override; + bool StartModels() override; // Either EXTENSION_SETTINGS or APP_SETTINGS. syncer::ModelType type_; diff --git a/chrome/browser/sync/glue/extensions_activity_monitor.h b/chrome/browser/sync/glue/extensions_activity_monitor.h index 5ad8516..d8d2f4f 100644 --- a/chrome/browser/sync/glue/extensions_activity_monitor.h +++ b/chrome/browser/sync/glue/extensions_activity_monitor.h @@ -20,12 +20,12 @@ namespace browser_sync { class ExtensionsActivityMonitor : public content::NotificationObserver { public: ExtensionsActivityMonitor(); - virtual ~ExtensionsActivityMonitor(); + ~ExtensionsActivityMonitor() override; // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; const scoped_refptr<syncer::ExtensionsActivity>& GetExtensionsActivity(); diff --git a/chrome/browser/sync/glue/favicon_cache.h b/chrome/browser/sync/glue/favicon_cache.h index 99dd0416..0913d63 100644 --- a/chrome/browser/sync/glue/favicon_cache.h +++ b/chrome/browser/sync/glue/favicon_cache.h @@ -49,18 +49,17 @@ class FaviconCache : public syncer::SyncableService, public content::NotificationObserver { public: FaviconCache(Profile* profile, int max_sync_favicon_limit); - virtual ~FaviconCache(); + ~FaviconCache() override; // SyncableService implementation. - virtual syncer::SyncMergeResult MergeDataAndStartSyncing( + syncer::SyncMergeResult MergeDataAndStartSyncing( syncer::ModelType type, const syncer::SyncDataList& initial_sync_data, scoped_ptr<syncer::SyncChangeProcessor> sync_processor, scoped_ptr<syncer::SyncErrorFactory> error_handler) override; - virtual void StopSyncing(syncer::ModelType type) override; - virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) - const override; - virtual syncer::SyncError ProcessSyncChanges( + void StopSyncing(syncer::ModelType type) override; + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; + syncer::SyncError ProcessSyncChanges( const tracked_objects::Location& from_here, const syncer::SyncChangeList& change_list) override; @@ -98,9 +97,9 @@ class FaviconCache : public syncer::SyncableService, int64 visit_time_ms); // NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; private: friend class SyncFaviconCacheTest; diff --git a/chrome/browser/sync/glue/favicon_cache_unittest.cc b/chrome/browser/sync/glue/favicon_cache_unittest.cc index 6b0a728..ba57e23 100644 --- a/chrome/browser/sync/glue/favicon_cache_unittest.cc +++ b/chrome/browser/sync/glue/favicon_cache_unittest.cc @@ -38,15 +38,14 @@ const int kMaxSyncFavicons = kFaviconBatchSize*2; class TestChangeProcessor : public syncer::SyncChangeProcessor { public: TestChangeProcessor(); - virtual ~TestChangeProcessor(); + ~TestChangeProcessor() override; // Store a copy of all the changes passed in so we can examine them later. - virtual syncer::SyncError ProcessSyncChanges( + syncer::SyncError ProcessSyncChanges( const tracked_objects::Location& from_here, const syncer::SyncChangeList& change_list) override; - virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const - override { + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override { return syncer::SyncDataList(); } diff --git a/chrome/browser/sync/glue/frontend_data_type_controller.h b/chrome/browser/sync/glue/frontend_data_type_controller.h index 68dfcb7..6f5e411 100644 --- a/chrome/browser/sync/glue/frontend_data_type_controller.h +++ b/chrome/browser/sync/glue/frontend_data_type_controller.h @@ -52,17 +52,16 @@ class FrontendDataTypeController : public sync_driver::DataTypeController { ProfileSyncService* sync_service); // DataTypeController interface. - virtual void LoadModels( - const ModelLoadCallback& model_load_callback) override; - virtual void StartAssociating(const StartCallback& start_callback) override; - virtual void Stop() override; + void LoadModels(const ModelLoadCallback& model_load_callback) override; + void StartAssociating(const StartCallback& start_callback) override; + void Stop() override; virtual syncer::ModelType type() const = 0; - virtual syncer::ModelSafeGroup model_safe_group() const override; - virtual std::string name() const override; - virtual State state() const override; + syncer::ModelSafeGroup model_safe_group() const override; + std::string name() const override; + State state() const override; // DataTypeErrorHandler interface. - virtual void OnSingleDataTypeUnrecoverableError( + void OnSingleDataTypeUnrecoverableError( const syncer::SyncError& error) override; protected: @@ -70,7 +69,7 @@ class FrontendDataTypeController : public sync_driver::DataTypeController { // For testing only. FrontendDataTypeController(); - virtual ~FrontendDataTypeController(); + ~FrontendDataTypeController() override; // Kick off any dependent services that need to be running before we can // associate models. The default implementation is a no-op. @@ -84,7 +83,7 @@ class FrontendDataTypeController : public sync_driver::DataTypeController { virtual void CreateSyncComponents() = 0; // DataTypeController interface. - virtual void OnModelLoaded() override; + void OnModelLoaded() override; // Perform any DataType controller specific state cleanup before stopping // the datatype controller. The default implementation is a no-op. @@ -104,7 +103,7 @@ class FrontendDataTypeController : public sync_driver::DataTypeController { virtual sync_driver::AssociatorInterface* model_associator() const; virtual void set_model_associator( sync_driver::AssociatorInterface* associator); - virtual sync_driver::ChangeProcessor* GetChangeProcessor() const override; + sync_driver::ChangeProcessor* GetChangeProcessor() const override; virtual void set_change_processor(sync_driver::ChangeProcessor* processor); // Handles the reporting of unrecoverable error. It records stuff in diff --git a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc index 08bd79e..a59ba4d 100644 --- a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc @@ -47,10 +47,10 @@ class FrontendDataTypeControllerFake : public FrontendDataTypeController { profile, sync_service), mock_(mock) {} - virtual syncer::ModelType type() const override { return syncer::BOOKMARKS; } + syncer::ModelType type() const override { return syncer::BOOKMARKS; } private: - virtual void CreateSyncComponents() override { + void CreateSyncComponents() override { ProfileSyncComponentsFactory::SyncComponents sync_components = profile_sync_factory_-> CreateBookmarkSyncComponents(sync_service_, this); @@ -60,26 +60,20 @@ class FrontendDataTypeControllerFake : public FrontendDataTypeController { // We mock the following methods because their default implementations do // nothing, but we still want to make sure they're called appropriately. - virtual bool StartModels() override { - return mock_->StartModels(); - } - virtual void CleanUpState() override { - mock_->CleanUpState(); - } - virtual void RecordUnrecoverableError( - const tracked_objects::Location& from_here, - const std::string& message) override { + bool StartModels() override { return mock_->StartModels(); } + void CleanUpState() override { mock_->CleanUpState(); } + void RecordUnrecoverableError(const tracked_objects::Location& from_here, + const std::string& message) override { mock_->RecordUnrecoverableError(from_here, message); } - virtual void RecordAssociationTime(base::TimeDelta time) override { + void RecordAssociationTime(base::TimeDelta time) override { mock_->RecordAssociationTime(time); } - virtual void RecordStartFailure( - DataTypeController::ConfigureResult result) override { + void RecordStartFailure(DataTypeController::ConfigureResult result) override { mock_->RecordStartFailure(result); } private: - virtual ~FrontendDataTypeControllerFake() {} + ~FrontendDataTypeControllerFake() override {} FrontendDataTypeControllerMock* mock_; }; diff --git a/chrome/browser/sync/glue/history_delete_directives_data_type_controller.h b/chrome/browser/sync/glue/history_delete_directives_data_type_controller.h index ac56290..4f7e24e 100644 --- a/chrome/browser/sync/glue/history_delete_directives_data_type_controller.h +++ b/chrome/browser/sync/glue/history_delete_directives_data_type_controller.h @@ -25,16 +25,16 @@ class HistoryDeleteDirectivesDataTypeController ProfileSyncService* sync_service); // UIDataTypeController override. - virtual bool ReadyForStart() const override; - virtual bool StartModels() override; - virtual void StopModels() override; + bool ReadyForStart() const override; + bool StartModels() override; + void StopModels() override; // ProfileSyncServiceBaseObserver implementation. - virtual void OnStateChanged() override; + void OnStateChanged() override; private: // Refcounted. - virtual ~HistoryDeleteDirectivesDataTypeController(); + ~HistoryDeleteDirectivesDataTypeController() override; // Triggers a SingleDataTypeUnrecoverable error and returns true if the // type is no longer ready, else does nothing and returns false. diff --git a/chrome/browser/sync/glue/history_model_worker.cc b/chrome/browser/sync/glue/history_model_worker.cc index 87b5470..d9f8754 100644 --- a/chrome/browser/sync/glue/history_model_worker.cc +++ b/chrome/browser/sync/glue/history_model_worker.cc @@ -22,8 +22,8 @@ class WorkerTask : public history::HistoryDBTask { syncer::SyncerError* error) : work_(work), done_(done), error_(error) {} - virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) override { + bool RunOnDBThread(history::HistoryBackend* backend, + history::HistoryDatabase* db) override { *error_ = work_.Run(); done_->Signal(); return true; @@ -31,10 +31,10 @@ class WorkerTask : public history::HistoryDBTask { // Since the DoWorkAndWaitUntilDone() is synchronous, we don't need to run // any code asynchronously on the main thread after completion. - virtual void DoneRunOnMainThread() override {} + void DoneRunOnMainThread() override {} protected: - virtual ~WorkerTask() {} + ~WorkerTask() override {} syncer::WorkCallback work_; WaitableEvent* done_; @@ -46,16 +46,16 @@ class AddDBThreadObserverTask : public history::HistoryDBTask { explicit AddDBThreadObserverTask(base::Closure register_callback) : register_callback_(register_callback) {} - virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) override { + bool RunOnDBThread(history::HistoryBackend* backend, + history::HistoryDatabase* db) override { register_callback_.Run(); return true; } - virtual void DoneRunOnMainThread() override {} + void DoneRunOnMainThread() override {} private: - virtual ~AddDBThreadObserverTask() {} + ~AddDBThreadObserverTask() override {} base::Closure register_callback_; }; diff --git a/chrome/browser/sync/glue/history_model_worker.h b/chrome/browser/sync/glue/history_model_worker.h index 241fc32..1d73e51 100644 --- a/chrome/browser/sync/glue/history_model_worker.h +++ b/chrome/browser/sync/glue/history_model_worker.h @@ -29,19 +29,19 @@ class HistoryModelWorker : public syncer::ModelSafeWorker { syncer::WorkerLoopDestructionObserver* observer); // syncer::ModelSafeWorker implementation. Called on syncapi SyncerThread. - virtual void RegisterForLoopDestruction() override; - virtual syncer::ModelSafeGroup GetModelSafeGroup() override; + void RegisterForLoopDestruction() override; + syncer::ModelSafeGroup GetModelSafeGroup() override; // Called on history DB thread to register HistoryModelWorker to observe // destruction of history backend loop. void RegisterOnDBThread(); protected: - virtual syncer::SyncerError DoWorkAndWaitUntilDoneImpl( + syncer::SyncerError DoWorkAndWaitUntilDoneImpl( const syncer::WorkCallback& work) override; private: - virtual ~HistoryModelWorker(); + ~HistoryModelWorker() override; const base::WeakPtr<HistoryService> history_service_; // Helper object to make sure we don't leave tasks running on the history diff --git a/chrome/browser/sync/glue/invalidation_adapter.h b/chrome/browser/sync/glue/invalidation_adapter.h index 41adba0..a57d14c 100644 --- a/chrome/browser/sync/glue/invalidation_adapter.h +++ b/chrome/browser/sync/glue/invalidation_adapter.h @@ -14,14 +14,14 @@ namespace browser_sync { class InvalidationAdapter : public syncer::InvalidationInterface { public: explicit InvalidationAdapter(const syncer::Invalidation& invalidation); - virtual ~InvalidationAdapter(); + ~InvalidationAdapter() override; // Implementation of InvalidationInterface. - virtual bool IsUnknownVersion() const override; - virtual const std::string& GetPayload() const override; - virtual int64 GetVersion() const override; - virtual void Acknowledge() override; - virtual void Drop() override; + bool IsUnknownVersion() const override; + const std::string& GetPayload() const override; + int64 GetVersion() const override; + void Acknowledge() override; + void Drop() override; private: syncer::Invalidation invalidation_; diff --git a/chrome/browser/sync/glue/local_device_info_provider_impl.h b/chrome/browser/sync/glue/local_device_info_provider_impl.h index a4bdc9c..4c8145f 100644 --- a/chrome/browser/sync/glue/local_device_info_provider_impl.h +++ b/chrome/browser/sync/glue/local_device_info_provider_impl.h @@ -19,16 +19,15 @@ class LocalDeviceInfoProviderImpl : public sync_driver::LocalDeviceInfoProvider { public: LocalDeviceInfoProviderImpl(); - virtual ~LocalDeviceInfoProviderImpl(); + ~LocalDeviceInfoProviderImpl() override; // LocalDeviceInfoProvider implementation. - virtual const sync_driver::DeviceInfo* GetLocalDeviceInfo() const override; - virtual std::string GetLocalSyncCacheGUID() const override; - virtual void Initialize( - const std::string& cache_guid, - const std::string& signin_scoped_device_id) override; - virtual scoped_ptr<Subscription> RegisterOnInitializedCallback( - const base::Closure& callback) override; + const sync_driver::DeviceInfo* GetLocalDeviceInfo() const override; + std::string GetLocalSyncCacheGUID() const override; + void Initialize(const std::string& cache_guid, + const std::string& signin_scoped_device_id) override; + scoped_ptr<Subscription> RegisterOnInitializedCallback( + const base::Closure& callback) override; // Helper to construct a user agent string (ASCII) suitable for use by // the syncapi for any HTTP communication. This string is used by the sync diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller.h b/chrome/browser/sync/glue/non_frontend_data_type_controller.h index bcb5b61..ad69cd7b 100644 --- a/chrome/browser/sync/glue/non_frontend_data_type_controller.h +++ b/chrome/browser/sync/glue/non_frontend_data_type_controller.h @@ -57,18 +57,17 @@ class NonFrontendDataTypeController : public sync_driver::DataTypeController { ProfileSyncService* sync_service); // DataTypeController interface. - virtual void LoadModels( - const ModelLoadCallback& model_load_callback) override; - virtual void StartAssociating(const StartCallback& start_callback) override; - virtual void Stop() override; + void LoadModels(const ModelLoadCallback& model_load_callback) override; + void StartAssociating(const StartCallback& start_callback) override; + void Stop() override; virtual syncer::ModelType type() const = 0; virtual syncer::ModelSafeGroup model_safe_group() const = 0; - virtual std::string name() const override; - virtual State state() const override; + std::string name() const override; + State state() const override; // DataTypeErrorHandler interface. // Note: this is performed on the datatype's thread. - virtual void OnSingleDataTypeUnrecoverableError( + void OnSingleDataTypeUnrecoverableError( const syncer::SyncError& error) override; // Callback to receive background association results. @@ -91,10 +90,10 @@ class NonFrontendDataTypeController : public sync_driver::DataTypeController { // For testing only. NonFrontendDataTypeController(); - virtual ~NonFrontendDataTypeController(); + ~NonFrontendDataTypeController() override; // DataTypeController interface. - virtual void OnModelLoaded() override; + void OnModelLoaded() override; // Start any dependent services that need to be running before we can // associate models. The default implementation is a no-op. @@ -168,7 +167,7 @@ class NonFrontendDataTypeController : public sync_driver::DataTypeController { void set_state(State state); virtual sync_driver::AssociatorInterface* associator() const; - virtual sync_driver::ChangeProcessor* GetChangeProcessor() const override; + sync_driver::ChangeProcessor* GetChangeProcessor() const override; State state_; StartCallback start_callback_; diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc index 42374f7..e183230 100644 --- a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc @@ -63,45 +63,38 @@ class NonFrontendDataTypeControllerFake : public NonFrontendDataTypeController { sync_service), mock_(mock) {} - virtual syncer::ModelType type() const override { return syncer::BOOKMARKS; } - virtual syncer::ModelSafeGroup model_safe_group() const override { + syncer::ModelType type() const override { return syncer::BOOKMARKS; } + syncer::ModelSafeGroup model_safe_group() const override { return syncer::GROUP_DB; } private: - virtual ~NonFrontendDataTypeControllerFake() {} + ~NonFrontendDataTypeControllerFake() override {} - virtual ProfileSyncComponentsFactory::SyncComponents - CreateSyncComponents() override { + ProfileSyncComponentsFactory::SyncComponents CreateSyncComponents() override { return profile_sync_factory()-> CreateBookmarkSyncComponents(profile_sync_service(), this); } - virtual bool PostTaskOnBackendThread( - const tracked_objects::Location& from_here, - const base::Closure& task) override { + bool PostTaskOnBackendThread(const tracked_objects::Location& from_here, + const base::Closure& task) override { return BrowserThread::PostTask(BrowserThread::DB, from_here, task); } // We mock the following methods because their default implementations do // nothing, but we still want to make sure they're called appropriately. - virtual bool StartModels() override { - return mock_->StartModels(); - } - virtual void RecordUnrecoverableError( - const tracked_objects::Location& from_here, - const std::string& message) override { + bool StartModels() override { return mock_->StartModels(); } + void RecordUnrecoverableError(const tracked_objects::Location& from_here, + const std::string& message) override { mock_->RecordUnrecoverableError(from_here, message); } - virtual void RecordAssociationTime(base::TimeDelta time) override { + void RecordAssociationTime(base::TimeDelta time) override { mock_->RecordAssociationTime(time); } - virtual void RecordStartFailure( - DataTypeController::ConfigureResult result) override { + void RecordStartFailure(DataTypeController::ConfigureResult result) override { mock_->RecordStartFailure(result); } - virtual void DisconnectProcessor( - sync_driver::ChangeProcessor* processor) override{ + void DisconnectProcessor(sync_driver::ChangeProcessor* processor) override { mock_->DisconnectProcessor(processor); } diff --git a/chrome/browser/sync/glue/password_data_type_controller.h b/chrome/browser/sync/glue/password_data_type_controller.h index a970fe6..ae59542 100644 --- a/chrome/browser/sync/glue/password_data_type_controller.h +++ b/chrome/browser/sync/glue/password_data_type_controller.h @@ -27,17 +27,16 @@ class PasswordDataTypeController : public sync_driver::NonUIDataTypeController { Profile* profile); // NonFrontendDataTypeController implementation - virtual syncer::ModelType type() const override; - virtual syncer::ModelSafeGroup model_safe_group() const override; + syncer::ModelType type() const override; + syncer::ModelSafeGroup model_safe_group() const override; protected: - virtual ~PasswordDataTypeController(); + ~PasswordDataTypeController() override; // NonUIDataTypeController interface. - virtual bool PostTaskOnBackendThread( - const tracked_objects::Location& from_here, - const base::Closure& task) override; - virtual bool StartModels() override; + bool PostTaskOnBackendThread(const tracked_objects::Location& from_here, + const base::Closure& task) override; + bool StartModels() override; private: Profile* const profile_; diff --git a/chrome/browser/sync/glue/password_model_worker.h b/chrome/browser/sync/glue/password_model_worker.h index eeccc8b..d296b02 100644 --- a/chrome/browser/sync/glue/password_model_worker.h +++ b/chrome/browser/sync/glue/password_model_worker.h @@ -32,16 +32,16 @@ class PasswordModelWorker : public syncer::ModelSafeWorker { syncer::WorkerLoopDestructionObserver* observer); // syncer::ModelSafeWorker implementation. Called on syncapi SyncerThread. - virtual void RegisterForLoopDestruction() override; - virtual syncer::ModelSafeGroup GetModelSafeGroup() override; - virtual void RequestStop() override; + void RegisterForLoopDestruction() override; + syncer::ModelSafeGroup GetModelSafeGroup() override; + void RequestStop() override; protected: - virtual syncer::SyncerError DoWorkAndWaitUntilDoneImpl( + syncer::SyncerError DoWorkAndWaitUntilDoneImpl( const syncer::WorkCallback& work) override; private: - virtual ~PasswordModelWorker(); + ~PasswordModelWorker() override; void CallDoWorkAndSignalTask( const syncer::WorkCallback& work, diff --git a/chrome/browser/sync/glue/search_engine_data_type_controller.h b/chrome/browser/sync/glue/search_engine_data_type_controller.h index 2985888..154b773 100644 --- a/chrome/browser/sync/glue/search_engine_data_type_controller.h +++ b/chrome/browser/sync/glue/search_engine_data_type_controller.h @@ -29,11 +29,11 @@ class SearchEngineDataTypeController TemplateURLService::Subscription* GetSubscriptionForTesting(); private: - virtual ~SearchEngineDataTypeController(); + ~SearchEngineDataTypeController() override; // FrontendDataTypeController implementations. - virtual bool StartModels() override; - virtual void StopModels() override; + bool StartModels() override; + void StopModels() override; void OnTemplateURLServiceLoaded(); diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h index ffec031..7fe7413 100644 --- a/chrome/browser/sync/glue/sync_backend_host.h +++ b/chrome/browser/sync/glue/sync_backend_host.h @@ -52,7 +52,7 @@ class SyncBackendHost : public sync_driver::BackendDataTypeConfigurer { // Stubs used by implementing classes. SyncBackendHost(); - virtual ~SyncBackendHost(); + ~SyncBackendHost() override; // Called on the frontend's thread to kick off asynchronous initialization. // Optionally deletes the "Sync Data" folder during init in order to make diff --git a/chrome/browser/sync/glue/sync_backend_host_core.h b/chrome/browser/sync/glue/sync_backend_host_core.h index 06fdd4f..88a7e6f0 100644 --- a/chrome/browser/sync/glue/sync_backend_host_core.h +++ b/chrome/browser/sync/glue/sync_backend_host_core.h @@ -90,48 +90,41 @@ class SyncBackendHostCore // SyncManager::Observer implementation. The Core just acts like an air // traffic controller here, forwarding incoming messages to appropriate // landing threads. - virtual void OnSyncCycleCompleted( + void OnSyncCycleCompleted( const syncer::sessions::SyncSessionSnapshot& snapshot) override; - virtual void OnInitializationComplete( + void OnInitializationComplete( const syncer::WeakHandle<syncer::JsBackend>& js_backend, const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& debug_info_listener, bool success, syncer::ModelTypeSet restored_types) override; - virtual void OnConnectionStatusChange( - syncer::ConnectionStatus status) override; - virtual void OnActionableError( - const syncer::SyncProtocolError& sync_error) override; - virtual void OnMigrationRequested(syncer::ModelTypeSet types) override; - virtual void OnProtocolEvent(const syncer::ProtocolEvent& event) override; + void OnConnectionStatusChange(syncer::ConnectionStatus status) override; + void OnActionableError(const syncer::SyncProtocolError& sync_error) override; + void OnMigrationRequested(syncer::ModelTypeSet types) override; + void OnProtocolEvent(const syncer::ProtocolEvent& event) override; // SyncEncryptionHandler::Observer implementation. - virtual void OnPassphraseRequired( + void OnPassphraseRequired( syncer::PassphraseRequiredReason reason, const sync_pb::EncryptedData& pending_keys) override; - virtual void OnPassphraseAccepted() override; - virtual void OnBootstrapTokenUpdated( - const std::string& bootstrap_token, - syncer::BootstrapTokenType type) override; - virtual void OnEncryptedTypesChanged( - syncer::ModelTypeSet encrypted_types, - bool encrypt_everything) override; - virtual void OnEncryptionComplete() override; - virtual void OnCryptographerStateChanged( + void OnPassphraseAccepted() override; + void OnBootstrapTokenUpdated(const std::string& bootstrap_token, + syncer::BootstrapTokenType type) override; + void OnEncryptedTypesChanged(syncer::ModelTypeSet encrypted_types, + bool encrypt_everything) override; + void OnEncryptionComplete() override; + void OnCryptographerStateChanged( syncer::Cryptographer* cryptographer) override; - virtual void OnPassphraseTypeChanged(syncer::PassphraseType type, - base::Time passphrase_time) override; + void OnPassphraseTypeChanged(syncer::PassphraseType type, + base::Time passphrase_time) override; // TypeDebugInfoObserver implementation - virtual void OnCommitCountersUpdated( - syncer::ModelType type, - const syncer::CommitCounters& counters) override; - virtual void OnUpdateCountersUpdated( - syncer::ModelType type, - const syncer::UpdateCounters& counters) override; - virtual void OnStatusCountersUpdated( - syncer::ModelType type, - const syncer::StatusCounters& counters) override; + void OnCommitCountersUpdated(syncer::ModelType type, + const syncer::CommitCounters& counters) override; + void OnUpdateCountersUpdated(syncer::ModelType type, + const syncer::UpdateCounters& counters) override; + void OnStatusCountersUpdated(syncer::ModelType type, + const syncer::StatusCounters& counters) override; // Forwards an invalidation state change to the sync manager. void DoOnInvalidatorStateChange(syncer::InvalidatorState state); @@ -248,7 +241,7 @@ class SyncBackendHostCore friend class base::RefCountedThreadSafe<SyncBackendHostCore>; friend class SyncBackendHostForProfileSyncTest; - virtual ~SyncBackendHostCore(); + ~SyncBackendHostCore() override; // Invoked when initialization of syncapi is complete and we can start // our timer. diff --git a/chrome/browser/sync/glue/sync_backend_host_impl.h b/chrome/browser/sync/glue/sync_backend_host_impl.h index b5ce0e1..35001d1e 100644 --- a/chrome/browser/sync/glue/sync_backend_host_impl.h +++ b/chrome/browser/sync/glue/sync_backend_host_impl.h @@ -76,10 +76,10 @@ class SyncBackendHostImpl invalidation::InvalidationService* invalidator, const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, const base::FilePath& sync_folder); - virtual ~SyncBackendHostImpl(); + ~SyncBackendHostImpl() override; // SyncBackendHost implementation. - virtual void Initialize( + void Initialize( sync_driver::SyncFrontend* frontend, scoped_ptr<base::Thread> sync_thread, const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, @@ -91,52 +91,49 @@ class SyncBackendHostImpl syncer::ReportUnrecoverableErrorFunction report_unrecoverable_error_function, syncer::NetworkResources* network_resources) override; - virtual void UpdateCredentials( - const syncer::SyncCredentials& credentials) override; - virtual void StartSyncingWithServer() override; - virtual void SetEncryptionPassphrase( - const std::string& passphrase, - bool is_explicit) override; - virtual bool SetDecryptionPassphrase(const std::string& passphrase) - override WARN_UNUSED_RESULT; - virtual void StopSyncingForShutdown() override; - virtual scoped_ptr<base::Thread> Shutdown(syncer::ShutdownReason reason) - override; - virtual void UnregisterInvalidationIds() override; - virtual void ConfigureDataTypes( + void UpdateCredentials(const syncer::SyncCredentials& credentials) override; + void StartSyncingWithServer() override; + void SetEncryptionPassphrase(const std::string& passphrase, + bool is_explicit) override; + bool SetDecryptionPassphrase(const std::string& passphrase) override + WARN_UNUSED_RESULT; + void StopSyncingForShutdown() override; + scoped_ptr<base::Thread> Shutdown(syncer::ShutdownReason reason) override; + void UnregisterInvalidationIds() override; + void ConfigureDataTypes( syncer::ConfigureReason reason, const DataTypeConfigStateMap& config_state_map, - const base::Callback<void(syncer::ModelTypeSet, - syncer::ModelTypeSet)>& ready_task, + const base::Callback<void(syncer::ModelTypeSet, syncer::ModelTypeSet)>& + ready_task, const base::Callback<void()>& retry_callback) override; - virtual void ActivateDataType( - syncer::ModelType type, syncer::ModelSafeGroup group, - sync_driver::ChangeProcessor* change_processor) override; - virtual void DeactivateDataType(syncer::ModelType type) override; - virtual void EnableEncryptEverything() override; - virtual syncer::UserShare* GetUserShare() const override; - virtual scoped_ptr<syncer::SyncContextProxy> GetSyncContextProxy() override; - virtual Status GetDetailedStatus() override; - virtual syncer::sessions::SyncSessionSnapshot - GetLastSessionSnapshot() const override; - virtual bool HasUnsyncedItems() const override; - virtual bool IsNigoriEnabled() const override; - virtual syncer::PassphraseType GetPassphraseType() const override; - virtual base::Time GetExplicitPassphraseTime() const override; - virtual bool IsCryptographerReady( + void ActivateDataType( + syncer::ModelType type, + syncer::ModelSafeGroup group, + sync_driver::ChangeProcessor* change_processor) override; + void DeactivateDataType(syncer::ModelType type) override; + void EnableEncryptEverything() override; + syncer::UserShare* GetUserShare() const override; + scoped_ptr<syncer::SyncContextProxy> GetSyncContextProxy() override; + Status GetDetailedStatus() override; + syncer::sessions::SyncSessionSnapshot GetLastSessionSnapshot() const override; + bool HasUnsyncedItems() const override; + bool IsNigoriEnabled() const override; + syncer::PassphraseType GetPassphraseType() const override; + base::Time GetExplicitPassphraseTime() const override; + bool IsCryptographerReady( const syncer::BaseTransaction* trans) const override; - virtual void GetModelSafeRoutingInfo( + void GetModelSafeRoutingInfo( syncer::ModelSafeRoutingInfo* out) const override; - virtual void FlushDirectory() const override; - virtual void RequestBufferedProtocolEventsAndEnableForwarding() override; - virtual void DisableProtocolEventForwarding() override; - virtual void EnableDirectoryTypeDebugInfoForwarding() override; - virtual void DisableDirectoryTypeDebugInfoForwarding() override; - virtual void GetAllNodesForTypes( + void FlushDirectory() const override; + void RequestBufferedProtocolEventsAndEnableForwarding() override; + void DisableProtocolEventForwarding() override; + void EnableDirectoryTypeDebugInfoForwarding() override; + void DisableDirectoryTypeDebugInfoForwarding() override; + void GetAllNodesForTypes( syncer::ModelTypeSet types, base::Callback<void(const std::vector<syncer::ModelType>&, ScopedVector<base::ListValue>)> type) override; - virtual base::MessageLoop* GetSyncLoopForTesting() override; + base::MessageLoop* GetSyncLoopForTesting() override; protected: // The types and functions below are protected so that test @@ -292,17 +289,15 @@ class SyncBackendHostImpl syncer::ConnectionStatus status); // NotificationObserver implementation. - virtual void Observe( - int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // InvalidationHandler implementation. - virtual void OnInvalidatorStateChange( - syncer::InvalidatorState state) override; - virtual void OnIncomingInvalidation( + void OnInvalidatorStateChange(syncer::InvalidatorState state) override; + void OnIncomingInvalidation( const syncer::ObjectIdInvalidationMap& invalidation_map) override; - virtual std::string GetOwnerName() const override; + std::string GetOwnerName() const override; content::NotificationRegistrar notification_registrar_; diff --git a/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc b/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc index 5f42931..d517cf1 100644 --- a/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc +++ b/chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc @@ -115,11 +115,10 @@ class FakeSyncManagerFactory : public syncer::SyncManagerFactory { fake_manager_(fake_manager) { *fake_manager_ = NULL; } - virtual ~FakeSyncManagerFactory() {} + ~FakeSyncManagerFactory() override {} // SyncManagerFactory implementation. Called on the sync thread. - virtual scoped_ptr<SyncManager> CreateSyncManager( - std::string name) override { + scoped_ptr<SyncManager> CreateSyncManager(std::string name) override { *fake_manager_ = new FakeSyncManager(initial_sync_ended_types_, progress_marker_types_, configure_fail_types_); diff --git a/chrome/browser/sync/glue/sync_backend_host_mock.h b/chrome/browser/sync/glue/sync_backend_host_mock.h index 847d5e6..3354b34 100644 --- a/chrome/browser/sync/glue/sync_backend_host_mock.h +++ b/chrome/browser/sync/glue/sync_backend_host_mock.h @@ -23,9 +23,9 @@ namespace browser_sync { class SyncBackendHostMock : public SyncBackendHost { public: SyncBackendHostMock(); - virtual ~SyncBackendHostMock(); + ~SyncBackendHostMock() override; - virtual void Initialize( + void Initialize( sync_driver::SyncFrontend* frontend, scoped_ptr<base::Thread> sync_thread, const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, @@ -38,76 +38,72 @@ class SyncBackendHostMock : public SyncBackendHost { report_unrecoverable_error_function, syncer::NetworkResources* network_resources) override; - virtual void UpdateCredentials( - const syncer::SyncCredentials& credentials) override; + void UpdateCredentials(const syncer::SyncCredentials& credentials) override; - virtual void StartSyncingWithServer() override; + void StartSyncingWithServer() override; - virtual void SetEncryptionPassphrase( - const std::string& passphrase, - bool is_explicit) override; + void SetEncryptionPassphrase(const std::string& passphrase, + bool is_explicit) override; - virtual bool SetDecryptionPassphrase( - const std::string& passphrase) override; + bool SetDecryptionPassphrase(const std::string& passphrase) override; - virtual void StopSyncingForShutdown() override; + void StopSyncingForShutdown() override; - virtual scoped_ptr<base::Thread> Shutdown(syncer::ShutdownReason reason) - override; + scoped_ptr<base::Thread> Shutdown(syncer::ShutdownReason reason) override; - virtual void UnregisterInvalidationIds() override; + void UnregisterInvalidationIds() override; - virtual void ConfigureDataTypes( + void ConfigureDataTypes( syncer::ConfigureReason reason, const DataTypeConfigStateMap& config_state_map, - const base::Callback<void(syncer::ModelTypeSet, - syncer::ModelTypeSet)>& ready_task, + const base::Callback<void(syncer::ModelTypeSet, syncer::ModelTypeSet)>& + ready_task, const base::Callback<void()>& retry_callback) override; - virtual void EnableEncryptEverything() override; + void EnableEncryptEverything() override; - virtual void ActivateDataType( - syncer::ModelType type, syncer::ModelSafeGroup group, + void ActivateDataType( + syncer::ModelType type, + syncer::ModelSafeGroup group, sync_driver::ChangeProcessor* change_processor) override; - virtual void DeactivateDataType(syncer::ModelType type) override; + void DeactivateDataType(syncer::ModelType type) override; - virtual syncer::UserShare* GetUserShare() const override; + syncer::UserShare* GetUserShare() const override; - virtual scoped_ptr<syncer::SyncContextProxy> GetSyncContextProxy() override; + scoped_ptr<syncer::SyncContextProxy> GetSyncContextProxy() override; - virtual Status GetDetailedStatus() override; + Status GetDetailedStatus() override; - virtual syncer::sessions::SyncSessionSnapshot - GetLastSessionSnapshot() const override; + syncer::sessions::SyncSessionSnapshot GetLastSessionSnapshot() const override; - virtual bool HasUnsyncedItems() const override; + bool HasUnsyncedItems() const override; - virtual bool IsNigoriEnabled() const override; + bool IsNigoriEnabled() const override; - virtual syncer::PassphraseType GetPassphraseType() const override; + syncer::PassphraseType GetPassphraseType() const override; - virtual base::Time GetExplicitPassphraseTime() const override; + base::Time GetExplicitPassphraseTime() const override; - virtual bool IsCryptographerReady( + bool IsCryptographerReady( const syncer::BaseTransaction* trans) const override; - virtual void GetModelSafeRoutingInfo( + void GetModelSafeRoutingInfo( syncer::ModelSafeRoutingInfo* out) const override; - virtual void FlushDirectory() const override; + void FlushDirectory() const override; - virtual void RequestBufferedProtocolEventsAndEnableForwarding() override; - virtual void DisableProtocolEventForwarding() override; + void RequestBufferedProtocolEventsAndEnableForwarding() override; + void DisableProtocolEventForwarding() override; - virtual void EnableDirectoryTypeDebugInfoForwarding() override; - virtual void DisableDirectoryTypeDebugInfoForwarding() override; + void EnableDirectoryTypeDebugInfoForwarding() override; + void DisableDirectoryTypeDebugInfoForwarding() override; - virtual void GetAllNodesForTypes( + void GetAllNodesForTypes( syncer::ModelTypeSet types, base::Callback<void(const std::vector<syncer::ModelType>& type, - ScopedVector<base::ListValue>) > callback) override; + ScopedVector<base::ListValue>)> callback) override; - virtual base::MessageLoop* GetSyncLoopForTesting() override; + base::MessageLoop* GetSyncLoopForTesting() override; void set_fail_initial_download(bool should_fail); diff --git a/chrome/browser/sync/glue/sync_backend_registrar.h b/chrome/browser/sync/glue/sync_backend_registrar.h index e3e226b..e6e2d53 100644 --- a/chrome/browser/sync/glue/sync_backend_registrar.h +++ b/chrome/browser/sync/glue/sync_backend_registrar.h @@ -58,7 +58,7 @@ class SyncBackendRegistrar : public syncer::SyncManager::ChangeDelegate, // loops are destroyed. Registrar destroys itself on last worker // notification. Sync thread will be stopped if ownership was not // released. - virtual ~SyncBackendRegistrar(); + ~SyncBackendRegistrar() override; // Informs the SyncBackendRegistrar of the currently enabled set of types. // These types will be placed in the passive group. This function should be @@ -105,18 +105,18 @@ class SyncBackendRegistrar : public syncer::SyncManager::ChangeDelegate, // SyncManager::ChangeDelegate implementation. May be called from // any thread. - virtual void OnChangesApplied( + void OnChangesApplied( syncer::ModelType model_type, int64 model_version, const syncer::BaseTransaction* trans, const syncer::ImmutableChangeRecordList& changes) override; - virtual void OnChangesComplete(syncer::ModelType model_type) override; + void OnChangesComplete(syncer::ModelType model_type) override; void GetWorkers(std::vector<scoped_refptr<syncer::ModelSafeWorker> >* out); void GetModelSafeRoutingInfo(syncer::ModelSafeRoutingInfo* out); // syncer::WorkerLoopDestructionObserver implementation. - virtual void OnWorkerLoopDestroyed(syncer::ModelSafeGroup group) override; + void OnWorkerLoopDestroyed(syncer::ModelSafeGroup group) override; // Release ownership of |sync_thread_|. Called when sync is disabled. scoped_ptr<base::Thread> ReleaseSyncThread(); diff --git a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc index 0bb25fa..f1a62ee0 100644 --- a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc +++ b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc @@ -291,7 +291,7 @@ class TestRegistrar : public SyncBackendRegistrar { : SyncBackendRegistrar("test", profile, scoped_ptr<base::Thread>()), test_(test) {} - virtual ~TestRegistrar() { test_->registrar_destroyed_.Signal(); } + ~TestRegistrar() override { test_->registrar_destroyed_.Signal(); } private: SyncBackendRegistrarShutdownTest* test_; diff --git a/chrome/browser/sync/glue/theme_data_type_controller.h b/chrome/browser/sync/glue/theme_data_type_controller.h index 8d21215..ee1d93a 100644 --- a/chrome/browser/sync/glue/theme_data_type_controller.h +++ b/chrome/browser/sync/glue/theme_data_type_controller.h @@ -18,10 +18,10 @@ class ThemeDataTypeController : public sync_driver::UIDataTypeController { Profile* profile); private: - virtual ~ThemeDataTypeController(); + ~ThemeDataTypeController() override; // UIDataTypeController implementations. - virtual bool StartModels() override; + bool StartModels() override; Profile* const profile_; DISALLOW_COPY_AND_ASSIGN(ThemeDataTypeController); diff --git a/chrome/browser/sync/glue/typed_url_change_processor.h b/chrome/browser/sync/glue/typed_url_change_processor.h index 71403a4..69f3e18 100644 --- a/chrome/browser/sync/glue/typed_url_change_processor.h +++ b/chrome/browser/sync/glue/typed_url_change_processor.h @@ -50,36 +50,36 @@ class TypedUrlChangeProcessor : public sync_driver::ChangeProcessor, TypedUrlModelAssociator* model_associator, history::HistoryBackend* history_backend, sync_driver::DataTypeErrorHandler* error_handler); - virtual ~TypedUrlChangeProcessor(); + ~TypedUrlChangeProcessor() override; // content::NotificationObserver implementation. // History -> sync API change application. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // history::HistoryBackendObserver: - virtual void OnURLVisited(history::HistoryBackend* history_backend, - ui::PageTransition transition, - const history::URLRow& row, - const history::RedirectList& redirects, - base::Time visit_time) override; + void OnURLVisited(history::HistoryBackend* history_backend, + ui::PageTransition transition, + const history::URLRow& row, + const history::RedirectList& redirects, + base::Time visit_time) override; // sync API model -> WebDataService change application. - virtual void ApplyChangesFromSyncModel( + void ApplyChangesFromSyncModel( const syncer::BaseTransaction* trans, int64 model_version, const syncer::ImmutableChangeRecordList& changes) override; // Commit changes here, after we've released the transaction lock to avoid // jank. - virtual void CommitChangesFromSyncModel() override; + void CommitChangesFromSyncModel() override; // Stop processing changes and wait for being destroyed. void Disconnect(); protected: - virtual void StartImpl() override; + void StartImpl() override; private: friend class ScopedStopObserving<TypedUrlChangeProcessor>; diff --git a/chrome/browser/sync/glue/typed_url_data_type_controller.cc b/chrome/browser/sync/glue/typed_url_data_type_controller.cc index 93cb40d2..a4ec9af 100644 --- a/chrome/browser/sync/glue/typed_url_data_type_controller.cc +++ b/chrome/browser/sync/glue/typed_url_data_type_controller.cc @@ -38,8 +38,8 @@ class RunTaskOnHistoryThread : public history::HistoryDBTask { dtc_(dtc) { } - virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) override { + bool RunOnDBThread(history::HistoryBackend* backend, + history::HistoryDatabase* db) override { // Set the backend, then release our reference before executing the task. dtc_->SetBackend(backend); dtc_ = NULL; @@ -53,10 +53,10 @@ class RunTaskOnHistoryThread : public history::HistoryDBTask { return true; } - virtual void DoneRunOnMainThread() override {} + void DoneRunOnMainThread() override {} protected: - virtual ~RunTaskOnHistoryThread() {} + ~RunTaskOnHistoryThread() override {} scoped_ptr<base::Closure> task_; scoped_refptr<TypedUrlDataTypeController> dtc_; diff --git a/chrome/browser/sync/glue/typed_url_data_type_controller.h b/chrome/browser/sync/glue/typed_url_data_type_controller.h index 8833f93..92678f6 100644 --- a/chrome/browser/sync/glue/typed_url_data_type_controller.h +++ b/chrome/browser/sync/glue/typed_url_data_type_controller.h @@ -32,9 +32,9 @@ class TypedUrlDataTypeController : public NonFrontendDataTypeController { ProfileSyncService* sync_service); // NonFrontendDataTypeController implementation - virtual syncer::ModelType type() const override; - virtual syncer::ModelSafeGroup model_safe_group() const override; - virtual bool ReadyForStart() const override; + syncer::ModelType type() const override; + syncer::ModelSafeGroup model_safe_group() const override; + bool ReadyForStart() const override; // Invoked on the history thread to set our history backend - must be called // before CreateSyncComponents() is invoked. @@ -42,16 +42,13 @@ class TypedUrlDataTypeController : public NonFrontendDataTypeController { protected: // NonFrontendDataTypeController interface. - virtual bool PostTaskOnBackendThread( - const tracked_objects::Location& from_here, - const base::Closure& task) override; - virtual ProfileSyncComponentsFactory::SyncComponents CreateSyncComponents() - override; - virtual void DisconnectProcessor( - sync_driver::ChangeProcessor* processor) override; + bool PostTaskOnBackendThread(const tracked_objects::Location& from_here, + const base::Closure& task) override; + ProfileSyncComponentsFactory::SyncComponents CreateSyncComponents() override; + void DisconnectProcessor(sync_driver::ChangeProcessor* processor) override; private: - virtual ~TypedUrlDataTypeController(); + ~TypedUrlDataTypeController() override; void OnSavingBrowserHistoryDisabledChanged(); diff --git a/chrome/browser/sync/glue/typed_url_model_associator.h b/chrome/browser/sync/glue/typed_url_model_associator.h index 4fbc318d..44e9ea7b 100644 --- a/chrome/browser/sync/glue/typed_url_model_associator.h +++ b/chrome/browser/sync/glue/typed_url_model_associator.h @@ -51,27 +51,27 @@ class TypedUrlModelAssociator : public sync_driver::AssociatorInterface { TypedUrlModelAssociator(ProfileSyncService* sync_service, history::HistoryBackend* history_backend, sync_driver::DataTypeErrorHandler* error_handler); - virtual ~TypedUrlModelAssociator(); + ~TypedUrlModelAssociator() override; // AssociatorInterface implementation. // // Iterates through the sync model looking for matched pairs of items. - virtual syncer::SyncError AssociateModels( + syncer::SyncError AssociateModels( syncer::SyncMergeResult* local_merge_result, syncer::SyncMergeResult* syncer_merge_result) override; // Clears all associations. - virtual syncer::SyncError DisassociateModels() override; + syncer::SyncError DisassociateModels() override; // Called from the main thread, to abort the currently active model // association (for example, if we are shutting down). - virtual void AbortAssociation() override; + void AbortAssociation() override; // The has_nodes out param is true if the sync model has nodes other // than the permanent tagged nodes. - virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes) override; + bool SyncModelHasUserCreatedNodes(bool* has_nodes) override; - virtual bool CryptoReadyIfNecessary() override; + bool CryptoReadyIfNecessary() override; // Delete all typed url nodes. bool DeleteAllNodes(syncer::WriteTransaction* trans); diff --git a/chrome/browser/sync/glue/ui_model_worker.h b/chrome/browser/sync/glue/ui_model_worker.h index b6841c3..cd0d184 100644 --- a/chrome/browser/sync/glue/ui_model_worker.h +++ b/chrome/browser/sync/glue/ui_model_worker.h @@ -22,15 +22,15 @@ class UIModelWorker : public syncer::ModelSafeWorker { explicit UIModelWorker(syncer::WorkerLoopDestructionObserver* observer); // syncer::ModelSafeWorker implementation. Called on syncapi SyncerThread. - virtual void RegisterForLoopDestruction() override; - virtual syncer::ModelSafeGroup GetModelSafeGroup() override; + void RegisterForLoopDestruction() override; + syncer::ModelSafeGroup GetModelSafeGroup() override; protected: - virtual syncer::SyncerError DoWorkAndWaitUntilDoneImpl( + syncer::SyncerError DoWorkAndWaitUntilDoneImpl( const syncer::WorkCallback& work) override; private: - virtual ~UIModelWorker(); + ~UIModelWorker() override; DISALLOW_COPY_AND_ASSIGN(UIModelWorker); }; diff --git a/chrome/browser/sync/profile_sync_auth_provider.cc b/chrome/browser/sync/profile_sync_auth_provider.cc index e8292e0..ce701e1 100644 --- a/chrome/browser/sync/profile_sync_auth_provider.cc +++ b/chrome/browser/sync/profile_sync_auth_provider.cc @@ -25,9 +25,8 @@ class ProfileSyncAuthProvider::SyncThreadProxy scoped_refptr<base::SingleThreadTaskRunner> provider_task_runner); // syncer::SyncAuthProvider implementation. - virtual void RequestAccessToken( - const RequestTokenCallback& callback) override; - virtual void InvalidateAccessToken(const std::string& token) override; + void RequestAccessToken(const RequestTokenCallback& callback) override; + void InvalidateAccessToken(const std::string& token) override; private: base::WeakPtr<ProfileSyncAuthProvider> provider_impl_; diff --git a/chrome/browser/sync/profile_sync_auth_provider.h b/chrome/browser/sync/profile_sync_auth_provider.h index f87d721..de3f3d9 100644 --- a/chrome/browser/sync/profile_sync_auth_provider.h +++ b/chrome/browser/sync/profile_sync_auth_provider.h @@ -26,14 +26,14 @@ class ProfileSyncAuthProvider : public OAuth2TokenService::Consumer, ProfileSyncAuthProvider(ProfileOAuth2TokenService* token_service, const std::string& account_id, const std::string& scope); - virtual ~ProfileSyncAuthProvider(); + ~ProfileSyncAuthProvider() override; // OAuth2TokenService::Consumer implementation. - virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, - const std::string& access_token, - const base::Time& expiration_time) override; - virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, - const GoogleServiceAuthError& error) override; + void OnGetTokenSuccess(const OAuth2TokenService::Request* request, + const std::string& access_token, + const base::Time& expiration_time) override; + void OnGetTokenFailure(const OAuth2TokenService::Request* request, + const GoogleServiceAuthError& error) override; // Request access token from OAuth2TokenService. Once access token is received // result should be posted to callback on task_runner thread. diff --git a/chrome/browser/sync/profile_sync_components_factory.h b/chrome/browser/sync/profile_sync_components_factory.h index f3f56de..2ee7c16 100644 --- a/chrome/browser/sync/profile_sync_components_factory.h +++ b/chrome/browser/sync/profile_sync_components_factory.h @@ -72,7 +72,7 @@ class ProfileSyncComponentsFactory : model_associator(ma), change_processor(cp) {} }; - virtual ~ProfileSyncComponentsFactory() override {} + ~ProfileSyncComponentsFactory() override {} // Creates and registers enabled datatypes with the provided // ProfileSyncService. diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc index 54847c0..e7c818e 100644 --- a/chrome/browser/sync/profile_sync_components_factory_impl.cc +++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc @@ -588,12 +588,12 @@ class TokenServiceProvider OAuth2TokenService* token_service); // OAuth2TokenServiceRequest::TokenServiceProvider implementation. - virtual scoped_refptr<base::SingleThreadTaskRunner> - GetTokenServiceTaskRunner() override; - virtual OAuth2TokenService* GetTokenService() override; + scoped_refptr<base::SingleThreadTaskRunner> GetTokenServiceTaskRunner() + override; + OAuth2TokenService* GetTokenService() override; private: - virtual ~TokenServiceProvider(); + ~TokenServiceProvider() override; scoped_refptr<base::SingleThreadTaskRunner> task_runner_; OAuth2TokenService* token_service_; diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.h b/chrome/browser/sync/profile_sync_components_factory_impl.h index 13691b5..13694fe 100644 --- a/chrome/browser/sync/profile_sync_components_factory_impl.h +++ b/chrome/browser/sync/profile_sync_components_factory_impl.h @@ -40,41 +40,40 @@ class ProfileSyncComponentsFactoryImpl : public ProfileSyncComponentsFactory { const GURL& sync_service_url, OAuth2TokenService* token_service, net::URLRequestContextGetter* url_request_context_getter); - virtual ~ProfileSyncComponentsFactoryImpl(); + ~ProfileSyncComponentsFactoryImpl() override; - virtual void RegisterDataTypes(ProfileSyncService* pss) override; + void RegisterDataTypes(ProfileSyncService* pss) override; - virtual sync_driver::DataTypeManager* CreateDataTypeManager( + sync_driver::DataTypeManager* CreateDataTypeManager( const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& debug_info_listener, const sync_driver::DataTypeController::TypeMap* controllers, const sync_driver::DataTypeEncryptionHandler* encryption_handler, browser_sync::SyncBackendHost* backend, - sync_driver::DataTypeManagerObserver* observer) - override; + sync_driver::DataTypeManagerObserver* observer) override; - virtual browser_sync::SyncBackendHost* CreateSyncBackendHost( + browser_sync::SyncBackendHost* CreateSyncBackendHost( const std::string& name, Profile* profile, invalidation::InvalidationService* invalidator, const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, const base::FilePath& sync_folder) override; - virtual scoped_ptr<sync_driver::LocalDeviceInfoProvider> - CreateLocalDeviceInfoProvider() override; + scoped_ptr<sync_driver::LocalDeviceInfoProvider> + CreateLocalDeviceInfoProvider() override; - virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( + base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( syncer::ModelType type) override; - virtual scoped_ptr<syncer::AttachmentService> CreateAttachmentService( + scoped_ptr<syncer::AttachmentService> CreateAttachmentService( const scoped_refptr<syncer::AttachmentStore>& attachment_store, const syncer::UserShare& user_share, syncer::AttachmentService::Delegate* delegate) override; // Legacy datatypes that need to be converted to the SyncableService API. - virtual SyncComponents CreateBookmarkSyncComponents( + SyncComponents CreateBookmarkSyncComponents( ProfileSyncService* profile_sync_service, sync_driver::DataTypeErrorHandler* error_handler) override; - virtual SyncComponents CreateTypedUrlSyncComponents( + SyncComponents CreateTypedUrlSyncComponents( ProfileSyncService* profile_sync_service, history::HistoryBackend* history_backend, sync_driver::DataTypeErrorHandler* error_handler) override; diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h index 07735b8..631c780 100644 --- a/chrome/browser/sync/profile_sync_service.h +++ b/chrome/browser/sync/profile_sync_service.h @@ -275,7 +275,7 @@ class ProfileSyncService : public ProfileSyncServiceBase, scoped_ptr<SupervisedUserSigninManagerWrapper> signin_wrapper, ProfileOAuth2TokenService* oauth2_token_service, browser_sync::ProfileSyncServiceStartBehavior start_behavior); - virtual ~ProfileSyncService(); + ~ProfileSyncService() override; // Initializes the object. This must be called at most once, and // immediately after an object of this class is constructed. @@ -284,14 +284,12 @@ class ProfileSyncService : public ProfileSyncServiceBase, virtual void SetSyncSetupCompleted(); // ProfileSyncServiceBase implementation. - virtual bool HasSyncSetupCompleted() const override; - virtual bool SyncActive() const override; - virtual syncer::ModelTypeSet GetActiveDataTypes() const override; - virtual void AddObserver(ProfileSyncServiceBase::Observer* observer) override; - virtual void RemoveObserver( - ProfileSyncServiceBase::Observer* observer) override; - virtual bool HasObserver( - ProfileSyncServiceBase::Observer* observer) const override; + bool HasSyncSetupCompleted() const override; + bool SyncActive() const override; + syncer::ModelTypeSet GetActiveDataTypes() const override; + void AddObserver(ProfileSyncServiceBase::Observer* observer) override; + void RemoveObserver(ProfileSyncServiceBase::Observer* observer) override; + bool HasObserver(ProfileSyncServiceBase::Observer* observer) const override; void AddProtocolEventObserver(browser_sync::ProtocolEventObserver* observer); void RemoveProtocolEventObserver( @@ -393,55 +391,50 @@ class ProfileSyncService : public ProfileSyncServiceBase, virtual void StopSyncingPermanently(); // SyncFrontend implementation. - virtual void OnBackendInitialized( + void OnBackendInitialized( const syncer::WeakHandle<syncer::JsBackend>& js_backend, const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& debug_info_listener, const std::string& cache_guid, bool success) override; - virtual void OnSyncCycleCompleted() override; - virtual void OnProtocolEvent(const syncer::ProtocolEvent& event) override; - virtual void OnDirectoryTypeCommitCounterUpdated( + void OnSyncCycleCompleted() override; + void OnProtocolEvent(const syncer::ProtocolEvent& event) override; + void OnDirectoryTypeCommitCounterUpdated( syncer::ModelType type, const syncer::CommitCounters& counters) override; - virtual void OnDirectoryTypeUpdateCounterUpdated( + void OnDirectoryTypeUpdateCounterUpdated( syncer::ModelType type, const syncer::UpdateCounters& counters) override; - virtual void OnDirectoryTypeStatusCounterUpdated( + void OnDirectoryTypeStatusCounterUpdated( syncer::ModelType type, const syncer::StatusCounters& counters) override; - virtual void OnConnectionStatusChange( - syncer::ConnectionStatus status) override; - virtual void OnPassphraseRequired( + void OnConnectionStatusChange(syncer::ConnectionStatus status) override; + void OnPassphraseRequired( syncer::PassphraseRequiredReason reason, const sync_pb::EncryptedData& pending_keys) override; - virtual void OnPassphraseAccepted() override; - virtual void OnEncryptedTypesChanged( - syncer::ModelTypeSet encrypted_types, - bool encrypt_everything) override; - virtual void OnEncryptionComplete() override; - virtual void OnMigrationNeededForTypes( - syncer::ModelTypeSet types) override; - virtual void OnExperimentsChanged( - const syncer::Experiments& experiments) override; - virtual void OnActionableError( - const syncer::SyncProtocolError& error) override; + void OnPassphraseAccepted() override; + void OnEncryptedTypesChanged(syncer::ModelTypeSet encrypted_types, + bool encrypt_everything) override; + void OnEncryptionComplete() override; + void OnMigrationNeededForTypes(syncer::ModelTypeSet types) override; + void OnExperimentsChanged(const syncer::Experiments& experiments) override; + void OnActionableError(const syncer::SyncProtocolError& error) override; // DataTypeManagerObserver implementation. - virtual void OnConfigureDone( + void OnConfigureDone( const sync_driver::DataTypeManager::ConfigureResult& result) override; - virtual void OnConfigureStart() override; + void OnConfigureStart() override; // DataTypeEncryptionHandler implementation. - virtual bool IsPassphraseRequired() const override; - virtual syncer::ModelTypeSet GetEncryptedDataTypes() const override; + bool IsPassphraseRequired() const override; + syncer::ModelTypeSet GetEncryptedDataTypes() const override; // SigninManagerBase::Observer implementation. - virtual void GoogleSigninSucceeded(const std::string& account_id, - const std::string& username, - const std::string& password) override; - virtual void GoogleSignedOut(const std::string& account_id, - const std::string& username) override; + void GoogleSigninSucceeded(const std::string& account_id, + const std::string& username, + const std::string& password) override; + void GoogleSignedOut(const std::string& account_id, + const std::string& username) override; // Called when a user chooses which data types to sync as part of the sync // setup wizard. |sync_everything| represents whether they chose the @@ -541,9 +534,8 @@ class ProfileSyncService : public ProfileSyncServiceBase, virtual bool IsManaged() const; // syncer::UnrecoverableErrorHandler implementation. - virtual void OnUnrecoverableError( - const tracked_objects::Location& from_here, - const std::string& message) override; + void OnUnrecoverableError(const tracked_objects::Location& from_here, + const std::string& message) override; // Called to re-enable a type disabled by DisableDatatype(..). Note, this does // not change the preferred state of a datatype, and is not persisted across @@ -601,7 +593,7 @@ class ProfileSyncService : public ProfileSyncServiceBase, virtual void DeactivateDataType(syncer::ModelType type); // SyncPrefObserver implementation. - virtual void OnSyncManagedPrefChange(bool is_sync_managed) override; + void OnSyncManagedPrefChange(bool is_sync_managed) override; // Changes which data types we're going to be syncing to |preferred_types|. // If it is running, the DataTypeManager will be instructed to reconfigure @@ -727,22 +719,20 @@ class ProfileSyncService : public ProfileSyncServiceBase, const syncer::Experiments& current_experiments() const; // OAuth2TokenService::Consumer implementation. - virtual void OnGetTokenSuccess( - const OAuth2TokenService::Request* request, - const std::string& access_token, - const base::Time& expiration_time) override; - virtual void OnGetTokenFailure( - const OAuth2TokenService::Request* request, - const GoogleServiceAuthError& error) override; + void OnGetTokenSuccess(const OAuth2TokenService::Request* request, + const std::string& access_token, + const base::Time& expiration_time) override; + void OnGetTokenFailure(const OAuth2TokenService::Request* request, + const GoogleServiceAuthError& error) override; // OAuth2TokenService::Observer implementation. - virtual void OnRefreshTokenAvailable(const std::string& account_id) override; - virtual void OnRefreshTokenRevoked(const std::string& account_id) override; - virtual void OnRefreshTokensLoaded() override; + void OnRefreshTokenAvailable(const std::string& account_id) override; + void OnRefreshTokenRevoked(const std::string& account_id) override; + void OnRefreshTokensLoaded() override; // KeyedService implementation. This must be called exactly // once (before this object is destroyed). - virtual void Shutdown() override; + void Shutdown() override; // Called when a datatype (SyncableService) has a need for sync to start // ASAP, presumably because a local change event has occurred but we're diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc index c46db2a..b02a7f3 100644 --- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc @@ -164,14 +164,14 @@ class MockAutofillBackend : public autofill::AutofillWebDataBackend { on_changed_(on_changed) { } - virtual ~MockAutofillBackend() {} - virtual WebDatabase* GetDatabase() override { return web_database_; } - virtual void AddObserver( + ~MockAutofillBackend() override {} + WebDatabase* GetDatabase() override { return web_database_; } + void AddObserver( autofill::AutofillWebDataServiceObserverOnDBThread* observer) override {} - virtual void RemoveObserver( + void RemoveObserver( autofill::AutofillWebDataServiceObserverOnDBThread* observer) override {} - virtual void RemoveExpiredFormElements() override {} - virtual void NotifyOfMultipleAutofillChanges() override { + void RemoveExpiredFormElements() override {} + void NotifyOfMultipleAutofillChanges() override { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, on_changed_); } @@ -206,11 +206,9 @@ class TokenWebDataServiceFake : public TokenWebData { BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)) { } - virtual bool IsDatabaseLoaded() override { - return true; - } + bool IsDatabaseLoaded() override { return true; } - virtual AutofillWebDataService::Handle GetAllTokens( + AutofillWebDataService::Handle GetAllTokens( WebDataServiceConsumer* consumer) override { // TODO(tim): It would be nice if WebDataService was injected on // construction of ProfileOAuth2TokenService rather than fetched by @@ -223,7 +221,7 @@ class TokenWebDataServiceFake : public TokenWebData { } private: - virtual ~TokenWebDataServiceFake() {} + ~TokenWebDataServiceFake() override {} DISALLOW_COPY_AND_ASSIGN(TokenWebDataServiceFake); }; @@ -267,13 +265,9 @@ class WebDataServiceFake : public AutofillWebDataService { syncable_service_created_or_destroyed_.Wait(); } - virtual bool IsDatabaseLoaded() override { - return true; - } + bool IsDatabaseLoaded() override { return true; } - virtual WebDatabase* GetDatabase() override { - return web_database_; - } + WebDatabase* GetDatabase() override { return web_database_; } void OnAutofillEntriesChanged(const AutofillChangeList& changes) { WaitableEvent event(true, false); @@ -304,7 +298,7 @@ class WebDataServiceFake : public AutofillWebDataService { } private: - virtual ~WebDataServiceFake() {} + ~WebDataServiceFake() override {} void CreateSyncableService(const base::Closure& on_changed_callback) { ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB)); @@ -387,17 +381,17 @@ class AbstractAutofillFactory { class AutofillEntryFactory : public AbstractAutofillFactory { public: - virtual DataTypeController* CreateDataTypeController( + DataTypeController* CreateDataTypeController( ProfileSyncComponentsFactory* factory, TestingProfile* profile, ProfileSyncService* service) override { return new AutofillDataTypeController(factory, profile); } - virtual void SetExpectation(ProfileSyncComponentsFactoryMock* factory, - ProfileSyncService* service, - AutofillWebDataService* wds, - DataTypeController* dtc) override { + void SetExpectation(ProfileSyncComponentsFactoryMock* factory, + ProfileSyncService* service, + AutofillWebDataService* wds, + DataTypeController* dtc) override { EXPECT_CALL(*factory, GetSyncableServiceForType(syncer::AUTOFILL)). WillOnce(MakeAutocompleteSyncComponents(wds)); } @@ -405,17 +399,17 @@ class AutofillEntryFactory : public AbstractAutofillFactory { class AutofillProfileFactory : public AbstractAutofillFactory { public: - virtual DataTypeController* CreateDataTypeController( + DataTypeController* CreateDataTypeController( ProfileSyncComponentsFactory* factory, TestingProfile* profile, ProfileSyncService* service) override { return new AutofillProfileDataTypeController(factory, profile); } - virtual void SetExpectation(ProfileSyncComponentsFactoryMock* factory, - ProfileSyncService* service, - AutofillWebDataService* wds, - DataTypeController* dtc) override { + void SetExpectation(ProfileSyncComponentsFactoryMock* factory, + ProfileSyncService* service, + AutofillWebDataService* wds, + DataTypeController* dtc) override { EXPECT_CALL(*factory, GetSyncableServiceForType(syncer::AUTOFILL_PROFILE)). WillOnce(MakeAutofillProfileSyncComponents(wds)); @@ -442,9 +436,8 @@ class ProfileSyncServiceAutofillTest public syncer::DataTypeDebugInfoListener { public: // DataTypeDebugInfoListener implementation. - virtual void OnDataTypeConfigureComplete( - const std::vector<syncer::DataTypeConfigurationStats>& - configuration_stats) override { + void OnDataTypeConfigureComplete(const std::vector< + syncer::DataTypeConfigurationStats>& configuration_stats) override { ASSERT_EQ(1u, configuration_stats.size()); association_stats_ = configuration_stats[0].association_stats; } @@ -780,8 +773,7 @@ class WriteTransactionTest: public WriteTransaction { : WriteTransaction(from_here, writer, directory), wait_for_syncapi_(wait_for_syncapi) { } - virtual void NotifyTransactionComplete( - syncer::ModelTypeSet types) override { + void NotifyTransactionComplete(syncer::ModelTypeSet types) override { // This is where we differ. Force a thread change here, giving another // thread a chance to create a WriteTransaction (*wait_for_syncapi_)->Wait(); diff --git a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc index ba0feda..bd7a38c 100644 --- a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc @@ -279,17 +279,16 @@ class ExtensiveChangesBookmarkModelObserver : public BaseBookmarkModelObserver { completed_count_at_started_(0), completed_count_(0) {} - virtual void ExtensiveBookmarkChangesBeginning( - BookmarkModel* model) override { + void ExtensiveBookmarkChangesBeginning(BookmarkModel* model) override { ++started_count_; completed_count_at_started_ = completed_count_; } - virtual void ExtensiveBookmarkChangesEnded(BookmarkModel* model) override { + void ExtensiveBookmarkChangesEnded(BookmarkModel* model) override { ++completed_count_; } - virtual void BookmarkModelChanged() override {} + void BookmarkModelChanged() override {} int get_started() const { return started_count_; diff --git a/chrome/browser/sync/profile_sync_service_factory.h b/chrome/browser/sync/profile_sync_service_factory.h index 7be8d94..52d9c42 100644 --- a/chrome/browser/sync/profile_sync_service_factory.h +++ b/chrome/browser/sync/profile_sync_service_factory.h @@ -23,10 +23,10 @@ class ProfileSyncServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<ProfileSyncServiceFactory>; ProfileSyncServiceFactory(); - virtual ~ProfileSyncServiceFactory(); + ~ProfileSyncServiceFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; }; diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc index 2d71096..ad44101 100644 --- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc @@ -75,9 +75,7 @@ class TestProfileSyncServiceNoBackup : public ProfileSyncService { oauth2_token_service, start_behavior) {} protected: - virtual bool NeedBackup() const override { - return false; - } + bool NeedBackup() const override { return false; } }; class ProfileSyncServiceStartupTest : public testing::Test { diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc index 1cf59eb..481f3b3 100644 --- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc @@ -176,7 +176,7 @@ class TestTypedUrlModelAssociator : public TypedUrlModelAssociator { protected: // Don't clear error stats - that way we can verify their values in our // tests. - virtual void ClearErrorStats() override {} + void ClearErrorStats() override {} }; ACTION_P2(ShutdownHistoryService, thread, service) { diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc index 5c80419..0b0c3cf 100644 --- a/chrome/browser/sync/profile_sync_service_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_unittest.cc @@ -48,21 +48,21 @@ class FakeDataTypeManager : public sync_driver::DataTypeManager { public: explicit FakeDataTypeManager(sync_driver::DataTypeManagerObserver* observer) : observer_(observer) {} - virtual ~FakeDataTypeManager() {}; + ~FakeDataTypeManager() override{}; - virtual void Configure(syncer::ModelTypeSet desired_types, - syncer::ConfigureReason reason) override { + void Configure(syncer::ModelTypeSet desired_types, + syncer::ConfigureReason reason) override { sync_driver::DataTypeManager::ConfigureResult result; result.status = sync_driver::DataTypeManager::OK; observer_->OnConfigureDone(result); } - virtual void ReenableType(syncer::ModelType type) override {} - virtual void ResetDataTypeErrors() override {} - virtual void PurgeForMigration(syncer::ModelTypeSet undesired_types, - syncer::ConfigureReason reason) override {} - virtual void Stop() override {}; - virtual State state() const override { + void ReenableType(syncer::ModelType type) override {} + void ResetDataTypeErrors() override {} + void PurgeForMigration(syncer::ModelTypeSet undesired_types, + syncer::ConfigureReason reason) override {} + void Stop() override{}; + State state() const override { return sync_driver::DataTypeManager::CONFIGURED; }; @@ -82,7 +82,7 @@ class TestProfileSyncServiceObserver : public ProfileSyncServiceObserver { public: explicit TestProfileSyncServiceObserver(ProfileSyncService* service) : service_(service), first_setup_in_progress_(false) {} - virtual void OnStateChanged() override { + void OnStateChanged() override { first_setup_in_progress_ = service_->FirstSetupInProgress(); } bool first_setup_in_progress() const { return first_setup_in_progress_; } @@ -95,7 +95,7 @@ class TestProfileSyncServiceObserver : public ProfileSyncServiceObserver { // call back when asked to initialized. Allows us to test things // that could happen while backend init is in progress. class SyncBackendHostNoReturn : public SyncBackendHostMock { - virtual void Initialize( + void Initialize( sync_driver::SyncFrontend* frontend, scoped_ptr<base::Thread> sync_thread, const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, @@ -115,7 +115,7 @@ class SyncBackendHostMockCollectDeleteDirParam : public SyncBackendHostMock { std::vector<bool>* delete_dir_param) : delete_dir_param_(delete_dir_param) {} - virtual void Initialize( + void Initialize( sync_driver::SyncFrontend* frontend, scoped_ptr<base::Thread> sync_thread, const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, diff --git a/chrome/browser/sync/sessions/notification_service_sessions_router.h b/chrome/browser/sync/sessions/notification_service_sessions_router.h index 76a020c..f1249f1 100644 --- a/chrome/browser/sync/sessions/notification_service_sessions_router.h +++ b/chrome/browser/sync/sessions/notification_service_sessions_router.h @@ -32,17 +32,17 @@ class NotificationServiceSessionsRouter NotificationServiceSessionsRouter( Profile* profile, const syncer::SyncableService::StartSyncFlare& flare); - virtual ~NotificationServiceSessionsRouter(); + ~NotificationServiceSessionsRouter() override; // content::NotificationObserver implementation. // BrowserSessionProvider -> sync API model change application. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // SessionsSyncManager::LocalEventRouter implementation. - virtual void StartRoutingTo(LocalSessionEventHandler* handler) override; - virtual void Stop() override; + void StartRoutingTo(LocalSessionEventHandler* handler) override; + void Stop() override; private: // Called when the URL visited in |web_contents| was blocked by the diff --git a/chrome/browser/sync/sessions/session_data_type_controller.h b/chrome/browser/sync/sessions/session_data_type_controller.h index b018d49..f7d92fa 100644 --- a/chrome/browser/sync/sessions/session_data_type_controller.h +++ b/chrome/browser/sync/sessions/session_data_type_controller.h @@ -29,17 +29,17 @@ class SessionDataTypeController : public sync_driver::UIDataTypeController, sync_driver::LocalDeviceInfoProvider* local_device); // NotificationObserver interface. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // UIDataTypeController interface. - virtual bool StartModels() override; - virtual void StopModels() override; - virtual bool ReadyForStart() const override; + bool StartModels() override; + void StopModels() override; + bool ReadyForStart() const override; protected: - virtual ~SessionDataTypeController(); + ~SessionDataTypeController() override; private: bool IsWaiting(); diff --git a/chrome/browser/sync/sessions/session_data_type_controller_unittest.cc b/chrome/browser/sync/sessions/session_data_type_controller_unittest.cc index 18fe26a..3671a7c 100644 --- a/chrome/browser/sync/sessions/session_data_type_controller_unittest.cc +++ b/chrome/browser/sync/sessions/session_data_type_controller_unittest.cc @@ -28,22 +28,22 @@ class MockSyncedWindowDelegate : public SyncedWindowDelegate { explicit MockSyncedWindowDelegate(Profile* profile) : is_restore_in_progress_(false), profile_(profile) {} - virtual ~MockSyncedWindowDelegate() {} - - virtual bool HasWindow() const override { return false; } - virtual SessionID::id_type GetSessionId() const override { return 0; } - virtual int GetTabCount() const override { return 0; } - virtual int GetActiveIndex() const override { return 0; } - virtual bool IsApp() const override { return false; } - virtual bool IsTypeTabbed() const override { return false; } - virtual bool IsTypePopup() const override { return false; } - virtual bool IsTabPinned(const SyncedTabDelegate* tab) const override { + ~MockSyncedWindowDelegate() override {} + + bool HasWindow() const override { return false; } + SessionID::id_type GetSessionId() const override { return 0; } + int GetTabCount() const override { return 0; } + int GetActiveIndex() const override { return 0; } + bool IsApp() const override { return false; } + bool IsTypeTabbed() const override { return false; } + bool IsTypePopup() const override { return false; } + bool IsTabPinned(const SyncedTabDelegate* tab) const override { return false; } - virtual SyncedTabDelegate* GetTabAt(int index) const override { return NULL; } - virtual SessionID::id_type GetTabIdAt(int index) const override { return 0; } + SyncedTabDelegate* GetTabAt(int index) const override { return NULL; } + SessionID::id_type GetTabIdAt(int index) const override { return 0; } - virtual bool IsSessionRestoreInProgress() const override { + bool IsSessionRestoreInProgress() const override { return is_restore_in_progress_; } @@ -65,8 +65,7 @@ class MockSyncedWindowDelegate : public SyncedWindowDelegate { class MockSyncedWindowDelegatesGetter : public SyncedWindowDelegatesGetter { public: - virtual const std::set<SyncedWindowDelegate*> - GetSyncedWindowDelegates() override { + const std::set<SyncedWindowDelegate*> GetSyncedWindowDelegates() override { return delegates_; } diff --git a/chrome/browser/sync/sessions/sessions_sync_manager.h b/chrome/browser/sync/sessions/sessions_sync_manager.h index 4f42c80..a225afc 100644 --- a/chrome/browser/sync/sessions/sessions_sync_manager.h +++ b/chrome/browser/sync/sessions/sessions_sync_manager.h @@ -89,39 +89,37 @@ class SessionsSyncManager : public syncer::SyncableService, SessionsSyncManager(Profile* profile, sync_driver::LocalDeviceInfoProvider* local_device, scoped_ptr<LocalSessionEventRouter> router); - virtual ~SessionsSyncManager(); + ~SessionsSyncManager() override; // syncer::SyncableService implementation. - virtual syncer::SyncMergeResult MergeDataAndStartSyncing( + syncer::SyncMergeResult MergeDataAndStartSyncing( syncer::ModelType type, const syncer::SyncDataList& initial_sync_data, scoped_ptr<syncer::SyncChangeProcessor> sync_processor, scoped_ptr<syncer::SyncErrorFactory> error_handler) override; - virtual void StopSyncing(syncer::ModelType type) override; - virtual syncer::SyncDataList GetAllSyncData( - syncer::ModelType type) const override; - virtual syncer::SyncError ProcessSyncChanges( + void StopSyncing(syncer::ModelType type) override; + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; + syncer::SyncError ProcessSyncChanges( const tracked_objects::Location& from_here, const syncer::SyncChangeList& change_list) override; // OpenTabsUIDelegate implementation. - virtual bool GetSyncedFaviconForPageURL( + bool GetSyncedFaviconForPageURL( const std::string& pageurl, scoped_refptr<base::RefCountedMemory>* favicon_png) const override; - virtual bool GetAllForeignSessions( + bool GetAllForeignSessions( std::vector<const SyncedSession*>* sessions) override; - virtual bool GetForeignSession( - const std::string& tag, - std::vector<const SessionWindow*>* windows) override; - virtual bool GetForeignTab(const std::string& tag, - const SessionID::id_type tab_id, - const SessionTab** tab) override; - virtual void DeleteForeignSession(const std::string& tag) override; - virtual bool GetLocalSession(const SyncedSession* * local_session) override; + bool GetForeignSession(const std::string& tag, + std::vector<const SessionWindow*>* windows) override; + bool GetForeignTab(const std::string& tag, + const SessionID::id_type tab_id, + const SessionTab** tab) override; + void DeleteForeignSession(const std::string& tag) override; + bool GetLocalSession(const SyncedSession** local_session) override; // LocalSessionEventHandler implementation. - virtual void OnLocalTabModified(SyncedTabDelegate* modified_tab) override; - virtual void OnFaviconPageUrlsUpdated( + void OnLocalTabModified(SyncedTabDelegate* modified_tab) override; + void OnFaviconPageUrlsUpdated( const std::set<GURL>& updated_favicon_page_urls) override; // Returns the tag used to uniquely identify this machine's session in the diff --git a/chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc b/chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc index 936c6bf..37fd2e8 100644 --- a/chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc +++ b/chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc @@ -50,41 +50,29 @@ class SyncedWindowDelegateOverride : public SyncedWindowDelegate { explicit SyncedWindowDelegateOverride(SyncedWindowDelegate* wrapped) : wrapped_(wrapped) { } - virtual ~SyncedWindowDelegateOverride() {} + ~SyncedWindowDelegateOverride() override {} - virtual bool HasWindow() const override { - return wrapped_->HasWindow(); - } + bool HasWindow() const override { return wrapped_->HasWindow(); } - virtual SessionID::id_type GetSessionId() const override { + SessionID::id_type GetSessionId() const override { return wrapped_->GetSessionId(); } - virtual int GetTabCount() const override { - return wrapped_->GetTabCount(); - } + int GetTabCount() const override { return wrapped_->GetTabCount(); } - virtual int GetActiveIndex() const override { - return wrapped_->GetActiveIndex(); - } + int GetActiveIndex() const override { return wrapped_->GetActiveIndex(); } - virtual bool IsApp() const override { - return wrapped_->IsApp(); - } + bool IsApp() const override { return wrapped_->IsApp(); } - virtual bool IsTypeTabbed() const override { - return wrapped_->IsTypeTabbed(); - } + bool IsTypeTabbed() const override { return wrapped_->IsTypeTabbed(); } - virtual bool IsTypePopup() const override { - return wrapped_->IsTypePopup(); - } + bool IsTypePopup() const override { return wrapped_->IsTypePopup(); } - virtual bool IsTabPinned(const SyncedTabDelegate* tab) const override { + bool IsTabPinned(const SyncedTabDelegate* tab) const override { return wrapped_->IsTabPinned(tab); } - virtual SyncedTabDelegate* GetTabAt(int index) const override { + SyncedTabDelegate* GetTabAt(int index) const override { if (tab_overrides_.find(index) != tab_overrides_.end()) return tab_overrides_.find(index)->second; @@ -98,13 +86,13 @@ class SyncedWindowDelegateOverride : public SyncedWindowDelegate { tab_id_overrides_[index] = tab_id; } - virtual SessionID::id_type GetTabIdAt(int index) const override { + SessionID::id_type GetTabIdAt(int index) const override { if (tab_id_overrides_.find(index) != tab_id_overrides_.end()) return tab_id_overrides_.find(index)->second; return wrapped_->GetTabIdAt(index); } - virtual bool IsSessionRestoreInProgress() const override { + bool IsSessionRestoreInProgress() const override { return wrapped_->IsSessionRestoreInProgress(); } @@ -120,8 +108,7 @@ class TestSyncedWindowDelegatesGetter : public SyncedWindowDelegatesGetter { const std::set<SyncedWindowDelegate*>& delegates) : delegates_(delegates) {} - virtual const std::set<SyncedWindowDelegate*> GetSyncedWindowDelegates() - override { + const std::set<SyncedWindowDelegate*> GetSyncedWindowDelegates() override { return delegates_; } private: @@ -132,7 +119,7 @@ class TestSyncProcessorStub : public syncer::SyncChangeProcessor { public: explicit TestSyncProcessorStub(syncer::SyncChangeList* output) : output_(output) {} - virtual syncer::SyncError ProcessSyncChanges( + syncer::SyncError ProcessSyncChanges( const tracked_objects::Location& from_here, const syncer::SyncChangeList& change_list) override { if (error_.IsSet()) { @@ -147,8 +134,7 @@ class TestSyncProcessorStub : public syncer::SyncChangeProcessor { return syncer::SyncError(); } - virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) - const override { + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override { return sync_data_to_return_; } @@ -220,9 +206,9 @@ void AddTabsToSyncDataList(const std::vector<sync_pb::SessionSpecifics> tabs, class DummyRouter : public LocalSessionEventRouter { public: - virtual ~DummyRouter() {} - virtual void StartRoutingTo(LocalSessionEventHandler* handler) override {} - virtual void Stop() override {} + ~DummyRouter() override {} + void StartRoutingTo(LocalSessionEventHandler* handler) override {} + void Stop() override {} }; scoped_ptr<LocalSessionEventRouter> NewDummyRouter() { @@ -364,16 +350,14 @@ class SyncedTabDelegateFake : public SyncedTabDelegate { is_supervised_(false), sync_id_(-1), blocked_navigations_(NULL) {} - virtual ~SyncedTabDelegateFake() {} + ~SyncedTabDelegateFake() override {} - virtual int GetCurrentEntryIndex() const override { - return current_entry_index_; - } + int GetCurrentEntryIndex() const override { return current_entry_index_; } void set_current_entry_index(int i) { current_entry_index_ = i; } - virtual content::NavigationEntry* GetEntryAtIndex(int i) const override { + content::NavigationEntry* GetEntryAtIndex(int i) const override { const int size = entries_.size(); return (size < i + 1) ? NULL : entries_[i]; } @@ -382,65 +366,43 @@ class SyncedTabDelegateFake : public SyncedTabDelegate { entries_.push_back(entry); } - virtual int GetEntryCount() const override { - return entries_.size(); - } + int GetEntryCount() const override { return entries_.size(); } - virtual int GetPendingEntryIndex() const override { - return pending_entry_index_; - } + int GetPendingEntryIndex() const override { return pending_entry_index_; } void set_pending_entry_index(int i) { pending_entry_index_ = i; } - virtual SessionID::id_type GetWindowId() const override { + SessionID::id_type GetWindowId() const override { return SessionID::id_type(); } - virtual SessionID::id_type GetSessionId() const override { + SessionID::id_type GetSessionId() const override { return SessionID::id_type(); } - virtual bool IsBeingDestroyed() const override { return false; } - virtual Profile* profile() const override { return NULL; } - virtual std::string GetExtensionAppId() const override { - return std::string(); - } - virtual content::NavigationEntry* GetPendingEntry() const override { - return NULL; - } - virtual content::NavigationEntry* GetActiveEntry() const override { - return NULL; - } - virtual bool ProfileIsSupervised() const override { - return is_supervised_; - } + bool IsBeingDestroyed() const override { return false; } + Profile* profile() const override { return NULL; } + std::string GetExtensionAppId() const override { return std::string(); } + content::NavigationEntry* GetPendingEntry() const override { return NULL; } + content::NavigationEntry* GetActiveEntry() const override { return NULL; } + bool ProfileIsSupervised() const override { return is_supervised_; } void set_is_supervised(bool is_supervised) { is_supervised_ = is_supervised; } - virtual const std::vector<const content::NavigationEntry*>* - GetBlockedNavigations() const override { + const std::vector<const content::NavigationEntry*>* GetBlockedNavigations() + const override { return blocked_navigations_; } void set_blocked_navigations( std::vector<const content::NavigationEntry*>* navs) { blocked_navigations_ = navs; } - virtual bool IsPinned() const override { - return false; - } - virtual bool HasWebContents() const override { - return false; - } - virtual content::WebContents* GetWebContents() const override { - return NULL; - } + bool IsPinned() const override { return false; } + bool HasWebContents() const override { return false; } + content::WebContents* GetWebContents() const override { return NULL; } // Session sync related methods. - virtual int GetSyncId() const override { - return sync_id_; - } - virtual void SetSyncId(int sync_id) override { - sync_id_ = sync_id; - } + int GetSyncId() const override { return sync_id_; } + void SetSyncId(int sync_id) override { sync_id_ = sync_id; } void reset() { current_entry_index_ = 0; @@ -1838,9 +1800,9 @@ class SessionNotificationObserver : public content::NotificationObserver { registrar_.Add(this, chrome::NOTIFICATION_SYNC_REFRESH_LOCAL, content::NotificationService::AllSources()); } - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { switch (type) { case chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED: notified_of_update_ = true; diff --git a/chrome/browser/sync/startup_controller_unittest.cc b/chrome/browser/sync/startup_controller_unittest.cc index df775bb..0305592 100644 --- a/chrome/browser/sync/startup_controller_unittest.cc +++ b/chrome/browser/sync/startup_controller_unittest.cc @@ -36,13 +36,9 @@ class FakeSupervisedUserSigninManagerWrapper public: FakeSupervisedUserSigninManagerWrapper() : SupervisedUserSigninManagerWrapper(NULL, NULL) {} - virtual std::string GetEffectiveUsername() const override { - return account_; - } + std::string GetEffectiveUsername() const override { return account_; } - virtual std::string GetAccountIdToUse() const override { - return account_; - } + std::string GetAccountIdToUse() const override { return account_; } void set_account(const std::string& account) { account_ = account; } diff --git a/chrome/browser/sync/sync_error_controller.h b/chrome/browser/sync/sync_error_controller.h index 8784c3a..e8cd730 100644 --- a/chrome/browser/sync/sync_error_controller.h +++ b/chrome/browser/sync/sync_error_controller.h @@ -25,7 +25,7 @@ class SyncErrorController : public ProfileSyncServiceObserver { }; explicit SyncErrorController(ProfileSyncService* service); - virtual ~SyncErrorController(); + ~SyncErrorController() override; // True if there exists an error worth elevating to the user. bool HasError(); @@ -34,7 +34,7 @@ class SyncErrorController : public ProfileSyncServiceObserver { void RemoveObserver(Observer* observer); // ProfileSyncServiceObserver: - virtual void OnStateChanged() override; + void OnStateChanged() override; private: ProfileSyncService* service_; diff --git a/chrome/browser/sync/sync_global_error.h b/chrome/browser/sync/sync_global_error.h index b7c0df1..23ac752 100644 --- a/chrome/browser/sync/sync_global_error.h +++ b/chrome/browser/sync/sync_global_error.h @@ -20,27 +20,27 @@ class SyncGlobalError : public GlobalErrorWithStandardBubble, public: SyncGlobalError(SyncErrorController* error_controller, ProfileSyncService* profile_sync_service); - virtual ~SyncGlobalError(); + ~SyncGlobalError() override; // KeyedService: - virtual void Shutdown() override; + void Shutdown() override; // GlobalErrorWithStandardBubble: - virtual bool HasMenuItem() override; - virtual int MenuItemCommandID() override; - virtual base::string16 MenuItemLabel() override; - virtual void ExecuteMenuItem(Browser* browser) override; - virtual bool HasBubbleView() override; - virtual base::string16 GetBubbleViewTitle() override; - virtual std::vector<base::string16> GetBubbleViewMessages() override; - virtual base::string16 GetBubbleViewAcceptButtonLabel() override; - virtual base::string16 GetBubbleViewCancelButtonLabel() override; - virtual void OnBubbleViewDidClose(Browser* browser) override; - virtual void BubbleViewAcceptButtonPressed(Browser* browser) override; - virtual void BubbleViewCancelButtonPressed(Browser* browser) override; + bool HasMenuItem() override; + int MenuItemCommandID() override; + base::string16 MenuItemLabel() override; + void ExecuteMenuItem(Browser* browser) override; + bool HasBubbleView() override; + base::string16 GetBubbleViewTitle() override; + std::vector<base::string16> GetBubbleViewMessages() override; + base::string16 GetBubbleViewAcceptButtonLabel() override; + base::string16 GetBubbleViewCancelButtonLabel() override; + void OnBubbleViewDidClose(Browser* browser) override; + void BubbleViewAcceptButtonPressed(Browser* browser) override; + void BubbleViewCancelButtonPressed(Browser* browser) override; // SyncErrorController::Observer: - virtual void OnErrorChanged() override; + void OnErrorChanged() override; private: base::string16 bubble_accept_label_; diff --git a/chrome/browser/sync/sync_global_error_factory.h b/chrome/browser/sync/sync_global_error_factory.h index 03f05cc..93a185d 100644 --- a/chrome/browser/sync/sync_global_error_factory.h +++ b/chrome/browser/sync/sync_global_error_factory.h @@ -27,10 +27,10 @@ class SyncGlobalErrorFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<SyncGlobalErrorFactory>; SyncGlobalErrorFactory(); - virtual ~SyncGlobalErrorFactory(); + ~SyncGlobalErrorFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; DISALLOW_COPY_AND_ASSIGN(SyncGlobalErrorFactory); diff --git a/chrome/browser/sync/sync_global_error_unittest.cc b/chrome/browser/sync/sync_global_error_unittest.cc index f3ca5f3..7896c57 100644 --- a/chrome/browser/sync/sync_global_error_unittest.cc +++ b/chrome/browser/sync/sync_global_error_unittest.cc @@ -35,16 +35,14 @@ class FakeLoginUI : public LoginUIService::LoginUI { public: FakeLoginUI() : focus_ui_call_count_(0) {} - virtual ~FakeLoginUI() {} + ~FakeLoginUI() override {} int focus_ui_call_count() const { return focus_ui_call_count_; } private: // Overridden from LoginUIService::LoginUI: - virtual void FocusUI() override { - ++focus_ui_call_count_; - } - virtual void CloseUI() override {} + void FocusUI() override { ++focus_ui_call_count_; } + void CloseUI() override {} int focus_ui_call_count_; }; diff --git a/chrome/browser/sync/sync_policy_handler.h b/chrome/browser/sync/sync_policy_handler.h index 4950418..0642614 100644 --- a/chrome/browser/sync/sync_policy_handler.h +++ b/chrome/browser/sync/sync_policy_handler.h @@ -18,11 +18,11 @@ class PolicyMap; class SyncPolicyHandler : public policy::TypeCheckingPolicyHandler { public: SyncPolicyHandler(); - virtual ~SyncPolicyHandler(); + ~SyncPolicyHandler() override; // ConfigurationPolicyHandler methods: - virtual void ApplyPolicySettings(const policy::PolicyMap& policies, - PrefValueMap* prefs) override; + void ApplyPolicySettings(const policy::PolicyMap& policies, + PrefValueMap* prefs) override; private: DISALLOW_COPY_AND_ASSIGN(SyncPolicyHandler); diff --git a/chrome/browser/sync/sync_startup_tracker.h b/chrome/browser/sync/sync_startup_tracker.h index acffd29..acac4a0 100644 --- a/chrome/browser/sync/sync_startup_tracker.h +++ b/chrome/browser/sync/sync_startup_tracker.h @@ -29,7 +29,7 @@ class SyncStartupTracker : public ProfileSyncServiceObserver { }; SyncStartupTracker(Profile* profile, Observer* observer); - virtual ~SyncStartupTracker(); + ~SyncStartupTracker() override; enum SyncServiceState { // Sync backend is still starting up. @@ -46,7 +46,7 @@ class SyncStartupTracker : public ProfileSyncServiceObserver { static SyncServiceState GetSyncServiceState(Profile* profile); // ProfileSyncServiceObserver implementation. - virtual void OnStateChanged() override; + void OnStateChanged() override; private: // Checks the current service state and notifies |observer_| if the state diff --git a/chrome/browser/sync/sync_ui_util_unittest.cc b/chrome/browser/sync/sync_ui_util_unittest.cc index ff45e63..212e7be 100644 --- a/chrome/browser/sync/sync_ui_util_unittest.cc +++ b/chrome/browser/sync/sync_ui_util_unittest.cc @@ -181,12 +181,9 @@ class FakeSigninManagerForSyncUIUtilTest : public FakeSigninManagerBase { Initialize(NULL); } - virtual ~FakeSigninManagerForSyncUIUtilTest() { - } + ~FakeSigninManagerForSyncUIUtilTest() override {} - virtual bool AuthInProgress() const override { - return auth_in_progress_; - } + bool AuthInProgress() const override { return auth_in_progress_; } void set_auth_in_progress() { auth_in_progress_ = true; diff --git a/chrome/browser/sync/test/integration/apps_helper.cc b/chrome/browser/sync/test/integration/apps_helper.cc index 0c00dda..30634fb 100644 --- a/chrome/browser/sync/test/integration/apps_helper.cc +++ b/chrome/browser/sync/test/integration/apps_helper.cc @@ -146,46 +146,42 @@ class AppsMatchChecker : public StatusChangeChecker, public content::NotificationObserver { public: explicit AppsMatchChecker(const std::vector<Profile*>& profiles); - virtual ~AppsMatchChecker(); + ~AppsMatchChecker() override; // StatusChangeChecker implementation. - virtual std::string GetDebugMessage() const override; - virtual bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; // extensions::ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded( - content::BrowserContext* context, - const extensions::Extension* extension) override; - virtual void OnExtensionUnloaded( + void OnExtensionLoaded(content::BrowserContext* context, + const extensions::Extension* extension) override; + void OnExtensionUnloaded( content::BrowserContext* context, const extensions::Extension* extenion, extensions::UnloadedExtensionInfo::Reason reason) override; - virtual void OnExtensionInstalled(content::BrowserContext* browser_context, - const extensions::Extension* extension, - bool is_update) override; - virtual void OnExtensionUninstalled( - content::BrowserContext* browser_context, - const extensions::Extension* extension, - extensions::UninstallReason reason) override; + void OnExtensionInstalled(content::BrowserContext* browser_context, + const extensions::Extension* extension, + bool is_update) override; + void OnExtensionUninstalled(content::BrowserContext* browser_context, + const extensions::Extension* extension, + extensions::UninstallReason reason) override; // extensions::ExtensionPrefsObserver implementation. - virtual void OnExtensionDisableReasonsChanged(const std::string& extension_id, - int disabled_reasons) override; - virtual void OnExtensionRegistered(const std::string& extension_id, - const base::Time& install_time, - bool is_enabled) override; - virtual void OnExtensionPrefsLoaded( - const std::string& extension_id, - const extensions::ExtensionPrefs* prefs) override; - virtual void OnExtensionPrefsDeleted( - const std::string& extension_id) override; - virtual void OnExtensionStateChanged(const std::string& extension_id, - bool state) override; + void OnExtensionDisableReasonsChanged(const std::string& extension_id, + int disabled_reasons) override; + void OnExtensionRegistered(const std::string& extension_id, + const base::Time& install_time, + bool is_enabled) override; + void OnExtensionPrefsLoaded(const std::string& extension_id, + const extensions::ExtensionPrefs* prefs) override; + void OnExtensionPrefsDeleted(const std::string& extension_id) override; + void OnExtensionStateChanged(const std::string& extension_id, + bool state) override; // Implementation of content::NotificationObserver. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; void Wait(); diff --git a/chrome/browser/sync/test/integration/autofill_helper.cc b/chrome/browser/sync/test/integration/autofill_helper.cc index 03e0720..7ca66e9 100644 --- a/chrome/browser/sync/test/integration/autofill_helper.cc +++ b/chrome/browser/sync/test/integration/autofill_helper.cc @@ -242,10 +242,10 @@ namespace { class KeysMatchStatusChecker : public MultiClientStatusChangeChecker { public: KeysMatchStatusChecker(int profile_a, int profile_b); - virtual ~KeysMatchStatusChecker(); + ~KeysMatchStatusChecker() override; - virtual bool IsExitConditionSatisfied() override; - virtual std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; private: const int profile_a_; @@ -419,14 +419,14 @@ class ProfilesMatchStatusChecker : public StatusChangeChecker, public PersonalDataManagerObserver { public: ProfilesMatchStatusChecker(int profile_a, int profile_b); - virtual ~ProfilesMatchStatusChecker(); + ~ProfilesMatchStatusChecker() override; // StatusChangeChecker implementation. - virtual bool IsExitConditionSatisfied() override; - virtual std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; // PersonalDataManager implementation. - virtual void OnPersonalDataChanged() override; + void OnPersonalDataChanged() override; // Wait for conidtion to beome true. void Wait(); diff --git a/chrome/browser/sync/test/integration/bookmarks_helper.cc b/chrome/browser/sync/test/integration/bookmarks_helper.cc index 780040c..1874a49 100644 --- a/chrome/browser/sync/test/integration/bookmarks_helper.cc +++ b/chrome/browser/sync/test/integration/bookmarks_helper.cc @@ -49,17 +49,17 @@ class HistoryEmptyTask : public history::HistoryDBTask { public: explicit HistoryEmptyTask(base::WaitableEvent* done) : done_(done) {} - virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) override { + bool RunOnDBThread(history::HistoryBackend* backend, + history::HistoryDatabase* db) override { content::RunAllPendingInMessageLoop(); done_->Signal(); return true; } - virtual void DoneRunOnMainThread() override {} + void DoneRunOnMainThread() override {} private: - virtual ~HistoryEmptyTask() {} + ~HistoryEmptyTask() override {} base::WaitableEvent* done_; }; @@ -74,9 +74,7 @@ class FaviconChangeObserver : public BookmarkModelObserver { wait_for_load_(false) { model->AddObserver(this); } - virtual ~FaviconChangeObserver() { - model_->RemoveObserver(this); - } + ~FaviconChangeObserver() override { model_->RemoveObserver(this); } void WaitForGetFavicon() { wait_for_load_ = true; content::RunMessageLoop(); @@ -87,37 +85,34 @@ class FaviconChangeObserver : public BookmarkModelObserver { wait_for_load_ = false; content::RunMessageLoop(); } - virtual void BookmarkModelLoaded(BookmarkModel* model, - bool ids_reassigned) override {} - virtual void BookmarkNodeMoved(BookmarkModel* model, - const BookmarkNode* old_parent, - int old_index, - const BookmarkNode* new_parent, - int new_index) override {} - virtual void BookmarkNodeAdded(BookmarkModel* model, - const BookmarkNode* parent, - int index) override {} - virtual void BookmarkNodeRemoved( - BookmarkModel* model, - const BookmarkNode* parent, - int old_index, - const BookmarkNode* node, - const std::set<GURL>& removed_urls) override {} - virtual void BookmarkAllUserNodesRemoved( + void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override { + } + void BookmarkNodeMoved(BookmarkModel* model, + const BookmarkNode* old_parent, + int old_index, + const BookmarkNode* new_parent, + int new_index) override {} + void BookmarkNodeAdded(BookmarkModel* model, + const BookmarkNode* parent, + int index) override {} + void BookmarkNodeRemoved(BookmarkModel* model, + const BookmarkNode* parent, + int old_index, + const BookmarkNode* node, + const std::set<GURL>& removed_urls) override {} + void BookmarkAllUserNodesRemoved( BookmarkModel* model, const std::set<GURL>& removed_urls) override {} - virtual void BookmarkNodeChanged(BookmarkModel* model, - const BookmarkNode* node) override { + void BookmarkNodeChanged(BookmarkModel* model, + const BookmarkNode* node) override { if (model == model_ && node == node_) model->GetFavicon(node); } - virtual void BookmarkNodeChildrenReordered( - BookmarkModel* model, - const BookmarkNode* node) override {} - virtual void BookmarkNodeFaviconChanged( - BookmarkModel* model, - const BookmarkNode* node) override { + void BookmarkNodeChildrenReordered(BookmarkModel* model, + const BookmarkNode* node) override {} + void BookmarkNodeFaviconChanged(BookmarkModel* model, + const BookmarkNode* node) override { if (model == model_ && node == node_) { if (!wait_for_load_ || (wait_for_load_ && node->is_favicon_loaded())) base::MessageLoopForUI::current()->Quit(); @@ -709,10 +704,10 @@ namespace { class AllModelsMatchChecker : public MultiClientStatusChangeChecker { public: AllModelsMatchChecker(); - virtual ~AllModelsMatchChecker(); + ~AllModelsMatchChecker() override; - virtual bool IsExitConditionSatisfied() override; - virtual std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; }; AllModelsMatchChecker::AllModelsMatchChecker() diff --git a/chrome/browser/sync/test/integration/enable_disable_test.cc b/chrome/browser/sync/test/integration/enable_disable_test.cc index 00e79ee..ed9a364 100644 --- a/chrome/browser/sync/test/integration/enable_disable_test.cc +++ b/chrome/browser/sync/test/integration/enable_disable_test.cc @@ -20,7 +20,8 @@ class EnableDisableSingleClientTest : public SyncTest { virtual ~EnableDisableSingleClientTest() {} // Don't use self-notifications as they can trigger additional sync cycles. - virtual bool TestUsesSelfNotifications() override { return false; } + bool TestUsesSelfNotifications() override { return false; } + private: DISALLOW_COPY_AND_ASSIGN(EnableDisableSingleClientTest); }; diff --git a/chrome/browser/sync/test/integration/extensions_helper.cc b/chrome/browser/sync/test/integration/extensions_helper.cc index 90b33d2..a9663790 100644 --- a/chrome/browser/sync/test/integration/extensions_helper.cc +++ b/chrome/browser/sync/test/integration/extensions_helper.cc @@ -141,28 +141,25 @@ class ExtensionsMatchChecker : public StatusChangeChecker, public extensions::ExtensionRegistryObserver { public: explicit ExtensionsMatchChecker(const std::vector<Profile*>& profiles); - virtual ~ExtensionsMatchChecker(); + ~ExtensionsMatchChecker() override; // StatusChangeChecker implementation. - virtual std::string GetDebugMessage() const override; - virtual bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; // extensions::ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded( - content::BrowserContext* context, - const extensions::Extension* extension) override; - virtual void OnExtensionUnloaded( + void OnExtensionLoaded(content::BrowserContext* context, + const extensions::Extension* extension) override; + void OnExtensionUnloaded( content::BrowserContext* context, const extensions::Extension* extenion, extensions::UnloadedExtensionInfo::Reason reason) override; - virtual void OnExtensionInstalled( - content::BrowserContext* browser_context, - const extensions::Extension* extension, - bool is_update) override; - virtual void OnExtensionUninstalled( - content::BrowserContext* browser_context, - const extensions::Extension* extension, - extensions::UninstallReason reason) override; + void OnExtensionInstalled(content::BrowserContext* browser_context, + const extensions::Extension* extension, + bool is_update) override; + void OnExtensionUninstalled(content::BrowserContext* browser_context, + const extensions::Extension* extension, + extensions::UninstallReason reason) override; void Wait(); diff --git a/chrome/browser/sync/test/integration/fake_server_invalidation_service.h b/chrome/browser/sync/test/integration/fake_server_invalidation_service.h index 25b1d31..ebd344f 100644 --- a/chrome/browser/sync/test/integration/fake_server_invalidation_service.h +++ b/chrome/browser/sync/test/integration/fake_server_invalidation_service.h @@ -27,22 +27,21 @@ class FakeServerInvalidationService : public invalidation::InvalidationService, public FakeServer::Observer { public: FakeServerInvalidationService(); - virtual ~FakeServerInvalidationService(); + ~FakeServerInvalidationService() override; - virtual void RegisterInvalidationHandler( + void RegisterInvalidationHandler( syncer::InvalidationHandler* handler) override; - virtual void UpdateRegisteredInvalidationIds( - syncer::InvalidationHandler* handler, - const syncer::ObjectIdSet& ids) override; - virtual void UnregisterInvalidationHandler( + void UpdateRegisteredInvalidationIds(syncer::InvalidationHandler* handler, + const syncer::ObjectIdSet& ids) override; + void UnregisterInvalidationHandler( syncer::InvalidationHandler* handler) override; - virtual syncer::InvalidatorState GetInvalidatorState() const override; - virtual std::string GetInvalidatorClientId() const override; - virtual invalidation::InvalidationLogger* GetInvalidationLogger() override; - virtual void RequestDetailedStatus( + syncer::InvalidatorState GetInvalidatorState() const override; + std::string GetInvalidatorClientId() const override; + invalidation::InvalidationLogger* GetInvalidationLogger() override; + void RequestDetailedStatus( base::Callback<void(const base::DictionaryValue&)> caller) const override; - virtual IdentityProvider* GetIdentityProvider() override; + IdentityProvider* GetIdentityProvider() override; // Functions to enable or disable sending of self-notifications. In the real // world, clients do not receive notifications of their own commits. @@ -50,9 +49,8 @@ class FakeServerInvalidationService : public invalidation::InvalidationService, void DisableSelfNotifications(); // FakeServer::Observer: - virtual void OnCommit( - const std::string& committer_id, - syncer::ModelTypeSet committed_model_types) override; + void OnCommit(const std::string& committer_id, + syncer::ModelTypeSet committed_model_types) override; private: std::string client_id_; diff --git a/chrome/browser/sync/test/integration/migration_test.cc b/chrome/browser/sync/test/integration/migration_test.cc index 276a29c..ef2ac1e 100644 --- a/chrome/browser/sync/test/integration/migration_test.cc +++ b/chrome/browser/sync/test/integration/migration_test.cc @@ -77,7 +77,7 @@ class MigrationTest : public SyncTest { // Set up sync for all profiles and initialize all MigrationWatchers. This // helps ensure that all migration events are captured, even if they were to // occur before a test calls AwaitMigration for a specific profile. - virtual bool SetupSync() override { + bool SetupSync() override { if (!SyncTest::SetupSync()) return false; @@ -421,7 +421,7 @@ class MigrationReconfigureTest : public MigrationTwoClientTest { public: MigrationReconfigureTest() {} - virtual void SetUpCommandLine(base::CommandLine* cl) override { + void SetUpCommandLine(base::CommandLine* cl) override { AddTestSwitches(cl); // Do not add optional datatypes. } diff --git a/chrome/browser/sync/test/integration/migration_waiter.h b/chrome/browser/sync/test/integration/migration_waiter.h index 836f7be..5261d8e 100644 --- a/chrome/browser/sync/test/integration/migration_waiter.h +++ b/chrome/browser/sync/test/integration/migration_waiter.h @@ -22,11 +22,11 @@ class MigrationWaiter : public StatusChangeChecker { MigrationWaiter(syncer::ModelTypeSet expected_types, MigrationWatcher* watcher); - virtual ~MigrationWaiter(); + ~MigrationWaiter() override; // Implementation of StatusChangeChecker. - virtual bool IsExitConditionSatisfied() override; - virtual std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; // Function to trigger the waiting. void Wait(); diff --git a/chrome/browser/sync/test/integration/migration_watcher.h b/chrome/browser/sync/test/integration/migration_watcher.h index 00f42ca..31458b2 100644 --- a/chrome/browser/sync/test/integration/migration_watcher.h +++ b/chrome/browser/sync/test/integration/migration_watcher.h @@ -16,7 +16,7 @@ class MigrationWaiter; class MigrationWatcher : public browser_sync::MigrationObserver { public: explicit MigrationWatcher(ProfileSyncServiceHarness* harness); - virtual ~MigrationWatcher(); + ~MigrationWatcher() override; // Returns true if the observed profile has a migration in progress. bool HasPendingBackendMigration() const; @@ -25,7 +25,7 @@ class MigrationWatcher : public browser_sync::MigrationObserver { syncer::ModelTypeSet GetMigratedTypes() const; // Implementation of browser_sync::MigrationObserver. - virtual void OnMigrationStateChange() override; + void OnMigrationStateChange() override; // Registers the |waiter| to receive callbacks on migration state change. void set_migration_waiter(MigrationWaiter* waiter); diff --git a/chrome/browser/sync/test/integration/multi_client_status_change_checker.h b/chrome/browser/sync/test/integration/multi_client_status_change_checker.h index c6efdcf..f167933 100644 --- a/chrome/browser/sync/test/integration/multi_client_status_change_checker.h +++ b/chrome/browser/sync/test/integration/multi_client_status_change_checker.h @@ -23,7 +23,7 @@ class MultiClientStatusChangeChecker public: explicit MultiClientStatusChangeChecker( std::vector<ProfileSyncService*> services); - virtual ~MultiClientStatusChangeChecker(); + ~MultiClientStatusChangeChecker() override; // Called when waiting times out. void OnTimeout(); @@ -32,7 +32,7 @@ class MultiClientStatusChangeChecker void Wait(); // ProfileSyncServiceObserver implementation. - virtual void OnStateChanged() override; + void OnStateChanged() override; // StatusChangeChecker implementations and stubs. virtual bool IsExitConditionSatisfied() = 0; diff --git a/chrome/browser/sync/test/integration/multiple_client_bookmarks_sync_test.cc b/chrome/browser/sync/test/integration/multiple_client_bookmarks_sync_test.cc index 0275c57..34f77672 100644 --- a/chrome/browser/sync/test/integration/multiple_client_bookmarks_sync_test.cc +++ b/chrome/browser/sync/test/integration/multiple_client_bookmarks_sync_test.cc @@ -15,9 +15,7 @@ class MultipleClientBookmarksSyncTest : public SyncTest { MultipleClientBookmarksSyncTest() : SyncTest(MULTIPLE_CLIENT) {} virtual ~MultipleClientBookmarksSyncTest() {} - virtual bool TestUsesSelfNotifications() override { - return false; - } + bool TestUsesSelfNotifications() override { return false; } private: DISALLOW_COPY_AND_ASSIGN(MultipleClientBookmarksSyncTest); diff --git a/chrome/browser/sync/test/integration/multiple_client_passwords_sync_test.cc b/chrome/browser/sync/test/integration/multiple_client_passwords_sync_test.cc index 8b95a87..fe12e9b 100644 --- a/chrome/browser/sync/test/integration/multiple_client_passwords_sync_test.cc +++ b/chrome/browser/sync/test/integration/multiple_client_passwords_sync_test.cc @@ -35,9 +35,7 @@ class MultipleClientPasswordsSyncTest : public SyncTest { MultipleClientPasswordsSyncTest() : SyncTest(MULTIPLE_CLIENT) {} virtual ~MultipleClientPasswordsSyncTest() {} - virtual bool TestUsesSelfNotifications() override { - return false; - } + bool TestUsesSelfNotifications() override { return false; } private: DISALLOW_COPY_AND_ASSIGN(MultipleClientPasswordsSyncTest); diff --git a/chrome/browser/sync/test/integration/multiple_client_preferences_sync_test.cc b/chrome/browser/sync/test/integration/multiple_client_preferences_sync_test.cc index 7f2b0f1..74ebe3a 100644 --- a/chrome/browser/sync/test/integration/multiple_client_preferences_sync_test.cc +++ b/chrome/browser/sync/test/integration/multiple_client_preferences_sync_test.cc @@ -16,9 +16,7 @@ class MultipleClientPreferencesSyncTest : public SyncTest { MultipleClientPreferencesSyncTest() : SyncTest(MULTIPLE_CLIENT) {} virtual ~MultipleClientPreferencesSyncTest() {} - virtual bool TestUsesSelfNotifications() override { - return false; - } + bool TestUsesSelfNotifications() override { return false; } private: DISALLOW_COPY_AND_ASSIGN(MultipleClientPreferencesSyncTest); diff --git a/chrome/browser/sync/test/integration/multiple_client_typed_urls_sync_test.cc b/chrome/browser/sync/test/integration/multiple_client_typed_urls_sync_test.cc index 0a5c6cd..fff823a 100644 --- a/chrome/browser/sync/test/integration/multiple_client_typed_urls_sync_test.cc +++ b/chrome/browser/sync/test/integration/multiple_client_typed_urls_sync_test.cc @@ -20,9 +20,7 @@ class MultipleClientTypedUrlsSyncTest : public SyncTest { MultipleClientTypedUrlsSyncTest() : SyncTest(MULTIPLE_CLIENT) {} virtual ~MultipleClientTypedUrlsSyncTest() {} - virtual bool TestUsesSelfNotifications() override { - return false; - } + bool TestUsesSelfNotifications() override { return false; } private: DISALLOW_COPY_AND_ASSIGN(MultipleClientTypedUrlsSyncTest); diff --git a/chrome/browser/sync/test/integration/p2p_invalidation_forwarder.h b/chrome/browser/sync/test/integration/p2p_invalidation_forwarder.h index f447de9..be10c92 100644 --- a/chrome/browser/sync/test/integration/p2p_invalidation_forwarder.h +++ b/chrome/browser/sync/test/integration/p2p_invalidation_forwarder.h @@ -27,11 +27,11 @@ class P2PInvalidationForwarder : public ProfileSyncServiceObserver { P2PInvalidationForwarder( ProfileSyncService* sync_service, invalidation::P2PInvalidationService* invalidation_service); - virtual ~P2PInvalidationForwarder(); + ~P2PInvalidationForwarder() override; // Implementation of ProfileSyncServiceObserver - virtual void OnStateChanged() override; - virtual void OnSyncCycleCompleted() override; + void OnStateChanged() override; + void OnSyncCycleCompleted() override; private: ProfileSyncService* sync_service_; diff --git a/chrome/browser/sync/test/integration/passwords_helper.cc b/chrome/browser/sync/test/integration/passwords_helper.cc index c92ab67..331bc00 100644 --- a/chrome/browser/sync/test/integration/passwords_helper.cc +++ b/chrome/browser/sync/test/integration/passwords_helper.cc @@ -44,7 +44,7 @@ class PasswordStoreConsumerHelper explicit PasswordStoreConsumerHelper(std::vector<PasswordForm>* result) : password_manager::PasswordStoreConsumer(), result_(result) {} - virtual void OnGetPasswordStoreResults( + void OnGetPasswordStoreResults( const std::vector<PasswordForm*>& result) override { result_->clear(); for (std::vector<PasswordForm*>::const_iterator it = result.begin(); @@ -217,10 +217,10 @@ namespace { class SamePasswordFormsChecker : public MultiClientStatusChangeChecker { public: SamePasswordFormsChecker(); - virtual ~SamePasswordFormsChecker(); + ~SamePasswordFormsChecker() override; - virtual bool IsExitConditionSatisfied() override; - virtual std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; private: bool in_progress_; @@ -287,10 +287,10 @@ class SamePasswordFormsAsVerifierChecker : public SingleClientStatusChangeChecker { public: explicit SamePasswordFormsAsVerifierChecker(int index); - virtual ~SamePasswordFormsAsVerifierChecker(); + ~SamePasswordFormsAsVerifierChecker() override; - virtual bool IsExitConditionSatisfied() override; - virtual std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; private: int index_; diff --git a/chrome/browser/sync/test/integration/preferences_helper.cc b/chrome/browser/sync/test/integration/preferences_helper.cc index e1afc6b..1f1fd06 100644 --- a/chrome/browser/sync/test/integration/preferences_helper.cc +++ b/chrome/browser/sync/test/integration/preferences_helper.cc @@ -216,11 +216,11 @@ namespace { class PrefMatchChecker : public StatusChangeChecker { public: explicit PrefMatchChecker(const char* path); - virtual ~PrefMatchChecker(); + ~PrefMatchChecker() override; // StatusChangeChecker implementation. virtual bool IsExitConditionSatisfied() = 0; - virtual std::string GetDebugMessage() const override; + std::string GetDebugMessage() const override; // Wait for condition to become true. void Wait(); @@ -278,10 +278,10 @@ void PrefMatchChecker::RegisterPrefListener(PrefService* pref_service) { class ListPrefMatchChecker : public PrefMatchChecker { public: explicit ListPrefMatchChecker(const char* path); - virtual ~ListPrefMatchChecker(); + ~ListPrefMatchChecker() override; // Implementation of PrefMatchChecker. - virtual bool IsExitConditionSatisfied() override; + bool IsExitConditionSatisfied() override; }; ListPrefMatchChecker::ListPrefMatchChecker(const char* path) @@ -299,10 +299,10 @@ bool ListPrefMatchChecker::IsExitConditionSatisfied() { class BooleanPrefMatchChecker : public PrefMatchChecker { public: explicit BooleanPrefMatchChecker(const char* path); - virtual ~BooleanPrefMatchChecker(); + ~BooleanPrefMatchChecker() override; // Implementation of PrefMatchChecker. - virtual bool IsExitConditionSatisfied() override; + bool IsExitConditionSatisfied() override; }; BooleanPrefMatchChecker::BooleanPrefMatchChecker(const char* path) @@ -320,10 +320,10 @@ bool BooleanPrefMatchChecker::IsExitConditionSatisfied() { class IntegerPrefMatchChecker : public PrefMatchChecker { public: explicit IntegerPrefMatchChecker(const char* path); - virtual ~IntegerPrefMatchChecker(); + ~IntegerPrefMatchChecker() override; // Implementation of PrefMatchChecker. - virtual bool IsExitConditionSatisfied() override; + bool IsExitConditionSatisfied() override; }; IntegerPrefMatchChecker::IntegerPrefMatchChecker(const char* path) @@ -341,10 +341,10 @@ bool IntegerPrefMatchChecker::IsExitConditionSatisfied() { class StringPrefMatchChecker : public PrefMatchChecker { public: explicit StringPrefMatchChecker(const char* path); - virtual ~StringPrefMatchChecker(); + ~StringPrefMatchChecker() override; // Implementation of PrefMatchChecker. - virtual bool IsExitConditionSatisfied() override; + bool IsExitConditionSatisfied() override; }; StringPrefMatchChecker::StringPrefMatchChecker(const char* path) diff --git a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc index 0338a19..aeb827b 100644 --- a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc +++ b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc @@ -50,7 +50,7 @@ class BackendInitializeChecker : public SingleClientStatusChangeChecker { explicit BackendInitializeChecker(ProfileSyncService* service) : SingleClientStatusChangeChecker(service) {} - virtual bool IsExitConditionSatisfied() override { + bool IsExitConditionSatisfied() override { if (service()->backend_mode() != ProfileSyncService::SYNC) return false; if (service()->backend_initialized()) @@ -65,9 +65,7 @@ class BackendInitializeChecker : public SingleClientStatusChangeChecker { return false; } - virtual std::string GetDebugMessage() const override { - return "Backend Initialize"; - } + std::string GetDebugMessage() const override { return "Backend Initialize"; } }; class SyncSetupChecker : public SingleClientStatusChangeChecker { @@ -75,7 +73,7 @@ class SyncSetupChecker : public SingleClientStatusChangeChecker { explicit SyncSetupChecker(ProfileSyncService* service) : SingleClientStatusChangeChecker(service) {} - virtual bool IsExitConditionSatisfied() override { + bool IsExitConditionSatisfied() override { if (!service()->SyncActive()) return false; if (service()->ConfigurationDone()) @@ -90,9 +88,7 @@ class SyncSetupChecker : public SingleClientStatusChangeChecker { return false; } - virtual std::string GetDebugMessage() const override { - return "Sync Setup"; - } + std::string GetDebugMessage() const override { return "Sync Setup"; } }; } // namespace diff --git a/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc b/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc index 0fba2e1..9d2b316 100644 --- a/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc +++ b/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc @@ -73,8 +73,8 @@ class ProgressMarkerWatcher : public ProfileSyncServiceObserver { ProgressMarkerWatcher( ProfileSyncService* service, QuiesceStatusChangeChecker* quiesce_checker); - virtual ~ProgressMarkerWatcher(); - virtual void OnStateChanged() override; + ~ProgressMarkerWatcher() override; + void OnStateChanged() override; bool HasLatestProgressMarkers(); bool IsSyncDisabled(); diff --git a/chrome/browser/sync/test/integration/quiesce_status_change_checker.h b/chrome/browser/sync/test/integration/quiesce_status_change_checker.h index 246d3ba..e481227 100644 --- a/chrome/browser/sync/test/integration/quiesce_status_change_checker.h +++ b/chrome/browser/sync/test/integration/quiesce_status_change_checker.h @@ -32,7 +32,7 @@ class QuiesceStatusChangeChecker : public StatusChangeChecker { public: explicit QuiesceStatusChangeChecker( std::vector<ProfileSyncService*> services); - virtual ~QuiesceStatusChangeChecker(); + ~QuiesceStatusChangeChecker() override; // Blocks until all clients have quiesced or we time out. void Wait(); @@ -41,8 +41,8 @@ class QuiesceStatusChangeChecker : public StatusChangeChecker { void OnServiceStateChanged(ProfileSyncService* service); // Implementation of StatusChangeChecker. - virtual bool IsExitConditionSatisfied() override; - virtual std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; private: std::vector<ProfileSyncService*> services_; diff --git a/chrome/browser/sync/test/integration/sessions_helper.cc b/chrome/browser/sync/test/integration/sessions_helper.cc index 8f9b180..6ab0e67 100644 --- a/chrome/browser/sync/test/integration/sessions_helper.cc +++ b/chrome/browser/sync/test/integration/sessions_helper.cc @@ -136,7 +136,7 @@ class TabEventHandler : public browser_sync::LocalSessionEventHandler { TestTimeouts::action_max_timeout()); } - virtual void OnLocalTabModified( + void OnLocalTabModified( browser_sync::SyncedTabDelegate* modified_tab) override { // Unwind to ensure SessionsSyncManager has processed the event. base::MessageLoop::current()->PostTask( @@ -144,7 +144,7 @@ class TabEventHandler : public browser_sync::LocalSessionEventHandler { base::Bind(&TabEventHandler::QuitLoop, weak_factory_.GetWeakPtr())); } - virtual void OnFaviconPageUrlsUpdated( + void OnFaviconPageUrlsUpdated( const std::set<GURL>& updated_page_urls) override { // Unwind to ensure SessionsSyncManager has processed the event. base::MessageLoop::current()->PostTask( @@ -367,10 +367,11 @@ class CheckForeignSessionsChecker : public MultiClientStatusChangeChecker { public: CheckForeignSessionsChecker(int index, const std::vector<ScopedWindowMap>& windows); - virtual ~CheckForeignSessionsChecker(); + ~CheckForeignSessionsChecker() override; + + bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; - virtual bool IsExitConditionSatisfied() override; - virtual std::string GetDebugMessage() const override; private: int index_; const std::vector<ScopedWindowMap>& windows_; diff --git a/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc b/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc index fcaa9c0..7fe2b96 100644 --- a/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc +++ b/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc @@ -33,12 +33,12 @@ class SingleClientAppListSyncTest : public SyncTest { virtual ~SingleClientAppListSyncTest() {} // SyncTest - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { SyncTest::SetUpCommandLine(command_line); command_line->AppendSwitch(app_list::switches::kEnableSyncAppList); } - virtual bool SetupClients() override { + bool SetupClients() override { if (!SyncTest::SetupClients()) return false; diff --git a/chrome/browser/sync/test/integration/single_client_backup_rollback_test.cc b/chrome/browser/sync/test/integration/single_client_backup_rollback_test.cc index b819a80..bf6b34c 100644 --- a/chrome/browser/sync/test/integration/single_client_backup_rollback_test.cc +++ b/chrome/browser/sync/test/integration/single_client_backup_rollback_test.cc @@ -82,7 +82,7 @@ class SyncBackendStoppedChecker : public ProfileSyncServiceBase::Observer { timeout_(TestTimeouts::action_max_timeout()), done_(false) {} - virtual void OnStateChanged() override { + void OnStateChanged() override { if (ProfileSyncService::IDLE == pss_->backend_mode()) { done_ = true; run_loop_.Quit(); @@ -121,7 +121,7 @@ class SyncRollbackChecker : public ProfileSyncServiceBase::Observer, clear_done_(false) {} // ProfileSyncServiceBase::Observer implementation. - virtual void OnStateChanged() override { + void OnStateChanged() override { if (ProfileSyncService::ROLLBACK == pss_->backend_mode()) { rollback_started_ = true; if (clear_done_) @@ -130,7 +130,7 @@ class SyncRollbackChecker : public ProfileSyncServiceBase::Observer, } // BrowsingDataRemoverObserver::Observer implementation. - virtual void OnBrowsingDataRemoverDone() override { + void OnBrowsingDataRemoverDone() override { clear_done_ = true; if (rollback_started_) { run_loop_.Quit(); diff --git a/chrome/browser/sync/test/integration/single_client_status_change_checker.h b/chrome/browser/sync/test/integration/single_client_status_change_checker.h index a7c4a80..d76e2ca 100644 --- a/chrome/browser/sync/test/integration/single_client_status_change_checker.h +++ b/chrome/browser/sync/test/integration/single_client_status_change_checker.h @@ -19,7 +19,7 @@ class SingleClientStatusChangeChecker : public MultiClientStatusChangeChecker { public: explicit SingleClientStatusChangeChecker(ProfileSyncService* service); - virtual ~SingleClientStatusChangeChecker(); + ~SingleClientStatusChangeChecker() override; // StatusChangeChecker implementations and stubs. virtual bool IsExitConditionSatisfied() = 0; diff --git a/chrome/browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc b/chrome/browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc index bab4a08..200c399 100644 --- a/chrome/browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc +++ b/chrome/browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc @@ -25,7 +25,7 @@ class SingleClientSupervisedUserSettingsSyncTest : public SyncTest { virtual ~SingleClientSupervisedUserSettingsSyncTest() {} // SyncTest overrides: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { SyncTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII(switches::kSupervisedUserId, "asdf"); } diff --git a/chrome/browser/sync/test/integration/sync_auth_test.cc b/chrome/browser/sync/test/integration/sync_auth_test.cc index db1bc2e..0f958c2 100644 --- a/chrome/browser/sync/test/integration/sync_auth_test.cc +++ b/chrome/browser/sync/test/integration/sync_auth_test.cc @@ -50,9 +50,9 @@ const char kMalformedOAuth2Token[] = "{ \"foo\": "; class TestForAuthError : public SingleClientStatusChangeChecker { public: explicit TestForAuthError(ProfileSyncService* service); - virtual ~TestForAuthError(); - virtual bool IsExitConditionSatisfied() override; - virtual std::string GetDebugMessage() const override; + ~TestForAuthError() override; + bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; }; TestForAuthError::TestForAuthError(ProfileSyncService* service) diff --git a/chrome/browser/sync/test/integration/sync_errors_test.cc b/chrome/browser/sync/test/integration/sync_errors_test.cc index 3771f69..2493260 100644 --- a/chrome/browser/sync/test/integration/sync_errors_test.cc +++ b/chrome/browser/sync/test/integration/sync_errors_test.cc @@ -27,14 +27,12 @@ class SyncDisabledChecker : public SingleClientStatusChangeChecker { explicit SyncDisabledChecker(ProfileSyncService* service) : SingleClientStatusChangeChecker(service) {} - virtual bool IsExitConditionSatisfied() override { + bool IsExitConditionSatisfied() override { return !service()->setup_in_progress() && !service()->HasSyncSetupCompleted(); } - virtual std::string GetDebugMessage() const override { - return "Sync Disabled"; - } + std::string GetDebugMessage() const override { return "Sync Disabled"; } }; class TypeDisabledChecker : public SingleClientStatusChangeChecker { @@ -43,13 +41,11 @@ class TypeDisabledChecker : public SingleClientStatusChangeChecker { syncer::ModelType type) : SingleClientStatusChangeChecker(service), type_(type) {} - virtual bool IsExitConditionSatisfied() override { + bool IsExitConditionSatisfied() override { return !service()->GetActiveDataTypes().Has(type_); } - virtual std::string GetDebugMessage() const override { - return "Type disabled"; - } + std::string GetDebugMessage() const override { return "Type disabled"; } private: syncer::ModelType type_; }; @@ -82,18 +78,18 @@ class ActionableErrorChecker : public SingleClientStatusChangeChecker { explicit ActionableErrorChecker(ProfileSyncService* service) : SingleClientStatusChangeChecker(service) {} - virtual ~ActionableErrorChecker() {} + ~ActionableErrorChecker() override {} // Checks if an actionable error has been hit. Called repeatedly each time PSS // notifies observers of a state change. - virtual bool IsExitConditionSatisfied() override { + bool IsExitConditionSatisfied() override { ProfileSyncService::Status status; service()->QueryDetailedSyncStatus(&status); return (status.sync_protocol_error.action != syncer::UNKNOWN_ACTION && service()->HasUnrecoverableError()); } - virtual std::string GetDebugMessage() const override { + std::string GetDebugMessage() const override { return "ActionableErrorChecker"; } diff --git a/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc b/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc index 52737fa..58ee9c3 100644 --- a/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc +++ b/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc @@ -37,17 +37,17 @@ class ExponentialBackoffChecker : public SingleClientStatusChangeChecker { retry_verifier_.Initialize(snap); } - virtual ~ExponentialBackoffChecker() {} + ~ExponentialBackoffChecker() override {} // Checks if backoff is complete. Called repeatedly each time PSS notifies // observers of a state change. - virtual bool IsExitConditionSatisfied() override { + bool IsExitConditionSatisfied() override { const SyncSessionSnapshot& snap = service()->GetLastSessionSnapshot(); retry_verifier_.VerifyRetryInterval(snap); return (retry_verifier_.done() && retry_verifier_.Succeeded()); } - virtual std::string GetDebugMessage() const override { + std::string GetDebugMessage() const override { return base::StringPrintf("Verifying backoff intervals (%d/%d)", retry_verifier_.retry_count(), RetryVerifier::kMaxRetry); diff --git a/chrome/browser/sync/test/integration/sync_extension_installer.h b/chrome/browser/sync/test/integration/sync_extension_installer.h index cd73ae4..5c91cb9 100644 --- a/chrome/browser/sync/test/integration/sync_extension_installer.h +++ b/chrome/browser/sync/test/integration/sync_extension_installer.h @@ -26,12 +26,12 @@ class Profile; class SyncedExtensionInstaller : public content::NotificationObserver { public: explicit SyncedExtensionInstaller(Profile* profile); - virtual ~SyncedExtensionInstaller(); + ~SyncedExtensionInstaller() override; // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; private: void DoInstallSyncedExtensions(); diff --git a/chrome/browser/sync/test/integration/sync_integration_test_util.cc b/chrome/browser/sync/test/integration/sync_integration_test_util.cc index 4c4e8d3..248d051 100644 --- a/chrome/browser/sync/test/integration/sync_integration_test_util.cc +++ b/chrome/browser/sync/test/integration/sync_integration_test_util.cc @@ -15,13 +15,11 @@ class PassphraseRequiredChecker : public SingleClientStatusChangeChecker { explicit PassphraseRequiredChecker(ProfileSyncService* service) : SingleClientStatusChangeChecker(service) {} - virtual bool IsExitConditionSatisfied() override { + bool IsExitConditionSatisfied() override { return service()->IsPassphraseRequired(); } - virtual std::string GetDebugMessage() const override { - return "Passhrase Required"; - } + std::string GetDebugMessage() const override { return "Passhrase Required"; } }; class PassphraseAcceptedChecker : public SingleClientStatusChangeChecker { @@ -29,14 +27,12 @@ class PassphraseAcceptedChecker : public SingleClientStatusChangeChecker { explicit PassphraseAcceptedChecker(ProfileSyncService* service) : SingleClientStatusChangeChecker(service) {} - virtual bool IsExitConditionSatisfied() override { + bool IsExitConditionSatisfied() override { return !service()->IsPassphraseRequired() && service()->IsUsingSecondaryPassphrase(); } - virtual std::string GetDebugMessage() const override { - return "Passhrase Accepted"; - } + std::string GetDebugMessage() const override { return "Passhrase Accepted"; } }; bool AwaitPassphraseRequired(ProfileSyncService* service) { diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc index f3c5d9b..dc27dc4 100644 --- a/chrome/browser/sync/test/integration/sync_test.cc +++ b/chrome/browser/sync/test/integration/sync_test.cc @@ -98,7 +98,7 @@ class SyncServerStatusChecker : public net::URLFetcherDelegate { public: SyncServerStatusChecker() : running_(false) {} - virtual void OnURLFetchComplete(const net::URLFetcher* source) override { + void OnURLFetchComplete(const net::URLFetcher* source) override { std::string data; source->GetResponseAsString(&data); running_ = @@ -123,13 +123,11 @@ class EncryptionChecker : public SingleClientStatusChangeChecker { explicit EncryptionChecker(ProfileSyncService* service) : SingleClientStatusChangeChecker(service) {} - virtual bool IsExitConditionSatisfied() override { + bool IsExitConditionSatisfied() override { return IsEncryptionComplete(service()); } - virtual std::string GetDebugMessage() const override { - return "Encryption"; - } + std::string GetDebugMessage() const override { return "Encryption"; } }; void SetupNetworkCallback( diff --git a/chrome/browser/sync/test/integration/sync_test.h b/chrome/browser/sync/test/integration/sync_test.h index db0e634..e67ea2e 100644 --- a/chrome/browser/sync/test/integration/sync_test.h +++ b/chrome/browser/sync/test/integration/sync_test.h @@ -107,7 +107,7 @@ class SyncTest : public InProcessBrowserTest { virtual void TearDown() override; // Sets up command line flags required for sync tests. - virtual void SetUpCommandLine(base::CommandLine* cl) override; + void SetUpCommandLine(base::CommandLine* cl) override; // Used to get the number of sync clients used by a test. int num_clients() WARN_UNUSED_RESULT { return num_clients_; } @@ -227,15 +227,15 @@ class SyncTest : public InProcessBrowserTest { // BrowserTestBase override. Destroys all the sync clients and sync // profiles created by a test. - virtual void TearDownOnMainThread() override; + void TearDownOnMainThread() override; // InProcessBrowserTest override. Changes behavior of the default host // resolver to avoid DNS lookup errors. - virtual void SetUpInProcessBrowserTestFixture() override; + void SetUpInProcessBrowserTestFixture() override; // InProcessBrowserTest override. Resets the host resolver its default // behavior. - virtual void TearDownInProcessBrowserTestFixture() override; + void TearDownInProcessBrowserTestFixture() override; // Creates Profile, Browser and ProfileSyncServiceHarness instances for // |index|. Used by SetupClients(). diff --git a/chrome/browser/sync/test/integration/themes_helper.cc b/chrome/browser/sync/test/integration/themes_helper.cc index db6dc67..324745e 100644 --- a/chrome/browser/sync/test/integration/themes_helper.cc +++ b/chrome/browser/sync/test/integration/themes_helper.cc @@ -87,16 +87,16 @@ class ThemePendingInstallChecker : public StatusChangeChecker, public content::NotificationObserver { public: ThemePendingInstallChecker(Profile* profile, const std::string& theme); - virtual ~ThemePendingInstallChecker(); + ~ThemePendingInstallChecker() override; // Implementation of StatusChangeChecker. - virtual std::string GetDebugMessage() const override; - virtual bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; // Implementation of content::NotificationObserver. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Waits until the condition to be met or a timeout occurs. void Wait(); @@ -167,16 +167,16 @@ class ThemeConditionChecker : public StatusChangeChecker, ThemeConditionChecker(Profile* profile, const std::string& debug_message_, base::Callback<bool(ThemeService*)> exit_condition); - virtual ~ThemeConditionChecker(); + ~ThemeConditionChecker() override; // Implementation of StatusChangeChecker. - virtual std::string GetDebugMessage() const override; - virtual bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; // Implementation of content::NotificationObserver. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Waits until the condition to be met or a timeout occurs. void Wait(); diff --git a/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc b/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc index fe5237a..8612fea 100644 --- a/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc @@ -84,12 +84,12 @@ class TwoClientAppListSyncTest : public SyncTest { virtual ~TwoClientAppListSyncTest() {} // SyncTest - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { SyncTest::SetUpCommandLine(command_line); command_line->AppendSwitch(app_list::switches::kEnableSyncAppList); } - virtual bool SetupClients() override { + bool SetupClients() override { if (!SyncTest::SetupClients()) return false; @@ -99,7 +99,7 @@ class TwoClientAppListSyncTest : public SyncTest { return true; } - virtual bool SetupSync() override { + bool SetupSync() override { if (!SyncTest::SetupSync()) return false; WaitForExtensionServicesToLoad(); diff --git a/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc b/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc index 8480d76..dcd2d80 100644 --- a/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_apps_sync_test.cc @@ -59,7 +59,7 @@ class TwoClientAppsSyncTest : public SyncTest { virtual ~TwoClientAppsSyncTest() {} - virtual bool TestUsesSelfNotifications() override { return false; } + bool TestUsesSelfNotifications() override { return false; } private: DISALLOW_COPY_AND_ASSIGN(TwoClientAppsSyncTest); diff --git a/chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc b/chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc index 2cba130..a5689e6 100644 --- a/chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc @@ -49,7 +49,7 @@ class TwoClientAutofillSyncTest : public SyncTest { TwoClientAutofillSyncTest() : SyncTest(TWO_CLIENT) { count = 0; } virtual ~TwoClientAutofillSyncTest() {} - virtual bool TestUsesSelfNotifications() override { return false; } + bool TestUsesSelfNotifications() override { return false; } // We do this so as to make a change that will trigger the autofill to sync. // By default autofill does not sync unless there is some other change. diff --git a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc index 0bb840c..e549054 100644 --- a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc @@ -66,7 +66,7 @@ class TwoClientBookmarksSyncTest : public SyncTest { TwoClientBookmarksSyncTest() : SyncTest(TWO_CLIENT) {} virtual ~TwoClientBookmarksSyncTest() {} - virtual void TearDownInProcessBrowserTestFixture() override { + void TearDownInProcessBrowserTestFixture() override { SyncTest::TearDownInProcessBrowserTestFixture(); policy_provider_.Shutdown(); } diff --git a/chrome/browser/sync/test/integration/two_client_extensions_sync_test.cc b/chrome/browser/sync/test/integration/two_client_extensions_sync_test.cc index 9f11612..43cdb13 100644 --- a/chrome/browser/sync/test/integration/two_client_extensions_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_extensions_sync_test.cc @@ -23,7 +23,7 @@ class TwoClientExtensionsSyncTest : public SyncTest { TwoClientExtensionsSyncTest() : SyncTest(TWO_CLIENT) {} virtual ~TwoClientExtensionsSyncTest() {} - virtual bool TestUsesSelfNotifications() override { return false; } + bool TestUsesSelfNotifications() override { return false; } private: DISALLOW_COPY_AND_ASSIGN(TwoClientExtensionsSyncTest); diff --git a/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc b/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc index 21c44dc..0385f79 100644 --- a/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc @@ -37,7 +37,7 @@ class TwoClientPasswordsSyncTest : public SyncTest { TwoClientPasswordsSyncTest() : SyncTest(TWO_CLIENT) {} virtual ~TwoClientPasswordsSyncTest() {} - virtual bool TestUsesSelfNotifications() override { return false; } + bool TestUsesSelfNotifications() override { return false; } private: DISALLOW_COPY_AND_ASSIGN(TwoClientPasswordsSyncTest); diff --git a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc index a49d9e9..c19dfcb 100644 --- a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc @@ -25,7 +25,7 @@ class TwoClientPreferencesSyncTest : public SyncTest { TwoClientPreferencesSyncTest() : SyncTest(TWO_CLIENT) {} virtual ~TwoClientPreferencesSyncTest() {} - virtual bool TestUsesSelfNotifications() override { return false; } + bool TestUsesSelfNotifications() override { return false; } private: DISALLOW_COPY_AND_ASSIGN(TwoClientPreferencesSyncTest); diff --git a/chrome/browser/sync/test/integration/two_client_themes_sync_test.cc b/chrome/browser/sync/test/integration/two_client_themes_sync_test.cc index 7ea37b1..a41f447 100644 --- a/chrome/browser/sync/test/integration/two_client_themes_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_themes_sync_test.cc @@ -25,9 +25,7 @@ class TwoClientThemesSyncTest : public SyncTest { TwoClientThemesSyncTest() : SyncTest(TWO_CLIENT) {} virtual ~TwoClientThemesSyncTest() {} - virtual bool TestUsesSelfNotifications() override { - return false; - } + bool TestUsesSelfNotifications() override { return false; } private: DISALLOW_COPY_AND_ASSIGN(TwoClientThemesSyncTest); diff --git a/chrome/browser/sync/test/integration/typed_urls_helper.cc b/chrome/browser/sync/test/integration/typed_urls_helper.cc index cd68534..43da2f3 100644 --- a/chrome/browser/sync/test/integration/typed_urls_helper.cc +++ b/chrome/browser/sync/test/integration/typed_urls_helper.cc @@ -27,16 +27,16 @@ class FlushHistoryDBQueueTask : public history::HistoryDBTask { public: explicit FlushHistoryDBQueueTask(base::WaitableEvent* event) : wait_event_(event) {} - virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) override { + bool RunOnDBThread(history::HistoryBackend* backend, + history::HistoryDatabase* db) override { wait_event_->Signal(); return true; } - virtual void DoneRunOnMainThread() override {} + void DoneRunOnMainThread() override {} private: - virtual ~FlushHistoryDBQueueTask() {} + ~FlushHistoryDBQueueTask() override {} base::WaitableEvent* wait_event_; }; @@ -46,18 +46,18 @@ class GetTypedUrlsTask : public history::HistoryDBTask { GetTypedUrlsTask(history::URLRows* rows, base::WaitableEvent* event) : rows_(rows), wait_event_(event) {} - virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) override { + bool RunOnDBThread(history::HistoryBackend* backend, + history::HistoryDatabase* db) override { // Fetch the typed URLs. backend->GetAllTypedURLs(rows_); wait_event_->Signal(); return true; } - virtual void DoneRunOnMainThread() override {} + void DoneRunOnMainThread() override {} private: - virtual ~GetTypedUrlsTask() {} + ~GetTypedUrlsTask() override {} history::URLRows* rows_; base::WaitableEvent* wait_event_; @@ -71,18 +71,18 @@ class GetUrlTask : public history::HistoryDBTask { base::WaitableEvent* event) : url_(url), row_(row), wait_event_(event), found_(found) {} - virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) override { + bool RunOnDBThread(history::HistoryBackend* backend, + history::HistoryDatabase* db) override { // Fetch the typed URLs. *found_ = backend->GetURL(url_, row_); wait_event_->Signal(); return true; } - virtual void DoneRunOnMainThread() override {} + void DoneRunOnMainThread() override {} private: - virtual ~GetUrlTask() {} + ~GetUrlTask() override {} GURL url_; history::URLRow* row_; @@ -97,18 +97,18 @@ class GetVisitsTask : public history::HistoryDBTask { base::WaitableEvent* event) : id_(id), visits_(visits), wait_event_(event) {} - virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) override { + bool RunOnDBThread(history::HistoryBackend* backend, + history::HistoryDatabase* db) override { // Fetch the visits. backend->GetVisitsForURL(id_, visits_); wait_event_->Signal(); return true; } - virtual void DoneRunOnMainThread() override {} + void DoneRunOnMainThread() override {} private: - virtual ~GetVisitsTask() {} + ~GetVisitsTask() override {} history::URLID id_; history::VisitVector* visits_; @@ -121,18 +121,18 @@ class RemoveVisitsTask : public history::HistoryDBTask { base::WaitableEvent* event) : visits_(visits), wait_event_(event) {} - virtual bool RunOnDBThread(history::HistoryBackend* backend, - history::HistoryDatabase* db) override { + bool RunOnDBThread(history::HistoryBackend* backend, + history::HistoryDatabase* db) override { // Fetch the visits. backend->RemoveVisits(visits_); wait_event_->Signal(); return true; } - virtual void DoneRunOnMainThread() override {} + void DoneRunOnMainThread() override {} private: - virtual ~RemoveVisitsTask() {} + ~RemoveVisitsTask() override {} const history::VisitVector& visits_; base::WaitableEvent* wait_event_; @@ -395,10 +395,10 @@ namespace { class ProfilesHaveSameURLsChecker : public MultiClientStatusChangeChecker { public: ProfilesHaveSameURLsChecker(); - virtual ~ProfilesHaveSameURLsChecker(); + ~ProfilesHaveSameURLsChecker() override; - virtual bool IsExitConditionSatisfied() override; - virtual std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; }; ProfilesHaveSameURLsChecker::ProfilesHaveSameURLsChecker() diff --git a/chrome/browser/sync/test/integration/updated_progress_marker_checker.h b/chrome/browser/sync/test/integration/updated_progress_marker_checker.h index 0cc55dd..8e9cfe3 100644 --- a/chrome/browser/sync/test/integration/updated_progress_marker_checker.h +++ b/chrome/browser/sync/test/integration/updated_progress_marker_checker.h @@ -21,10 +21,10 @@ class UpdatedProgressMarkerChecker : public SingleClientStatusChangeChecker { public: explicit UpdatedProgressMarkerChecker(ProfileSyncService* service); - virtual ~UpdatedProgressMarkerChecker(); + ~UpdatedProgressMarkerChecker() override; - virtual bool IsExitConditionSatisfied() override; - virtual std::string GetDebugMessage() const override; + bool IsExitConditionSatisfied() override; + std::string GetDebugMessage() const override; }; #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_UPDATED_PROGRESS_MARKER_CHECKER_H_ diff --git a/chrome/browser/sync/test/test_http_bridge_factory.h b/chrome/browser/sync/test/test_http_bridge_factory.h index 6a99b80..07829c9 100644 --- a/chrome/browser/sync/test/test_http_bridge_factory.h +++ b/chrome/browser/sync/test/test_http_bridge_factory.h @@ -14,37 +14,35 @@ namespace browser_sync { class TestHttpBridge : public syncer::HttpPostProviderInterface { public: // Begin syncer::HttpPostProviderInterface implementation: - virtual void SetExtraRequestHeaders(const char * headers) override {} + void SetExtraRequestHeaders(const char* headers) override {} - virtual void SetURL(const char* url, int port) override {} + void SetURL(const char* url, int port) override {} - virtual void SetPostPayload(const char* content_type, - int content_length, - const char* content) override {} + void SetPostPayload(const char* content_type, + int content_length, + const char* content) override {} - virtual bool MakeSynchronousPost(int* error_code, - int* response_code) override; + bool MakeSynchronousPost(int* error_code, int* response_code) override; - virtual int GetResponseContentLength() const override; + int GetResponseContentLength() const override; - virtual const char* GetResponseContent() const override; + const char* GetResponseContent() const override; - virtual const std::string GetResponseHeaderValue( - const std::string&) const override; + const std::string GetResponseHeaderValue(const std::string&) const override; - virtual void Abort() override; + void Abort() override; // End syncer::HttpPostProviderInterface implementation. }; class TestHttpBridgeFactory : public syncer::HttpPostProviderFactory { public: TestHttpBridgeFactory(); - virtual ~TestHttpBridgeFactory(); + ~TestHttpBridgeFactory() override; // syncer::HttpPostProviderFactory: - virtual void Init(const std::string& user_agent) override; - virtual syncer::HttpPostProviderInterface* Create() override; - virtual void Destroy(syncer::HttpPostProviderInterface* http) override; + void Init(const std::string& user_agent) override; + syncer::HttpPostProviderInterface* Create() override; + void Destroy(syncer::HttpPostProviderInterface* http) override; }; } // namespace browser_sync diff --git a/chrome/browser/sync/test_profile_sync_service.h b/chrome/browser/sync/test_profile_sync_service.h index 8af4493..be4af67 100644 --- a/chrome/browser/sync/test_profile_sync_service.h +++ b/chrome/browser/sync/test_profile_sync_service.h @@ -41,9 +41,9 @@ class SyncBackendHostForProfileSyncTest : public SyncBackendHostImpl { invalidation::InvalidationService* invalidator, const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, base::Closure callback); - virtual ~SyncBackendHostForProfileSyncTest(); + ~SyncBackendHostForProfileSyncTest() override; - virtual void RequestConfigureSyncer( + void RequestConfigureSyncer( syncer::ConfigureReason reason, syncer::ModelTypeSet to_download, syncer::ModelTypeSet to_purge, @@ -51,12 +51,12 @@ class SyncBackendHostForProfileSyncTest : public SyncBackendHostImpl { syncer::ModelTypeSet to_unapply, syncer::ModelTypeSet to_ignore, const syncer::ModelSafeRoutingInfo& routing_info, - const base::Callback<void(syncer::ModelTypeSet, - syncer::ModelTypeSet)>& ready_task, + const base::Callback<void(syncer::ModelTypeSet, syncer::ModelTypeSet)>& + ready_task, const base::Closure& retry_callback) override; protected: - virtual void InitCore(scoped_ptr<DoInitializeOptions> options) override; + void InitCore(scoped_ptr<DoInitializeOptions> options) override; private: // Invoked at the start of HandleSyncManagerInitializationOnFrontendLoop. @@ -78,13 +78,13 @@ class TestProfileSyncService : public ProfileSyncService { ProfileOAuth2TokenService* oauth2_token_service, browser_sync::ProfileSyncServiceStartBehavior behavior); - virtual ~TestProfileSyncService(); + ~TestProfileSyncService() override; - virtual void OnConfigureDone( + void OnConfigureDone( const sync_driver::DataTypeManager::ConfigureResult& result) override; // We implement our own version to avoid some DCHECKs. - virtual syncer::UserShare* GetUserShare() const override; + syncer::UserShare* GetUserShare() const override; static TestProfileSyncService* BuildAutoStartAsyncInit( Profile* profile, base::Closure callback); @@ -102,10 +102,9 @@ class TestProfileSyncService : public ProfileSyncService { // Return NULL handle to use in backend initialization to avoid receiving // js messages on UI loop when it's being destroyed, which are not deleted // and cause memory leak in test. - virtual syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() - override; + syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() override; - virtual bool NeedBackup() const override; + bool NeedBackup() const override; private: syncer::TestIdFactory id_factory_; |