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/password_manager/password_store_factory.h" | 5 #include "chrome/browser/password_manager/password_store_factory.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "chrome/browser/password_manager/login_database.h" | 10 #include "chrome/browser/password_manager/login_database.h" |
11 #include "chrome/browser/password_manager/password_store.h" | 11 #include "chrome/browser/password_manager/password_store.h" |
12 #include "chrome/browser/password_manager/password_store_default.h" | 12 #include "chrome/browser/password_manager/password_store_default.h" |
| 13 #include "chrome/browser/profiles/incognito_helpers.h" |
13 #include "chrome/browser/profiles/profile_dependency_manager.h" | 14 #include "chrome/browser/profiles/profile_dependency_manager.h" |
14 #include "chrome/browser/webdata/web_data_service.h" | 15 #include "chrome/browser/webdata/web_data_service.h" |
15 #include "chrome/browser/webdata/web_data_service_factory.h" | 16 #include "chrome/browser/webdata/web_data_service_factory.h" |
16 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
17 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
19 #include "components/user_prefs/pref_registry_syncable.h" | 20 #include "components/user_prefs/pref_registry_syncable.h" |
20 | 21 |
21 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
22 #include "chrome/browser/password_manager/password_store_win.h" | 23 #include "chrome/browser/password_manager/password_store_win.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 registry->RegisterIntegerPref(prefs::kLocalProfileId, | 200 registry->RegisterIntegerPref(prefs::kLocalProfileId, |
200 kInvalidLocalProfileId, | 201 kInvalidLocalProfileId, |
201 PrefRegistrySyncable::UNSYNCABLE_PREF); | 202 PrefRegistrySyncable::UNSYNCABLE_PREF); |
202 | 203 |
203 // Notice that the preprocessor conditions above are exactly those that will | 204 // Notice that the preprocessor conditions above are exactly those that will |
204 // result in using PasswordStoreX in CreatePasswordStore() below. | 205 // result in using PasswordStoreX in CreatePasswordStore() below. |
205 PasswordStoreX::RegisterUserPrefs(registry); | 206 PasswordStoreX::RegisterUserPrefs(registry); |
206 #endif | 207 #endif |
207 } | 208 } |
208 | 209 |
209 bool PasswordStoreFactory::ServiceRedirectedInIncognito() const { | 210 content::BrowserContext* PasswordStoreFactory::GetBrowserContextToUse( |
210 return true; | 211 content::BrowserContext* context) const { |
| 212 return chrome::GetBrowserContextRedirectedInIncognito(context); |
211 } | 213 } |
212 | 214 |
213 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() const { | 215 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() const { |
214 return true; | 216 return true; |
215 } | 217 } |
OLD | NEW |