| 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 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 5 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/profiles/incognito_helpers.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/profiles/profile_dependency_manager.h" | 12 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 12 #include "chrome/browser/webdata/web_data_service_factory.h" | 13 #include "chrome/browser/webdata/web_data_service_factory.h" |
| 13 #include "components/autofill/browser/personal_data_manager.h" | 14 #include "components/autofill/browser/personal_data_manager.h" |
| 14 | 15 |
| 15 namespace autofill { | 16 namespace autofill { |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| 18 class PersonalDataManagerServiceImpl : public PersonalDataManagerService { | 19 class PersonalDataManagerServiceImpl : public PersonalDataManagerService { |
| 19 public: | 20 public: |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 PersonalDataManagerFactory::~PersonalDataManagerFactory() { | 76 PersonalDataManagerFactory::~PersonalDataManagerFactory() { |
| 76 } | 77 } |
| 77 | 78 |
| 78 ProfileKeyedService* PersonalDataManagerFactory::BuildServiceInstanceFor( | 79 ProfileKeyedService* PersonalDataManagerFactory::BuildServiceInstanceFor( |
| 79 content::BrowserContext* profile) const { | 80 content::BrowserContext* profile) const { |
| 80 PersonalDataManagerService* service = | 81 PersonalDataManagerService* service = |
| 81 new PersonalDataManagerServiceImpl(static_cast<Profile*>(profile)); | 82 new PersonalDataManagerServiceImpl(static_cast<Profile*>(profile)); |
| 82 return service; | 83 return service; |
| 83 } | 84 } |
| 84 | 85 |
| 85 bool PersonalDataManagerFactory::ServiceHasOwnInstanceInIncognito() const { | 86 content::BrowserContext* PersonalDataManagerFactory::GetBrowserContextToUse( |
| 86 return true; | 87 content::BrowserContext* context) const { |
| 88 return chrome::GetBrowserContextOwnInstanceInIncognito(context); |
| 87 } | 89 } |
| 88 | 90 |
| 89 } // namespace autofill | 91 } // namespace autofill |
| OLD | NEW |