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 "chrome/browser/password_manager/login_database.h" | 9 #include "chrome/browser/password_manager/login_database.h" |
10 #include "chrome/browser/password_manager/password_store.h" | 10 #include "chrome/browser/password_manager/password_store.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 delete login_db; | 185 delete login_db; |
186 | 186 |
187 if (!ps || !ps->Init()) { | 187 if (!ps || !ps->Init()) { |
188 NOTREACHED() << "Could not initialize password manager."; | 188 NOTREACHED() << "Could not initialize password manager."; |
189 return NULL; | 189 return NULL; |
190 } | 190 } |
191 | 191 |
192 return ps; | 192 return ps; |
193 } | 193 } |
194 | 194 |
195 void PasswordStoreFactory::RegisterUserPrefs(PrefService* prefs) { | 195 void PasswordStoreFactory::RegisterUserPrefs(PrefServiceSyncable* prefs) { |
196 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) \ | 196 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID) \ |
197 && defined(OS_POSIX) | 197 && defined(OS_POSIX) |
198 prefs->RegisterIntegerPref(prefs::kLocalProfileId, | 198 prefs->RegisterIntegerPref(prefs::kLocalProfileId, |
199 kInvalidLocalProfileId, | 199 kInvalidLocalProfileId, |
200 PrefService::UNSYNCABLE_PREF); | 200 PrefServiceSyncable::UNSYNCABLE_PREF); |
201 | 201 |
202 // Notice that the preprocessor conditions above are exactly those that will | 202 // Notice that the preprocessor conditions above are exactly those that will |
203 // result in using PasswordStoreX in CreatePasswordStore() below. | 203 // result in using PasswordStoreX in CreatePasswordStore() below. |
204 PasswordStoreX::RegisterUserPrefs(prefs); | 204 PasswordStoreX::RegisterUserPrefs(prefs); |
205 #endif | 205 #endif |
206 } | 206 } |
207 | 207 |
208 bool PasswordStoreFactory::ServiceRedirectedInIncognito() const { | 208 bool PasswordStoreFactory::ServiceRedirectedInIncognito() const { |
209 return true; | 209 return true; |
210 } | 210 } |
211 | 211 |
212 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() const { | 212 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() const { |
213 return true; | 213 return true; |
214 } | 214 } |
OLD | NEW |