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

Unified Diff: remoting/base/oauth_helper.cc

Issue 2661153003: Moving oauth code from host to base to allow code sharing between host and client. (Closed)
Patch Set: Merge branch 'master' into auth_token Created 3 years, 11 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/base/oauth_helper.h ('k') | remoting/base/oauth_helper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/oauth_helper.cc
diff --git a/remoting/host/setup/oauth_helper.cc b/remoting/base/oauth_helper.cc
similarity index 80%
rename from remoting/host/setup/oauth_helper.cc
rename to remoting/base/oauth_helper.cc
index 3ad1b4fc0f2f0a5470f98bd6c62355021173b434..0e83109280e8381feba3bb808f7a6083ad839fc5 100644
--- a/remoting/host/setup/oauth_helper.cc
+++ b/remoting/base/oauth_helper.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "remoting/host/setup/oauth_helper.h"
+#include "remoting/base/oauth_helper.h"
#include "base/strings/stringprintf.h"
#include "google_apis/google_api_keys.h"
@@ -24,16 +24,14 @@ std::string GetComponent(const std::string& url,
namespace remoting {
std::string GetOauthScope() {
- return
- "https://www.googleapis.com/auth/chromoting "
- "https://www.googleapis.com/auth/googletalk "
- "https://www.googleapis.com/auth/userinfo.email ";
+ return "https://www.googleapis.com/auth/chromoting "
+ "https://www.googleapis.com/auth/googletalk "
+ "https://www.googleapis.com/auth/userinfo.email ";
}
std::string GetDefaultOauthRedirectUrl() {
- return
- "https://chromoting-oauth.talkgadget.google.com/talkgadget/oauth/"
- "chrome-remote-desktop/rel/kgngmbheleoaphbjbaiobfdepmghbfah";
+ return "https://chromoting-oauth.talkgadget.google.com/talkgadget/oauth/"
+ "chrome-remote-desktop/rel/kgngmbheleoaphbjbaiobfdepmghbfah";
}
std::string GetOauthStartUrl(const std::string& redirect_url) {
@@ -47,8 +45,9 @@ std::string GetOauthStartUrl(const std::string& redirect_url) {
"&approval_prompt=force",
net::EscapeUrlEncodedData(GetOauthScope(), true).c_str(),
redirect_url.c_str(),
- net::EscapeUrlEncodedData(google_apis::GetOAuth2ClientID(
- google_apis::CLIENT_REMOTING), true).c_str());
+ net::EscapeUrlEncodedData(
+ google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING), true)
+ .c_str());
}
std::string GetOauthCodeInUrl(const std::string& url,
« no previous file with comments | « remoting/base/oauth_helper.h ('k') | remoting/base/oauth_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698