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

Unified Diff: remoting/test/access_token_fetcher.cc

Issue 1008043003: Adding Test Fixture for initial test cases for the App Remoting Test Driver. Also includes the pub… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing 2nd round of feedback Created 5 years, 9 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/test/access_token_fetcher.h ('k') | remoting/test/app_remoting_connected_client_fixture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/access_token_fetcher.cc
diff --git a/remoting/test/access_token_fetcher.cc b/remoting/test/access_token_fetcher.cc
index 5fc36efb701ad0fc264bc2fd8e8738fc308fdc27..8f3406e00be1396ab18cf287620c91ae2170fb11 100644
--- a/remoting/test/access_token_fetcher.cc
+++ b/remoting/test/access_token_fetcher.cc
@@ -21,26 +21,6 @@ const int kMaxGetTokensRetries = 3;
const char kOauthRedirectUrl[] =
"https://chromoting-oauth.talkgadget."
"google.com/talkgadget/oauth/chrome-remote-desktop/dev";
-
-// Factory function used to initialize our scope vector below, this is needed
-// because initializer lists are only supported on C++11 compilers.
-const std::vector<std::string> MakeAppRemotingScopeVector() {
- std::vector<std::string> app_remoting_scopes;
-
- // Populate the vector with the required permissions for app remoting.
- app_remoting_scopes.push_back(
- "https://www.googleapis.com/auth/appremoting.runapplication");
- app_remoting_scopes.push_back("https://www.googleapis.com/auth/googletalk");
- app_remoting_scopes.push_back(
- "https://www.googleapis.com/auth/userinfo.email");
- app_remoting_scopes.push_back("https://docs.google.com/feeds");
- app_remoting_scopes.push_back("https://www.googleapis.com/auth/drive");
-
- return app_remoting_scopes;
-}
-
-const std::vector<std::string> kAppRemotingScopeVector =
- MakeAppRemotingScopeVector();
} // namespace
namespace remoting {
@@ -93,7 +73,7 @@ void AccessTokenFetcher::GetAccessTokenFromRefreshToken(
auth_client_->RefreshToken(
oauth_client_info_,
refresh_token_,
- kAppRemotingScopeVector,
+ std::vector<std::string>(), // scopes
kMaxGetTokensRetries,
this); // GaiaOAuthClient::Delegate* delegate
}
@@ -162,7 +142,6 @@ void AccessTokenFetcher::OnGetTokenInfoResponse(
token_info->GetString("error_description", &error_description);
LOG(ERROR) << "OnGetTokenInfoResponse returned an error. "
- << ", "
<< "error: " << error_string << ", "
<< "description: " << error_description;
access_token_.clear();
« no previous file with comments | « remoting/test/access_token_fetcher.h ('k') | remoting/test/app_remoting_connected_client_fixture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698