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

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

Issue 72613006: Eliminate AutofillWebDataService::FromBrowserContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__
6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 public: 55 public:
56 // Returns the |WebDataServiceWrapper| associated with the |profile|. 56 // Returns the |WebDataServiceWrapper| associated with the |profile|.
57 // |access_type| is either EXPLICIT_ACCESS or IMPLICIT_ACCESS 57 // |access_type| is either EXPLICIT_ACCESS or IMPLICIT_ACCESS
58 // (see its definition). 58 // (see its definition).
59 static WebDataServiceWrapper* GetForProfile( 59 static WebDataServiceWrapper* GetForProfile(
60 Profile* profile, Profile::ServiceAccessType access_type); 60 Profile* profile, Profile::ServiceAccessType access_type);
61 61
62 static WebDataServiceWrapper* GetForProfileIfExists( 62 static WebDataServiceWrapper* GetForProfileIfExists(
63 Profile* profile, Profile::ServiceAccessType access_type); 63 Profile* profile, Profile::ServiceAccessType access_type);
64 64
65 // Returns the |AutofillWebDataService| associated with the |profile|.
66 static scoped_refptr<autofill::AutofillWebDataService>
67 GetAutofillWebDataForProfile(Profile* profile);
Peter Kasting 2013/11/15 01:30:59 This seems like a random place for this. Why woul
Peter Kasting 2013/11/15 01:35:59 Belay that, I should learn to read your comments f
blundell 2013/11/19 14:05:37 (1) Via discussion on this review thread, resolved
68
65 static WebDataServiceFactory* GetInstance(); 69 static WebDataServiceFactory* GetInstance();
66 70
67 private: 71 private:
68 friend struct DefaultSingletonTraits<WebDataServiceFactory>; 72 friend struct DefaultSingletonTraits<WebDataServiceFactory>;
69 73
70 WebDataServiceFactory(); 74 WebDataServiceFactory();
71 virtual ~WebDataServiceFactory(); 75 virtual ~WebDataServiceFactory();
72 76
73 // |BrowserContextKeyedBaseFactory| methods: 77 // |BrowserContextKeyedBaseFactory| methods:
74 virtual content::BrowserContext* GetBrowserContextToUse( 78 virtual content::BrowserContext* GetBrowserContextToUse(
75 content::BrowserContext* context) const OVERRIDE; 79 content::BrowserContext* context) const OVERRIDE;
76 virtual BrowserContextKeyedService* BuildServiceInstanceFor( 80 virtual BrowserContextKeyedService* BuildServiceInstanceFor(
77 content::BrowserContext* profile) const OVERRIDE; 81 content::BrowserContext* profile) const OVERRIDE;
78 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; 82 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
79 83
80 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); 84 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory);
81 }; 85 };
82 86
83 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ 87 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698