Don't preload rarely seen large images
[chromium-blink-merge.git] / components / feedback / feedback_uploader_factory.cc
blob2e32e0f0966b10f9fee4648c002519d05fb08896
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 #include "components/feedback/feedback_uploader_factory.h"
7 #include "base/memory/singleton.h"
8 #include "components/feedback/feedback_uploader.h"
9 #include "components/feedback/feedback_uploader_chrome.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
12 namespace feedback {
14 // static
15 FeedbackUploaderFactory* FeedbackUploaderFactory::GetInstance() {
16 return Singleton<FeedbackUploaderFactory>::get();
19 // static
20 FeedbackUploader* FeedbackUploaderFactory::GetForBrowserContext(
21 content::BrowserContext* context) {
22 return static_cast<FeedbackUploaderChrome*>(
23 GetInstance()->GetServiceForBrowserContext(context, true));
26 FeedbackUploaderFactory::FeedbackUploaderFactory()
27 : BrowserContextKeyedServiceFactory(
28 "feedback::FeedbackUploader",
29 BrowserContextDependencyManager::GetInstance()) {}
31 FeedbackUploaderFactory::~FeedbackUploaderFactory() {}
33 KeyedService* FeedbackUploaderFactory::BuildServiceInstanceFor(
34 content::BrowserContext* context) const {
35 return new FeedbackUploaderChrome(context);
38 content::BrowserContext* FeedbackUploaderFactory::GetBrowserContextToUse(
39 content::BrowserContext* context) const {
40 return context;
43 } // namespace feedback