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

Unified Diff: chrome/browser/signin/signin_manager.cc

Issue 15024007: Eliminate BrowserProcess dependency from sign-in production code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/signin/signin_manager.h ('k') | chrome/browser/signin/signin_manager_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_manager.cc
diff --git a/chrome/browser/signin/signin_manager.cc b/chrome/browser/signin/signin_manager.cc
index 7ad613e1c7d307822704cbf92dd8975a7fe37810..734610e278dbb85cd8c56117cd1abccf116f9f7c 100644
--- a/chrome/browser/signin/signin_manager.cc
+++ b/chrome/browser/signin/signin_manager.cc
@@ -14,7 +14,6 @@
#include "base/strings/string_split.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_io_data.h"
#include "chrome/browser/signin/about_signin_internals.h"
#include "chrome/browser/signin/about_signin_internals_factory.h"
@@ -382,11 +381,10 @@ void SigninManager::SignOut() {
token_service->EraseTokensFromDB();
}
-void SigninManager::Initialize(Profile* profile) {
- SigninManagerBase::Initialize(profile);
+void SigninManager::Initialize(Profile* profile, PrefService* local_state) {
+ SigninManagerBase::Initialize(profile, local_state);
// local_state can be null during unit tests.
- PrefService* local_state = g_browser_process->local_state();
if (local_state) {
local_state_pref_registrar_.Init(local_state);
local_state_pref_registrar_.Add(
@@ -465,7 +463,7 @@ bool SigninManager::IsUsernameAllowedByPolicy(const std::string& username,
}
bool SigninManager::IsAllowedUsername(const std::string& username) const {
- PrefService* local_state = g_browser_process->local_state();
+ const PrefService* local_state = local_state_pref_registrar_.prefs();
if (!local_state)
return true; // In a unit test with no local state - all names are allowed.
« no previous file with comments | « chrome/browser/signin/signin_manager.h ('k') | chrome/browser/signin/signin_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698