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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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.get() || !ps->Init()) { 190 if (!ps.get() || !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( 198 void PasswordStoreFactory::RegisterProfilePrefs(
199 user_prefs::PrefRegistrySyncable* registry) { 199 user_prefs::PrefRegistrySyncable* registry) {
200 #if !defined(OS_CHROMEOS) && defined(USE_X11) 200 #if !defined(OS_CHROMEOS) && defined(USE_X11)
201 registry->RegisterIntegerPref( 201 registry->RegisterIntegerPref(
202 prefs::kLocalProfileId, 202 prefs::kLocalProfileId,
203 kInvalidLocalProfileId, 203 kInvalidLocalProfileId,
204 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 204 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
205 205
206 // Notice that the preprocessor conditions above are exactly those that will 206 // Notice that the preprocessor conditions above are exactly those that will
207 // result in using PasswordStoreX in CreatePasswordStore() below. 207 // result in using PasswordStoreX in CreatePasswordStore() below.
208 PasswordStoreX::RegisterUserPrefs(registry); 208 PasswordStoreX::RegisterProfilePrefs(registry);
209 #endif 209 #endif
210 } 210 }
211 211
212 content::BrowserContext* PasswordStoreFactory::GetBrowserContextToUse( 212 content::BrowserContext* PasswordStoreFactory::GetBrowserContextToUse(
213 content::BrowserContext* context) const { 213 content::BrowserContext* context) const {
214 return chrome::GetBrowserContextRedirectedInIncognito(context); 214 return chrome::GetBrowserContextRedirectedInIncognito(context);
215 } 215 }
216 216
217 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() const { 217 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() const {
218 return true; 218 return true;
219 } 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