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

Side by Side Diff: chrome/browser/feedback/feedback_uploader_factory.cc

Issue 225183018: Move feedback files into src/components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix deps, merge gyp targets, sync with latest Created 6 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 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.
4
5 #include "chrome/browser/feedback/feedback_uploader_factory.h"
6
7 #include "base/memory/singleton.h"
8 #include "chrome/browser/feedback/feedback_uploader.h"
9 #include "chrome/browser/feedback/feedback_uploader_chrome.h"
10 #include "chrome/browser/profiles/incognito_helpers.h"
11 #include "components/keyed_service/content/browser_context_dependency_manager.h"
12
13 namespace feedback {
14
15 // static
16 FeedbackUploaderFactory* FeedbackUploaderFactory::GetInstance() {
17 return Singleton<FeedbackUploaderFactory>::get();
18 }
19
20 // static
21 FeedbackUploader* FeedbackUploaderFactory::GetForBrowserContext(
22 content::BrowserContext* context) {
23 return static_cast<FeedbackUploaderChrome*>(
24 GetInstance()->GetServiceForBrowserContext(context, true));
25 }
26
27 FeedbackUploaderFactory::FeedbackUploaderFactory()
28 : BrowserContextKeyedServiceFactory(
29 "feedback::FeedbackUploader",
30 BrowserContextDependencyManager::GetInstance()) {}
31
32 FeedbackUploaderFactory::~FeedbackUploaderFactory() {}
33
34 KeyedService* FeedbackUploaderFactory::BuildServiceInstanceFor(
35 content::BrowserContext* context) const {
36 return new FeedbackUploaderChrome(context);
37 }
38
39 content::BrowserContext* FeedbackUploaderFactory::GetBrowserContextToUse(
40 content::BrowserContext* context) const {
41 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
42 }
43
44 } // namespace feedback
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698