| 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 2ab0774eb64249fbbff2465a10a15646eadcb63e..24b58c91b55822e5fa292f1a972c1f988f0d0fd7 100644
|
| --- a/chrome/browser/chromeos/arc/arc_auth_code_fetcher.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_auth_code_fetcher.cc
|
| @@ -38,19 +38,19 @@ 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(
|
| ArcAuthCodeFetcherDelegate* delegate,
|
| net::URLRequestContextGetter* request_context_getter,
|
| - Profile* profile,
|
| - const std::string& auth_endpoint)
|
| + Profile* profile)
|
| : OAuth2TokenService::Consumer(kConsumerName),
|
| delegate_(delegate),
|
| request_context_getter_(request_context_getter),
|
| - profile_(profile),
|
| - auth_endpoint_(auth_endpoint) {
|
| + profile_(profile) {
|
| // Get token service and account ID to fetch auth tokens.
|
| ProfileOAuth2TokenService* const token_service =
|
| ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
|
| @@ -86,9 +86,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 |
|
|
|