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

Unified Diff: remoting/host/setup/host_starter.cc

Issue 11185037: [Chromoting] Let the Linux start-host app take a redirect-URL parameter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows include. Created 8 years, 2 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 | « remoting/host/setup/host_starter.h ('k') | remoting/host/setup/oauth_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/setup/host_starter.cc
diff --git a/remoting/host/setup/host_starter.cc b/remoting/host/setup/host_starter.cc
index ff7deb94f53d6aed0591424c4c711256c812a1ad..f7aa5be4ca72df42d7d335bc0619d65c26b0eb8c 100644
--- a/remoting/host/setup/host_starter.cc
+++ b/remoting/host/setup/host_starter.cc
@@ -70,11 +70,6 @@ HostStarter::HostStarter(
consent_to_data_collection_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)),
weak_ptr_(weak_ptr_factory_.GetWeakPtr()) {
- oauth_client_info_.client_id =
- google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING);
- oauth_client_info_.client_secret =
- google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING);
- oauth_client_info_.redirect_uri = GetOauthRedirectUrl();
main_task_runner_ = base::ThreadTaskRunnerHandle::Get();
}
@@ -102,6 +97,7 @@ void HostStarter::StartHost(
const std::string& host_pin,
bool consent_to_data_collection,
const std::string& auth_code,
+ const std::string& redirect_url,
CompletionCallback on_done) {
DCHECK(main_task_runner_->BelongsToCurrentThread());
if (in_progress_) {
@@ -113,6 +109,11 @@ void HostStarter::StartHost(
host_pin_ = host_pin;
consent_to_data_collection_ = consent_to_data_collection;
on_done_ = on_done;
+ oauth_client_info_.client_id =
+ google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING);
+ oauth_client_info_.client_secret =
+ google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING);
+ oauth_client_info_.redirect_uri = redirect_url;
// Map the authorization code to refresh and access tokens.
oauth_client_->GetTokensFromAuthCode(oauth_client_info_, auth_code,
kMaxGetTokensRetries, this);
« no previous file with comments | « remoting/host/setup/host_starter.h ('k') | remoting/host/setup/oauth_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698