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

Unified Diff: chrome/browser/chromeos/login/screens/controller_pairing_screen.cc

Issue 491943004: Update the pairing API to include configuration and enrollment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment some TODOs Created 6 years, 4 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/screens/controller_pairing_screen.cc
diff --git a/chrome/browser/chromeos/login/screens/controller_pairing_screen.cc b/chrome/browser/chromeos/login/screens/controller_pairing_screen.cc
index 9c0dff9ec946f101807391f9f2dda86860f3b674..be7ad25b6bbcff910ce3dca1252c87ae8b61a0cd 100644
--- a/chrome/browser/chromeos/login/screens/controller_pairing_screen.cc
+++ b/chrome/browser/chromeos/login/screens/controller_pairing_screen.cc
@@ -8,13 +8,16 @@
#include "base/values.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chromeos/chromeos_switches.h"
-#include "chromeos/login/auth/user_context.h"
#include "components/pairing/fake_controller_pairing_controller.h"
#include "google_apis/gaia/gaia_auth_util.h"
using namespace chromeos::controller_pairing;
using namespace pairing_chromeos;
+namespace {
+const char* kTestAuthToken = "TestAuthToken";
+};
+
namespace chromeos {
ControllerPairingScreen::ControllerPairingScreen(
@@ -199,11 +202,10 @@ void ControllerPairingScreen::OnUserActed(const std::string& action) {
} else if (action == kActionEnroll) {
std::string account_id =
achuithb 2014/08/27 21:41:36 make this const
Zachary Kuznia 2014/08/27 22:01:49 Done.
gaia::SanitizeEmail(context_.GetString(kContextKeyAccountId));
- context_.SetString(kContextKeyEnrollmentDomain,
- gaia::ExtractDomainName(account_id));
- UserContext user_context(account_id);
- controller_->OnAuthenticationDone(user_context,
- actor_->GetBrowserContext());
+ std::string domain(gaia::ExtractDomainName(account_id));
achuithb 2014/08/27 21:41:36 make this const
Zachary Kuznia 2014/08/27 22:01:49 Done.
+ context_.SetString(kContextKeyEnrollmentDomain, domain);
+ // TODO(zork): Get proper credentials. (http://crbug.com/405744)
+ controller_->OnAuthenticationDone(domain, kTestAuthToken);
} else if (action == kActionStartSession) {
controller_->StartSession();
}

Powered by Google App Engine
This is Rietveld 408576698