Chromium Code Reviews| Index: chrome/browser/push_messaging/background_budget_service_factory.h |
| diff --git a/chrome/browser/push_messaging/background_budget_service_factory.h b/chrome/browser/push_messaging/background_budget_service_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a3c4a948325f2a1a711ae8031a04f098728355a2 |
| --- /dev/null |
| +++ b/chrome/browser/push_messaging/background_budget_service_factory.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2016 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_PUSH_MESSAGING_BACKGROUND_BUDGET_SERVICE_FACTORY_H_ |
| +#define CHROME_BROWSER_PUSH_MESSAGING_BACKGROUND_BUDGET_SERVICE_FACTORY_H_ |
| + |
| +#include "base/memory/singleton.h" |
| +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" |
| + |
| +class BackgroundBudgetService; |
| + |
| +class BackgroundBudgetServiceFactory |
| + : public BrowserContextKeyedServiceFactory { |
| + public: |
| + static BackgroundBudgetService* GetForProfile( |
| + content::BrowserContext* profile); |
|
Michael van Ouwerkerk
2016/04/14 14:36:31
nit: it seems odd to name an argument of type Brow
harkness
2016/04/14 17:44:19
I don't really have strong feelings either way, I
|
| + static BackgroundBudgetServiceFactory* GetInstance(); |
| + |
| + private: |
| + friend struct base::DefaultSingletonTraits<BackgroundBudgetServiceFactory>; |
| + |
| + BackgroundBudgetServiceFactory(); |
| + ~BackgroundBudgetServiceFactory() override{}; |
|
Michael van Ouwerkerk
2016/04/14 14:36:31
nit: odd spacing. Did you run format?
Peter Beverloo
2016/04/14 16:01:18
also no semi-colon please :-)
harkness
2016/04/14 17:44:19
I did, and I just ran it again with no change. I w
|
| + |
| + KeyedService* BuildServiceInstanceFor( |
|
Michael van Ouwerkerk
2016/04/14 14:36:31
Add this line above:
// BrowserContextKeyedService
harkness
2016/04/14 17:44:19
Done.
|
| + content::BrowserContext* profile) const override; |
|
Michael van Ouwerkerk
2016/04/14 14:36:31
nit: s/profile/context/
harkness
2016/04/14 17:44:19
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(BackgroundBudgetServiceFactory); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_PUSH_MESSAGING_BACKGROUND_BUDGET_SERVICE_FACTORY_H_ |