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

Side by Side Diff: chrome/browser/password_manager/password_store_factory.cc

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 7 months 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 #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"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 delete login_db; 188 delete login_db;
189 189
190 if (!ps || !ps->Init()) { 190 if (!ps || !ps->Init()) {
191 NOTREACHED() << "Could not initialize password manager."; 191 NOTREACHED() << "Could not initialize password manager.";
192 return NULL; 192 return NULL;
193 } 193 }
194 194
195 return ps; 195 return ps;
196 } 196 }
197 197
198 void PasswordStoreFactory::RegisterUserPrefs(PrefRegistrySyncable* registry) { 198 void PasswordStoreFactory::RegisterUserPrefs(
199 user_prefs::PrefRegistrySyncable* registry) {
199 #if !defined(OS_CHROMEOS) && defined(USE_X11) 200 #if !defined(OS_CHROMEOS) && defined(USE_X11)
200 registry->RegisterIntegerPref(prefs::kLocalProfileId, 201 registry->RegisterIntegerPref(
201 kInvalidLocalProfileId, 202 prefs::kLocalProfileId,
202 PrefRegistrySyncable::UNSYNCABLE_PREF); 203 kInvalidLocalProfileId,
204 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
203 205
204 // Notice that the preprocessor conditions above are exactly those that will 206 // Notice that the preprocessor conditions above are exactly those that will
205 // result in using PasswordStoreX in CreatePasswordStore() below. 207 // result in using PasswordStoreX in CreatePasswordStore() below.
206 PasswordStoreX::RegisterUserPrefs(registry); 208 PasswordStoreX::RegisterUserPrefs(registry);
207 #endif 209 #endif
208 } 210 }
209 211
210 content::BrowserContext* PasswordStoreFactory::GetBrowserContextToUse( 212 content::BrowserContext* PasswordStoreFactory::GetBrowserContextToUse(
211 content::BrowserContext* context) const { 213 content::BrowserContext* context) const {
212 return chrome::GetBrowserContextRedirectedInIncognito(context); 214 return chrome::GetBrowserContextRedirectedInIncognito(context);
213 } 215 }
214 216
215 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() const { 217 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() const {
216 return true; 218 return true;
217 } 219 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_factory.h ('k') | chrome/browser/password_manager/password_store_x.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698