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

Unified Diff: chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc

Issue 2695883003: Change uses of base::JoinString to pass StringPieces where possible. (Closed)
Patch Set: Remove dependency CL. Created 3 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: chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc
diff --git a/chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc b/chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc
index b9387b1aa13cab51cb98424e7086e606f2c893a0..99b078dc13ab198f3ba45e877f498b8bdffb7ae5 100644
--- a/chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc
+++ b/chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/api/identity/gaia_web_auth_flow.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -55,9 +56,9 @@ GaiaWebAuthFlow::GaiaWebAuthFlow(Delegate* delegate,
"&device_id=%s&"
"device_type=chrome";
- std::vector<std::string> scopes(token_key->scopes.begin(),
- token_key->scopes.end());
- std::vector<std::string> client_id_parts = base::SplitString(
+ std::vector<base::StringPiece> scopes(token_key->scopes.begin(),
+ token_key->scopes.end());
+ std::vector<base::StringPiece> client_id_parts = base::SplitStringPiece(
oauth2_client_id, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
std::reverse(client_id_parts.begin(), client_id_parts.end());
redirect_scheme_ = base::JoinString(client_id_parts, ".");

Powered by Google App Engine
This is Rietveld 408576698