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

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 Wez's 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
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..c4111d2d7913e46a8676cc5394d3e86144727270 100644
--- a/remoting/test/access_token_fetcher.cc
+++ b/remoting/test/access_token_fetcher.cc
@@ -22,8 +22,7 @@ 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.
+// Factory function used to initialize an app remoting scope vector.
Wez 2015/03/21 00:14:01 nit: This is confusing since it almost reads like
joedow 2015/03/21 01:23:59 Removed since it wasn't needed : )
const std::vector<std::string> MakeAppRemotingScopeVector() {
std::vector<std::string> app_remoting_scopes;
@@ -38,9 +37,6 @@ const std::vector<std::string> MakeAppRemotingScopeVector() {
return app_remoting_scopes;
}
-
-const std::vector<std::string> kAppRemotingScopeVector =
- MakeAppRemotingScopeVector();
} // namespace
namespace remoting {
@@ -51,6 +47,8 @@ AccessTokenFetcher::AccessTokenFetcher() {
google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING),
google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING),
kOauthRedirectUrl};
+
+ oauth_scopes_vector_ = MakeAppRemotingScopeVector();
Wez 2015/03/21 00:14:01 Why do you need to save this into a member variabl
joedow 2015/03/21 01:23:59 Acknowledged.
}
AccessTokenFetcher::~AccessTokenFetcher() {}
@@ -93,7 +91,7 @@ void AccessTokenFetcher::GetAccessTokenFromRefreshToken(
auth_client_->RefreshToken(
oauth_client_info_,
refresh_token_,
- kAppRemotingScopeVector,
+ oauth_scopes_vector_,
kMaxGetTokensRetries,
this); // GaiaOAuthClient::Delegate* delegate
}

Powered by Google App Engine
This is Rietveld 408576698