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

Unified Diff: chrome/browser/chromeos/arc/arc_auth_code_fetcher.cc

Issue 2508713003: arc: Prepare ArcAuthEndpoint flag for finch experiment. (Closed)
Patch Set: fix rebase glitch Created 4 years, 1 month 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/chromeos/arc/arc_auth_code_fetcher.cc
diff --git a/chrome/browser/chromeos/arc/arc_auth_code_fetcher.cc b/chrome/browser/chromeos/arc/arc_auth_code_fetcher.cc
index 9d4be8b8e490e985020fa7b328f14ea8b640c242..54e334f9960550d011577ee046cb8fc61f860356 100644
--- a/chrome/browser/chromeos/arc/arc_auth_code_fetcher.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_code_fetcher.cc
@@ -40,16 +40,16 @@ constexpr char kLoginScopedToken[] = "login_scoped_token";
constexpr char kGetAuthCodeHeaders[] =
"Content-Type: application/json; charset=utf-8";
constexpr char kContentTypeJSON[] = "application/json";
+constexpr char kEndPoint[] =
+ "https://www.googleapis.com/oauth2/v4/ExchangeToken";
} // namespace
ArcAuthCodeFetcher::ArcAuthCodeFetcher(Profile* profile,
- ArcAuthContext* context,
- const std::string& auth_endpoint)
+ ArcAuthContext* context)
: OAuth2TokenService::Consumer(kConsumerName),
profile_(profile),
context_(context),
- auth_endpoint_(auth_endpoint),
weak_ptr_factory_(this) {}
ArcAuthCodeFetcher::~ArcAuthCodeFetcher() = default;
@@ -99,9 +99,8 @@ void ArcAuthCodeFetcher::OnGetTokenSuccess(
std::string request_string;
base::JSONWriter::Write(request_data, &request_string);
- DCHECK(!auth_endpoint_.empty());
- auth_code_fetcher_ = net::URLFetcher::Create(0, GURL(auth_endpoint_),
- net::URLFetcher::POST, this);
+ auth_code_fetcher_ =
+ net::URLFetcher::Create(0, GURL(kEndPoint), net::URLFetcher::POST, this);
auth_code_fetcher_->SetRequestContext(request_context_getter_);
auth_code_fetcher_->SetUploadData(kContentTypeJSON, request_string);
auth_code_fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE |
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_code_fetcher.h ('k') | chrome/browser/chromeos/arc/arc_auth_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698