summaryrefslogtreecommitdiffstats
path: root/chrome/browser/background_sync/background_sync_controller_factory.h
diff options
context:
space:
mode:
authorjkarlin <jkarlin@chromium.org>2015-10-06 08:13:35 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-06 15:14:39 +0000
commit6f5078ed47fa34af63cec4139db3347bcb74ecb4 (patch)
tree55a05742fe85dff9300f051f8448483148993b12 /chrome/browser/background_sync/background_sync_controller_factory.h
parent75a0abfba2569e38b0d8cd6bfd6a7f135d2fffe2 (diff)
downloadchromium_src-6f5078ed47fa34af63cec4139db3347bcb74ecb4.zip
chromium_src-6f5078ed47fa34af63cec4139db3347bcb74ecb4.tar.gz
chromium_src-6f5078ed47fa34af63cec4139db3347bcb74ecb4.tar.bz2
[BackgroundSync] Add BackgroundSyncController to Chrome
The new BackgroundSyncController allows content::BackgroundSyncManager to access Chrome features like Rappor and, in a followup CL, the BackgroundSyncLauncher. BUG=538640 Review URL: https://codereview.chromium.org/1369823003 Cr-Commit-Position: refs/heads/master@{#352605}
Diffstat (limited to 'chrome/browser/background_sync/background_sync_controller_factory.h')
-rw-r--r--chrome/browser/background_sync/background_sync_controller_factory.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/chrome/browser/background_sync/background_sync_controller_factory.h b/chrome/browser/background_sync/background_sync_controller_factory.h
new file mode 100644
index 0000000..b93dbe9
--- /dev/null
+++ b/chrome/browser/background_sync/background_sync_controller_factory.h
@@ -0,0 +1,35 @@
+// Copyright 2015 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_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_FACTORY_H_
+#define CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_FACTORY_H_
+
+#include "base/memory/singleton.h"
+#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
+
+class BackgroundSyncControllerImpl;
+class Profile;
+
+class BackgroundSyncControllerFactory
+ : public BrowserContextKeyedServiceFactory {
+ public:
+ static BackgroundSyncControllerImpl* GetForProfile(Profile* profile);
+ static BackgroundSyncControllerFactory* GetInstance();
+
+ private:
+ friend struct base::DefaultSingletonTraits<BackgroundSyncControllerFactory>;
+
+ BackgroundSyncControllerFactory();
+ ~BackgroundSyncControllerFactory() override;
+
+ // BrowserContextKeyedBaseFactory methods:
+ KeyedService* BuildServiceInstanceFor(
+ content::BrowserContext* context) const override;
+ content::BrowserContext* GetBrowserContextToUse(
+ content::BrowserContext* context) const override;
+
+ DISALLOW_COPY_AND_ASSIGN(BackgroundSyncControllerFactory);
+};
+
+#endif // CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_FACTORY_H_