diff options
Diffstat (limited to 'sync/internal_api')
-rw-r--r-- | sync/internal_api/public/base/invalidator_state.cc | 25 | ||||
-rw-r--r-- | sync/internal_api/public/base/invalidator_state.h | 30 | ||||
-rw-r--r-- | sync/internal_api/public/test/fake_sync_manager.h | 4 | ||||
-rw-r--r-- | sync/internal_api/sync_manager_impl.h | 2 | ||||
-rw-r--r-- | sync/internal_api/sync_manager_impl_unittest.cc | 1 | ||||
-rw-r--r-- | sync/internal_api/test/fake_sync_manager.cc | 2 |
6 files changed, 7 insertions, 57 deletions
diff --git a/sync/internal_api/public/base/invalidator_state.cc b/sync/internal_api/public/base/invalidator_state.cc deleted file mode 100644 index e42ca63..0000000 --- a/sync/internal_api/public/base/invalidator_state.cc +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "sync/internal_api/public/base/invalidator_state.h" - -#include "base/logging.h" - -namespace syncer { - -const char* InvalidatorStateToString(InvalidatorState state) { - switch (state) { - case TRANSIENT_INVALIDATION_ERROR: - return "TRANSIENT_INVALIDATION_ERROR"; - case INVALIDATION_CREDENTIALS_REJECTED: - return "INVALIDATION_CREDENTIALS_REJECTED"; - case INVALIDATIONS_ENABLED: - return "INVALIDATIONS_ENABLED"; - default: - NOTREACHED(); - return "UNKNOWN_INVALIDATOR_STATE"; - } -} - -} // namespace syncer diff --git a/sync/internal_api/public/base/invalidator_state.h b/sync/internal_api/public/base/invalidator_state.h deleted file mode 100644 index 3a1c7ee..0000000 --- a/sync/internal_api/public/base/invalidator_state.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATOR_STATE_H_ -#define SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATOR_STATE_H_ - -#include "sync/base/sync_export.h" - -namespace syncer { - -enum InvalidatorState { - // Failure states - // -------------- - // There is an underlying transient problem (e.g., network- or - // XMPP-related). - TRANSIENT_INVALIDATION_ERROR, - DEFAULT_INVALIDATION_ERROR = TRANSIENT_INVALIDATION_ERROR, - // Our credentials have been rejected. - INVALIDATION_CREDENTIALS_REJECTED, - - // Invalidations are fully working. - INVALIDATIONS_ENABLED -}; - -SYNC_EXPORT const char* InvalidatorStateToString(InvalidatorState state); - -} // namespace syncer - -#endif // SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATOR_STATE_H_ diff --git a/sync/internal_api/public/test/fake_sync_manager.h b/sync/internal_api/public/test/fake_sync_manager.h index 31f5d412..9b2dbea 100644 --- a/sync/internal_api/public/test/fake_sync_manager.h +++ b/sync/internal_api/public/test/fake_sync_manager.h @@ -12,6 +12,7 @@ #include "sync/internal_api/public/sync_manager.h" #include "sync/internal_api/public/test/null_sync_core_proxy.h" #include "sync/internal_api/public/test/test_user_share.h" +#include "sync/notifier/invalidator_registrar.h" namespace base { class SequencedTaskRunner; @@ -156,6 +157,9 @@ class FakeSyncManager : public SyncManager { // The set of types that have been enabled. ModelTypeSet enabled_types_; + // Faked invalidator state. + InvalidatorRegistrar registrar_; + // The types for which a refresh was most recently requested. ModelTypeSet last_refresh_request_types_; diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h index dd6e191..2e02b60 100644 --- a/sync/internal_api/sync_manager_impl.h +++ b/sync/internal_api/sync_manager_impl.h @@ -19,13 +19,13 @@ #include "sync/internal_api/js_sync_encryption_handler_observer.h" #include "sync/internal_api/js_sync_manager_observer.h" #include "sync/internal_api/protocol_event_buffer.h" -#include "sync/internal_api/public/base/invalidator_state.h" #include "sync/internal_api/public/sync_core_proxy.h" #include "sync/internal_api/public/sync_manager.h" #include "sync/internal_api/public/user_share.h" #include "sync/internal_api/sync_encryption_handler_impl.h" #include "sync/js/js_backend.h" #include "sync/notifier/invalidation_handler.h" +#include "sync/notifier/invalidator_state.h" #include "sync/syncable/directory_change_delegate.h" #include "sync/util/cryptographer.h" #include "sync/util/time.h" diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc index a3eff02..20b7685 100644 --- a/sync/internal_api/sync_manager_impl_unittest.cc +++ b/sync/internal_api/sync_manager_impl_unittest.cc @@ -45,6 +45,7 @@ #include "sync/js/js_backend.h" #include "sync/js/js_event_handler.h" #include "sync/js/js_test_util.h" +#include "sync/notifier/fake_invalidation_handler.h" #include "sync/notifier/invalidation_handler.h" #include "sync/notifier/invalidator.h" #include "sync/protocol/bookmark_specifics.pb.h" diff --git a/sync/internal_api/test/fake_sync_manager.cc b/sync/internal_api/test/fake_sync_manager.cc index 7526795..9374cd1 100644 --- a/sync/internal_api/test/fake_sync_manager.cc +++ b/sync/internal_api/test/fake_sync_manager.cc @@ -14,11 +14,11 @@ #include "base/sequenced_task_runner.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" -#include "sync/internal_api/public/base/invalidator_state.h" #include "sync/internal_api/public/http_post_provider_factory.h" #include "sync/internal_api/public/internal_components_factory.h" #include "sync/internal_api/public/util/weak_handle.h" #include "sync/notifier/invalidator.h" +#include "sync/notifier/invalidator_state.h" #include "sync/notifier/object_id_invalidation_map.h" #include "sync/syncable/directory.h" #include "sync/test/fake_sync_encryption_handler.h" |