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

Side by Side Diff: chrome/browser/tab_contents/origins_seen_service_factory.cc

Issue 2823233003: Deprecate Once-Per-Origin Navigation histograms (Closed)
Patch Set: Remove deleted .h from .mm Created 3 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 2016 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/tab_contents/origins_seen_service_factory.h"
6
7 #include "chrome/browser/profiles/incognito_helpers.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
9 #include "components/navigation_metrics/origins_seen_service.h"
10
11 // static
12 navigation_metrics::OriginsSeenService*
13 OriginsSeenServiceFactory::GetForBrowserContext(
14 content::BrowserContext* context) {
15 return static_cast<navigation_metrics::OriginsSeenService*>(
16 GetInstance()->GetServiceForBrowserContext(context, true));
17 }
18
19 // static
20 OriginsSeenServiceFactory* OriginsSeenServiceFactory::GetInstance() {
21 return base::Singleton<OriginsSeenServiceFactory>::get();
22 }
23
24 // static
25 KeyedService* OriginsSeenServiceFactory::BuildInstanceFor(
26 content::BrowserContext* context) {
27 return new navigation_metrics::OriginsSeenService();
28 }
29
30 OriginsSeenServiceFactory::OriginsSeenServiceFactory()
31 : BrowserContextKeyedServiceFactory(
32 "OriginsSeenService",
33 BrowserContextDependencyManager::GetInstance()) {}
34
35 OriginsSeenServiceFactory::~OriginsSeenServiceFactory() {}
36
37 content::BrowserContext* OriginsSeenServiceFactory::GetBrowserContextToUse(
38 content::BrowserContext* context) const {
39 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
40 }
41
42 KeyedService* OriginsSeenServiceFactory::BuildServiceInstanceFor(
43 content::BrowserContext* context) const {
44 return BuildInstanceFor(context);
45 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/origins_seen_service_factory.h ('k') | components/navigation_metrics/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698