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

Unified Diff: components/invalidation/profile_invalidation_provider.h

Issue 327243003: Introduce ProfileInvalidationProvider wrapper for InvalidationService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 6 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: components/invalidation/profile_invalidation_provider.h
diff --git a/components/invalidation/profile_invalidation_provider.h b/components/invalidation/profile_invalidation_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..53c0db8dec984b759dc9a4f7a00c02206a641a8e
--- /dev/null
+++ b/components/invalidation/profile_invalidation_provider.h
@@ -0,0 +1,37 @@
+// 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 COMPONENTS_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_H_
+#define COMPONENTS_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_H_
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "components/keyed_service/core/keyed_service.h"
+
+namespace invalidation {
+
+class InvalidationService;
+
+// A KeyedService that owns an InvalidationService.
+class ProfileInvalidationProvider : public KeyedService {
+ public:
+ explicit ProfileInvalidationProvider(
+ scoped_ptr<InvalidationService> invalidation_service);
+ virtual ~ProfileInvalidationProvider();
+
+ InvalidationService* GetInvalidationService();
+
+ // KeyedService:
+ virtual void Shutdown() OVERRIDE;
+
+ private:
+ scoped_ptr<InvalidationService> invalidation_service_;
+
+ DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationProvider);
+};
+
+} // namespace invalidation
+
+#endif // COMPONENTS_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_H_
« no previous file with comments | « components/invalidation/p2p_invalidation_service.cc ('k') | components/invalidation/profile_invalidation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698