Commit 4b2a80b1 authored by Joe Downing's avatar Joe Downing Committed by Commit Bot

Removing non-robot account setup path

All hosts should now (as of several years ago) be set up using a
robot account so the codepath to handle host registration for a person
account is no longer useful.  Removing it to clean up the logic and
prevent future confusion.

Change-Id: I7cb813dc05e9eb79a76d04ea37a80470edd66d73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2495981
Commit-Queue: Joe Downing <joedow@google.com>
Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821345}
parent 95dcf55b
...@@ -56,7 +56,7 @@ void HostStarter::StartHost(const std::string& host_id, ...@@ -56,7 +56,7 @@ void HostStarter::StartHost(const std::string& host_id,
const std::string& redirect_url, const std::string& redirect_url,
CompletionCallback on_done) { CompletionCallback on_done) {
DCHECK(main_task_runner_->BelongsToCurrentThread()); DCHECK(main_task_runner_->BelongsToCurrentThread());
DCHECK(on_done_.is_null()); DCHECK(!on_done_);
host_id_ = host_id; host_id_ = host_id;
host_name_ = host_name; host_name_ = host_name;
...@@ -168,9 +168,8 @@ void HostStarter::OnHostRegistered(const std::string& authorization_code) { ...@@ -168,9 +168,8 @@ void HostStarter::OnHostRegistered(const std::string& authorization_code) {
} }
if (authorization_code.empty()) { if (authorization_code.empty()) {
// No service account code, start the host with the owner's credentials. NOTREACHED() << "No authorization code returned by the Directory.";
xmpp_login_ = host_owner_; std::move(on_done_).Run(START_ERROR);
StartHostProcess();
return; return;
} }
...@@ -194,9 +193,7 @@ void HostStarter::StartHostProcess() { ...@@ -194,9 +193,7 @@ void HostStarter::StartHostProcess() {
// Start the host. // Start the host.
std::string host_secret_hash = remoting::MakeHostPinHash(host_id_, host_pin_); std::string host_secret_hash = remoting::MakeHostPinHash(host_id_, host_pin_);
std::unique_ptr<base::DictionaryValue> config(new base::DictionaryValue()); std::unique_ptr<base::DictionaryValue> config(new base::DictionaryValue());
if (host_owner_ != xmpp_login_) { config->SetString("host_owner", host_owner_);
config->SetString("host_owner", host_owner_);
}
config->SetString("xmpp_login", xmpp_login_); config->SetString("xmpp_login", xmpp_login_);
config->SetString("oauth_refresh_token", host_refresh_token_); config->SetString("oauth_refresh_token", host_refresh_token_);
config->SetString("host_id", host_id_); config->SetString("host_id", host_id_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment