diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 19:25:19 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 19:25:19 +0000 |
commit | 55525ed26f1783d4ba392b39693f5b1e8d19768e (patch) | |
tree | 5d287246d6385e7d4f7785e0e1e160b36023d85a /sync/internal_api | |
parent | cb4a4c6ed973644de031480c820a5caa70a79b3d (diff) | |
download | chromium_src-55525ed26f1783d4ba392b39693f5b1e8d19768e.zip chromium_src-55525ed26f1783d4ba392b39693f5b1e8d19768e.tar.gz chromium_src-55525ed26f1783d4ba392b39693f5b1e8d19768e.tar.bz2 |
sync: Remove dead code related to ClearUserData
Removes some code left over from the ClearUserData feature. These are
mostly functions named 'OnStopSyncingPermanently'.
Also renames ProfileSyncService::OnStopSyncingPermanently to
StopSyncingPermanently. This makes it easier to distinguish from the
now deprecated SyncManagerObserver callback. The new name is more
appropriate name since this function is not really a callback or event
handler anymore.
BUG=342932
Review URL: https://codereview.chromium.org/153643006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api')
-rw-r--r-- | sync/internal_api/debug_info_event_listener.cc | 5 | ||||
-rw-r--r-- | sync/internal_api/debug_info_event_listener.h | 1 | ||||
-rw-r--r-- | sync/internal_api/js_sync_manager_observer.cc | 7 | ||||
-rw-r--r-- | sync/internal_api/js_sync_manager_observer.h | 1 | ||||
-rw-r--r-- | sync/internal_api/js_sync_manager_observer_unittest.cc | 11 | ||||
-rw-r--r-- | sync/internal_api/public/sync_manager.h | 6 | ||||
-rw-r--r-- | sync/internal_api/sync_manager_impl_unittest.cc | 1 |
7 files changed, 0 insertions, 32 deletions
diff --git a/sync/internal_api/debug_info_event_listener.cc b/sync/internal_api/debug_info_event_listener.cc index f46c4ee..ec30da8 100644 --- a/sync/internal_api/debug_info_event_listener.cc +++ b/sync/internal_api/debug_info_event_listener.cc @@ -84,11 +84,6 @@ void DebugInfoEventListener::OnBootstrapTokenUpdated( CreateAndAddEvent(sync_pb::DebugEventInfo::KEYSTORE_TOKEN_UPDATED); } -void DebugInfoEventListener::OnStopSyncingPermanently() { - DCHECK(thread_checker_.CalledOnValidThread()); - CreateAndAddEvent(sync_pb::DebugEventInfo::STOP_SYNCING_PERMANENTLY); -} - void DebugInfoEventListener::OnEncryptedTypesChanged( ModelTypeSet encrypted_types, bool encrypt_everything) { diff --git a/sync/internal_api/debug_info_event_listener.h b/sync/internal_api/debug_info_event_listener.h index 15cc0a6..661d476 100644 --- a/sync/internal_api/debug_info_event_listener.h +++ b/sync/internal_api/debug_info_event_listener.h @@ -48,7 +48,6 @@ class SYNC_EXPORT_PRIVATE DebugInfoEventListener bool success, ModelTypeSet restored_types) OVERRIDE; virtual void OnConnectionStatusChange( ConnectionStatus connection_status) OVERRIDE; - virtual void OnStopSyncingPermanently() OVERRIDE; virtual void OnActionableError( const SyncProtocolError& sync_error) OVERRIDE; diff --git a/sync/internal_api/js_sync_manager_observer.cc b/sync/internal_api/js_sync_manager_observer.cc index 9f8848d..e74db84 100644 --- a/sync/internal_api/js_sync_manager_observer.cc +++ b/sync/internal_api/js_sync_manager_observer.cc @@ -78,13 +78,6 @@ void JsSyncManagerObserver::OnInitializationComplete( JsEventDetails(&details)); } -void JsSyncManagerObserver::OnStopSyncingPermanently() { - if (!event_handler_.IsInitialized()) { - return; - } - HandleJsEvent(FROM_HERE, "onStopSyncingPermanently", JsEventDetails()); -} - void JsSyncManagerObserver::HandleJsEvent( const tracked_objects::Location& from_here, const std::string& name, const JsEventDetails& details) { diff --git a/sync/internal_api/js_sync_manager_observer.h b/sync/internal_api/js_sync_manager_observer.h index 17a40e7..45b8f05 100644 --- a/sync/internal_api/js_sync_manager_observer.h +++ b/sync/internal_api/js_sync_manager_observer.h @@ -40,7 +40,6 @@ class SYNC_EXPORT_PRIVATE JsSyncManagerObserver : public SyncManager::Observer { const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener, bool success, syncer::ModelTypeSet restored_types) OVERRIDE; - virtual void OnStopSyncingPermanently() OVERRIDE; virtual void OnActionableError( const SyncProtocolError& sync_protocol_error) OVERRIDE; diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/sync/internal_api/js_sync_manager_observer_unittest.cc index e4b8c64..46f0319 100644 --- a/sync/internal_api/js_sync_manager_observer_unittest.cc +++ b/sync/internal_api/js_sync_manager_observer_unittest.cc @@ -44,17 +44,6 @@ class JsSyncManagerObserverTest : public testing::Test { } }; -TEST_F(JsSyncManagerObserverTest, NoArgNotifiations) { - InSequence dummy; - - EXPECT_CALL(mock_js_event_handler_, - HandleJsEvent("onStopSyncingPermanently", - HasDetails(JsEventDetails()))); - - js_sync_manager_observer_.OnStopSyncingPermanently(); - PumpLoop(); -} - TEST_F(JsSyncManagerObserverTest, OnInitializationComplete) { base::DictionaryValue expected_details; syncer::ModelTypeSet restored_types; diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h index de8ee79..54e12b6 100644 --- a/sync/internal_api/public/sync_manager.h +++ b/sync/internal_api/public/sync_manager.h @@ -219,12 +219,6 @@ class SYNC_EXPORT SyncManager : public syncer::InvalidationHandler { bool success, ModelTypeSet restored_types) = 0; - // We are no longer permitted to communicate with the server. Sync should - // be disabled and state cleaned up at once. This can happen for a number - // of reasons, e.g. swapping from a test instance to production, or a - // global stop syncing operation has wiped the store. - virtual void OnStopSyncingPermanently() = 0; - virtual void OnActionableError( const SyncProtocolError& sync_protocol_error) = 0; diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc index 29d80e0..369b1d8 100644 --- a/sync/internal_api/sync_manager_impl_unittest.cc +++ b/sync/internal_api/sync_manager_impl_unittest.cc @@ -645,7 +645,6 @@ class SyncManagerObserverMock : public SyncManager::Observer { bool, syncer::ModelTypeSet)); // NOLINT MOCK_METHOD1(OnConnectionStatusChange, void(ConnectionStatus)); // NOLINT - MOCK_METHOD0(OnStopSyncingPermanently, void()); // NOLINT MOCK_METHOD1(OnUpdatedToken, void(const std::string&)); // NOLINT MOCK_METHOD1(OnActionableError, void(const SyncProtocolError&)); // NOLINT |