OLD | NEW |
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" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/profiles/profile_keyed_service.h" |
12 #include "chrome/browser/profiles/profile_keyed_service_factory.h" | 13 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
13 #include "chrome/browser/webdata/web_data_service.h" | 14 #include "chrome/browser/webdata/web_data_service.h" |
14 | 15 |
15 // A wrapper of WebDataService so that we can use it as a profile keyed service. | 16 // A wrapper of WebDataService so that we can use it as a profile keyed service. |
16 class WebDataServiceWrapper : public ProfileKeyedService { | 17 class WebDataServiceWrapper : public ProfileKeyedService { |
17 public: | 18 public: |
18 explicit WebDataServiceWrapper(Profile* profile); | 19 explicit WebDataServiceWrapper(Profile* profile); |
19 | 20 |
20 // For testing. | 21 // For testing. |
21 WebDataServiceWrapper(); | 22 WebDataServiceWrapper(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // |ProfileKeyedBaseFactory| methods: | 58 // |ProfileKeyedBaseFactory| methods: |
58 virtual bool ServiceRedirectedInIncognito() const OVERRIDE; | 59 virtual bool ServiceRedirectedInIncognito() const OVERRIDE; |
59 virtual ProfileKeyedService* BuildServiceInstanceFor( | 60 virtual ProfileKeyedService* BuildServiceInstanceFor( |
60 Profile* profile) const OVERRIDE; | 61 Profile* profile) const OVERRIDE; |
61 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; | 62 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; |
62 | 63 |
63 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); | 64 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); |
64 }; | 65 }; |
65 | 66 |
66 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ | 67 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ |
OLD | NEW |