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

Side by Side Diff: chrome/browser/network_time/network_time_service_factory.cc

Issue 291333009: network_time: Remove NetworkTimeService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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/network_time/network_time_service_factory.h"
6
7 #include "chrome/browser/network_time/network_time_service.h"
8 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10
11 NetworkTimeServiceFactory::NetworkTimeServiceFactory()
12 : BrowserContextKeyedServiceFactory(
13 "NetworkTimeService",
14 BrowserContextDependencyManager::GetInstance()) {
15 }
16
17 NetworkTimeServiceFactory::~NetworkTimeServiceFactory() {
18 }
19
20 // static
21 NetworkTimeServiceFactory* NetworkTimeServiceFactory::GetInstance() {
22 return Singleton<NetworkTimeServiceFactory>::get();
23 }
24
25 // static
26 NetworkTimeService* NetworkTimeServiceFactory::GetForProfile(
27 Profile* profile) {
28 return static_cast<NetworkTimeService*>(
29 GetInstance()->GetServiceForBrowserContext(profile, true));
30 }
31
32 content::BrowserContext* NetworkTimeServiceFactory::GetBrowserContextToUse(
33 content::BrowserContext* context) const {
34 return chrome::GetBrowserContextRedirectedInIncognito(context);
35 }
36
37 KeyedService* NetworkTimeServiceFactory::BuildServiceInstanceFor(
38 content::BrowserContext* context) const {
39 return new NetworkTimeService(static_cast<Profile*>(context));
40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698