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

Unified Diff: chrome/browser/chromeos/login/google_authenticator.h

Issue 1142005: Mocks for all libcros elements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
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);
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.cc ('k') | chrome/browser/chromeos/login/google_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698