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

Unified Diff: chrome/browser/invalidation/profile_invalidation_provider.h

Issue 327243003: Introduce ProfileInvalidationProvider wrapper for InvalidationService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix clang compilation. 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: chrome/browser/invalidation/profile_invalidation_provider.h
diff --git a/chrome/browser/invalidation/profile_invalidation_provider.h b/chrome/browser/invalidation/profile_invalidation_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..11da1a0023557d5e8611ad8ccc1ff4a88b28f9c6
--- /dev/null
+++ b/chrome/browser/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 CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_H_
+#define CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_H_
+
+#include "base/compiler_specific.h"
rlarocque 2014/06/11 20:02:40 Could you move this to components/invalidation? T
bartfab (slow) 2014/06/12 09:21:14 Done.
+#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 // CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698