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

Side by Side Diff: chrome/browser/webdata/web_data_service_factory.cc

Issue 10908065: Introduce a couple of abstract bases for WebDataService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/webdata/web_data_service_factory.h" 5 #include "chrome/browser/webdata/web_data_service_factory.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h" 8 #include "chrome/browser/profiles/profile_dependency_manager.h"
9 #include "chrome/browser/webdata/web_data_service.h" 9 #include "chrome/browser/webdata/web_data_service.h"
10 #include "chrome/common/chrome_constants.h" 10 #include "chrome/common/chrome_constants.h"
11 11
12 // static
13 scoped_refptr<WebDataServiceBase> WebDataServiceBase::ForProfile(
14 Profile* profile) {
15 // TODO(joi): Does the implicit/explicit distinction really matter?
16 // It's just used for a DCHECK.
17 return WebDataServiceFactory::GetForProfile(profile,
18 Profile::EXPLICIT_ACCESS);
19 }
20
12 WebDataServiceFactory::WebDataServiceFactory() 21 WebDataServiceFactory::WebDataServiceFactory()
13 : RefcountedProfileKeyedServiceFactory( 22 : RefcountedProfileKeyedServiceFactory(
14 "WebDataService", 23 "WebDataService",
15 ProfileDependencyManager::GetInstance()) { 24 ProfileDependencyManager::GetInstance()) {
16 // WebDataServiceFactory has no dependecies. 25 // WebDataServiceFactory has no dependecies.
17 } 26 }
18 27
19 WebDataServiceFactory::~WebDataServiceFactory() {} 28 WebDataServiceFactory::~WebDataServiceFactory() {}
20 29
21 // static 30 // static
(...skipping 30 matching lines...) Expand all
52 61
53 scoped_refptr<WebDataService> wds(new WebDataService()); 62 scoped_refptr<WebDataService> wds(new WebDataService());
54 if (!wds->Init(profile->GetPath())) 63 if (!wds->Init(profile->GetPath()))
55 NOTREACHED(); 64 NOTREACHED();
56 return wds.get(); 65 return wds.get();
57 } 66 }
58 67
59 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() { 68 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() {
60 return true; 69 return true;
61 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698