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

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: 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
Index: remoting/host/setup/host_starter.cc
diff --git a/remoting/host/setup/host_starter.cc b/remoting/host/setup/host_starter.cc
index 31847fe8eb069b7a70f15cce33e4f5bab139e197..47e5db561d192ef252f13d55d105b98ba6a1ce7c 100644
--- a/remoting/host/setup/host_starter.cc
+++ b/remoting/host/setup/host_starter.cc
@@ -67,11 +67,6 @@ HostStarter::HostStarter(
daemon_controller_(daemon_controller.Pass()),
in_progress_(false),
consent_to_data_collection_(false) {
- 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();
}
HostStarter::~HostStarter() {
@@ -97,6 +92,7 @@ void HostStarter::StartHost(const std::string& host_name,
const std::string& host_pin,
bool consent_to_data_collection,
const std::string& auth_code,
+ const std::string& redirect_url,
CompletionCallback on_done) {
if (in_progress_) {
on_done.Run(START_IN_PROGRESS);
@@ -107,6 +103,11 @@ void HostStarter::StartHost(const std::string& host_name,
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);
Sergey Ulanov 2012/10/17 23:41:36 nit: 4-space indent here and below.
simonmorris 2012/10/18 00:10:09 Done.
+ 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);

Powered by Google App Engine
This is Rietveld 408576698