| Index: chrome/browser/interests/interests_fetcher.cc
|
| diff --git a/chrome/browser/interests/interests_fetcher.cc b/chrome/browser/interests/interests_fetcher.cc
|
| index 40fa204fae5ce5d4a0468f8606cb0b61f1d6da7f..ee18eacf1dab700aeb4d7eabdeb1ffe84f6a189c 100644
|
| --- a/chrome/browser/interests/interests_fetcher.cc
|
| +++ b/chrome/browser/interests/interests_fetcher.cc
|
| @@ -88,7 +88,7 @@ void InterestsFetcher::FetchInterests(
|
| void InterestsFetcher::OnURLFetchComplete(const net::URLFetcher* source) {
|
| const net::URLRequestStatus& status = source->GetStatus();
|
| if (!status.is_success()) {
|
| - VLOG(2) << "Network error " << status.error();
|
| + DLOG(WARNING) << "Network error " << status.error();
|
| callback_.Run(nullptr);
|
| return;
|
| }
|
| @@ -96,6 +96,7 @@ void InterestsFetcher::OnURLFetchComplete(const net::URLFetcher* source) {
|
| int response_code = source->GetResponseCode();
|
| // If we get an authorization error, refresh token and retry once.
|
| if (response_code == net::HTTP_UNAUTHORIZED && !access_token_expired_) {
|
| + DLOG(WARNING) << "Authorization error.";
|
| access_token_expired_ = true;
|
| token_service_->InvalidateAccessToken(account_id_,
|
| GetApiScopes(),
|
| @@ -105,7 +106,7 @@ void InterestsFetcher::OnURLFetchComplete(const net::URLFetcher* source) {
|
| }
|
|
|
| if (response_code != net::HTTP_OK) {
|
| - VLOG(2) << "HTTP error " << response_code;
|
| + DLOG(WARNING) << "HTTP error " << response_code;
|
| callback_.Run(nullptr);
|
| return;
|
| }
|
| @@ -128,8 +129,10 @@ void InterestsFetcher::OnGetTokenSuccess(
|
| net::LOAD_DO_NOT_SAVE_COOKIES);
|
| fetcher_->SetAutomaticallyRetryOnNetworkChanges(kNumRetries);
|
|
|
| - fetcher_->AddExtraRequestHeader(
|
| - base::StringPrintf(kAuthorizationHeaderFormat, access_token_.c_str()));
|
| + // TODO(peconn): Activate this when we have a proper server.
|
| + DLOG(WARNING) << "Skipping authorization header";
|
| + // fetcher_->AddExtraRequestHeader(
|
| + // base::StringPrintf(kAuthorizationHeaderFormat, access_token_.c_str()));
|
|
|
| fetcher_->Start();
|
| }
|
| @@ -137,7 +140,7 @@ void InterestsFetcher::OnGetTokenSuccess(
|
| void InterestsFetcher::OnGetTokenFailure(
|
| const OAuth2TokenService::Request* request,
|
| const GoogleServiceAuthError& error) {
|
| - DLOG(WARNING) << error.ToString();
|
| + DLOG(WARNING) << "Failed to get OAuth2 Token: " << error.ToString();
|
|
|
| callback_.Run(nullptr);
|
| }
|
|
|