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

Side by Side Diff: chrome/browser/visitedlink/visitedlink_master_factory.cc

Issue 11573060: Remove VisitedLink dependency on rest of chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address joth's comments round 2 (previous had gclient failure) Created 7 years, 11 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 (c) 2012 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/visitedlink/visitedlink_master_factory.h"
6
7 #include "base/memory/singleton.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h"
9 #include "chrome/browser/visitedlink/visitedlink_master.h"
10
11 // static
12 VisitedLinkMaster* VisitedLinkMaster::FromProfile(Profile* profile) {
13 return VisitedLinkMasterFactory::GetForProfile(profile);
14 }
15
16 // static
17 VisitedLinkMaster* VisitedLinkMasterFactory::GetForProfile(Profile* profile) {
18 return static_cast<VisitedLinkMaster*>(
19 GetInstance()->GetServiceForProfile(profile, true));
20 }
21
22 // static
23 VisitedLinkMasterFactory* VisitedLinkMasterFactory::GetInstance() {
24 return Singleton<VisitedLinkMasterFactory>::get();
25 }
26
27 VisitedLinkMasterFactory::VisitedLinkMasterFactory()
28 : ProfileKeyedServiceFactory(
29 "VisitedLinkMaster", ProfileDependencyManager::GetInstance()) {
30 }
31
32 VisitedLinkMasterFactory::~VisitedLinkMasterFactory() {
33 }
34
35 ProfileKeyedService*
36 VisitedLinkMasterFactory::BuildServiceInstanceFor(Profile* profile) const {
37 VisitedLinkMaster* visitedlink_master(new VisitedLinkMaster(profile));
38 if (visitedlink_master->Init())
39 return visitedlink_master;
40 return NULL;
41 }
42
43 bool VisitedLinkMasterFactory::ServiceIsNULLWhileTesting() const {
44 return true;
45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698