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

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

Issue 10185008: Taking over issue 10006037: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
Property Changes:
Added: svn:eol-style
+ LF
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 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__
6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/memory/singleton.h"
11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/profiles/refcounted_profile_keyed_service_factory.h"
13
14 class WebDataService;
15
16 class WebDataServiceFactory : public RefcountedProfileKeyedServiceFactory {
17 public:
18 // Returns the |WebDataService| associated with the |profile|.
19 // |access_type| is either EXPLICIT_ACCESS or IMPLICIT_ACCESS
20 // (see its definition).
21 static scoped_refptr<WebDataService> GetForProfile(
22 Profile* profile, Profile::ServiceAccessType access_type);
23
24 // Similar to GetForProfile(), but won't create the web data service if it
25 // doesn't already exist.
26 static scoped_refptr<WebDataService> GetForProfileIfExists(
27 Profile* profile, Profile::ServiceAccessType access_type);
28
29 static WebDataServiceFactory* GetInstance();
30
31 private:
32 friend struct DefaultSingletonTraits<WebDataServiceFactory>;
33
34 WebDataServiceFactory();
35 virtual ~WebDataServiceFactory();
36
37 // |ProfileKeyedBaseFactory| methods:
38 virtual bool ServiceRedirectedInIncognito() OVERRIDE;
39 virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor(
40 Profile* profile) const OVERRIDE;
41 virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
42 };
43
44 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_data_service.cc ('k') | chrome/browser/webdata/web_data_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698