Index: chrome/browser/chromeos/login/google_authenticator.h |
=================================================================== |
--- chrome/browser/chromeos/login/google_authenticator.h (revision 42341) |
+++ chrome/browser/chromeos/login/google_authenticator.h (working copy) |
@@ -26,17 +26,15 @@ |
public URLFetcher::Delegate { |
public: |
GoogleAuthenticator(LoginStatusConsumer* consumer, |
- chromeos::CryptohomeLibrary* library, |
AuthResponseHandler* cl_handler, |
AuthResponseHandler* i_handler) |
: Authenticator(consumer), |
- library_(library), |
fetcher_(NULL), |
getter_(NULL), |
client_login_handler_(cl_handler), |
issue_handler_(i_handler) { |
- if (!library && chromeos::CrosLibrary::EnsureLoaded()) |
- library_ = chromeos::CryptohomeLibrary::Get(); |
+ CHECK(chromeos::CrosLibrary::Get()->EnsureLoaded()); |
+ library_ = chromeos::CrosLibrary::Get()->GetCryptohomeLibrary(); |
} |
explicit GoogleAuthenticator(LoginStatusConsumer* consumer) |
@@ -45,8 +43,8 @@ |
getter_(NULL), |
client_login_handler_(NULL), |
issue_handler_(NULL) { |
- CHECK(chromeos::CrosLibrary::EnsureLoaded()); |
- library_ = chromeos::CryptohomeLibrary::Get(); |
+ CHECK(chromeos::CrosLibrary::Get()->EnsureLoaded()); |
+ library_ = chromeos::CrosLibrary::Get()->GetCryptohomeLibrary(); |
} |
virtual ~GoogleAuthenticator() {} |
@@ -81,12 +79,10 @@ |
// to the subclasses specifically, and I want to allow mocked out |
// LoginStatusConsumers to be used here as well. |
static void OnLoginSuccess(LoginStatusConsumer* consumer, |
- chromeos::CryptohomeLibrary* library, |
const std::string& username, |
const std::string& passhash, |
const ResponseCookies& cookies); |
static void CheckOffline(LoginStatusConsumer* consumer, |
- chromeos::CryptohomeLibrary* library, |
const std::string& username, |
const std::string& passhash, |
const URLRequestStatus& status); |