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

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: Fix compile error 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/host_pairing_screen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4d10a0722b33480a066487fd570abd1648e1e423 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(
@@ -197,13 +200,12 @@ void ControllerPairingScreen::OnUserActed(const std::string& action) {
context_.SetString(kContextKeyPage, kPageAuthentication);
disable_controls = false;
} else if (action == kActionEnroll) {
- std::string account_id =
+ const std::string account_id =
gaia::SanitizeEmail(context_.GetString(kContextKeyAccountId));
- context_.SetString(kContextKeyEnrollmentDomain,
- gaia::ExtractDomainName(account_id));
- UserContext user_context(account_id);
- controller_->OnAuthenticationDone(user_context,
- actor_->GetBrowserContext());
+ const std::string domain(gaia::ExtractDomainName(account_id));
+ context_.SetString(kContextKeyEnrollmentDomain, domain);
+ // TODO(zork): Get proper credentials. (http://crbug.com/405744)
+ controller_->OnAuthenticationDone(domain, kTestAuthToken);
} else if (action == kActionStartSession) {
controller_->StartSession();
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/host_pairing_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698