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

Unified Diff: sync/notifier/non_blocking_invalidation_notifier.h

Issue 10875064: Rename SyncNotifier->Invalidator and SyncNotifierObserver->InvalidationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to ToT for landing Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sync/notifier/non_blocking_invalidation_notifier.h
diff --git a/sync/notifier/non_blocking_invalidation_notifier.h b/sync/notifier/non_blocking_invalidation_notifier.h
deleted file mode 100644
index 849c981371451978b5bdb999bb41d16a9ee6362d..0000000000000000000000000000000000000000
--- a/sync/notifier/non_blocking_invalidation_notifier.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) 2012 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.
-//
-// An implementation of SyncNotifier that wraps InvalidationNotifier
-// on its own thread.
-
-#ifndef SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_
-#define SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "jingle/notifier/base/notifier_options.h"
-#include "sync/internal_api/public/util/weak_handle.h"
-#include "sync/notifier/invalidation_state_tracker.h"
-#include "sync/notifier/sync_notifier.h"
-#include "sync/notifier/sync_notifier_observer.h"
-#include "sync/notifier/sync_notifier_registrar.h"
-
-namespace base {
-class SingleThreadTaskRunner;
-} // namespace base
-
-namespace syncer {
-
-// TODO(akalin): Generalize to NonBlockingSyncNotifier
-// (http://crbug.com/140409).
-class NonBlockingInvalidationNotifier
- : public SyncNotifier,
- // SyncNotifierObserver to "observe" our Core via WeakHandle.
- public SyncNotifierObserver {
- public:
- // |invalidation_state_tracker| must be initialized.
- NonBlockingInvalidationNotifier(
- const notifier::NotifierOptions& notifier_options,
- const InvalidationVersionMap& initial_max_invalidation_versions,
- const std::string& initial_invalidation_state,
- const WeakHandle<InvalidationStateTracker>&
- invalidation_state_tracker,
- const std::string& client_info);
-
- virtual ~NonBlockingInvalidationNotifier();
-
- // SyncNotifier implementation.
- virtual void RegisterHandler(SyncNotifierObserver* handler) OVERRIDE;
- virtual void UpdateRegisteredIds(SyncNotifierObserver* handler,
- const ObjectIdSet& ids) OVERRIDE;
- virtual void UnregisterHandler(SyncNotifierObserver* handler) OVERRIDE;
- virtual void SetUniqueId(const std::string& unique_id) OVERRIDE;
- virtual void SetStateDeprecated(const std::string& state) OVERRIDE;
- virtual void UpdateCredentials(
- const std::string& email, const std::string& token) OVERRIDE;
- virtual void SendNotification(ModelTypeSet changed_types) OVERRIDE;
-
- // SyncNotifierObserver implementation.
- virtual void OnNotificationsEnabled() OVERRIDE;
- virtual void OnNotificationsDisabled(
- NotificationsDisabledReason reason) OVERRIDE;
- virtual void OnIncomingNotification(
- const ObjectIdStateMap& id_state_map,
- IncomingNotificationSource source) OVERRIDE;
-
- private:
- class Core;
-
- base::WeakPtrFactory<NonBlockingInvalidationNotifier> weak_ptr_factory_;
-
- SyncNotifierRegistrar registrar_;
-
- // The real guts of NonBlockingInvalidationNotifier, which allows
- // this class to live completely on the parent thread.
- scoped_refptr<Core> core_;
- scoped_refptr<base::SingleThreadTaskRunner> parent_task_runner_;
- scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(NonBlockingInvalidationNotifier);
-};
-
-} // namespace syncer
-
-#endif // SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_
« no previous file with comments | « sync/notifier/invalidator_registrar_unittest.cc ('k') | sync/notifier/non_blocking_invalidation_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698