1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_FEEDBACK_FEEDBACK_UPLOADER_FACTORY_H_
6 #define COMPONENTS_FEEDBACK_FEEDBACK_UPLOADER_FACTORY_H_
8 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
11 template<typename T
> struct DefaultSingletonTraits
;
20 class FeedbackUploader
;
22 // Singleton that owns the FeedbackUploaders and associates them with profiles;
23 class FeedbackUploaderFactory
: public BrowserContextKeyedServiceFactory
{
25 // Returns singleton instance of FeedbackUploaderFactory.
26 static FeedbackUploaderFactory
* GetInstance();
28 // Returns the Feedback Uploader associated with |context|.
29 static FeedbackUploader
* GetForBrowserContext(
30 content::BrowserContext
* context
);
33 friend struct base::DefaultSingletonTraits
<FeedbackUploaderFactory
>;
35 FeedbackUploaderFactory();
36 ~FeedbackUploaderFactory() override
;
38 // BrowserContextKeyedServiceFactory overrides:
39 KeyedService
* BuildServiceInstanceFor(
40 content::BrowserContext
* context
) const override
;
41 content::BrowserContext
* GetBrowserContextToUse(
42 content::BrowserContext
* context
) const override
;
44 DISALLOW_COPY_AND_ASSIGN(FeedbackUploaderFactory
);
47 } // namespace feedback
49 #endif // COMPONENTS_FEEDBACK_FEEDBACK_UPLOADER_FACTORY_H_