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

Unified Diff: chrome/browser/local_discovery/privet_url_fetcher.cc

Issue 878463002: Fixed Privet v3 auth header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patches
Patch Set: Mon 01/26/2015 12:51:10.46 Created 5 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/local_discovery/privet_url_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/local_discovery/privet_url_fetcher.cc
diff --git a/chrome/browser/local_discovery/privet_url_fetcher.cc b/chrome/browser/local_discovery/privet_url_fetcher.cc
index 627278eabcb46c02c0b1e1a326d8d3404647b0a1..a5cc2855e4c886ba12f97f05a17e0ab0b545450d 100644
--- a/chrome/browser/local_discovery/privet_url_fetcher.cc
+++ b/chrome/browser/local_discovery/privet_url_fetcher.cc
@@ -34,7 +34,7 @@ struct TokenMapHolder {
};
const char kXPrivetTokenHeaderPrefix[] = "X-Privet-Token: ";
-const char kXPrivetAuthTokenHeaderPrefix[] = "X-Privet-Auth: ";
+const char kPrivetV3AuthTokenHeaderPrefix[] = "Authorization: ";
const char kRangeHeaderFormat[] = "Range: bytes=%d-%d";
const char kXPrivetEmptyToken[] = "\"\"";
const char kPrivetAuthTokenUnknown[] = "Unknown";
@@ -151,10 +151,9 @@ void PrivetURLFetcher::Try() {
url_fetcher_->SetRequestContext(request_context_.get());
if (v3_mode_) {
- std::string auth_token = delegate_->GetAuthToken();
-
url_fetcher_->AddExtraRequestHeader(
- std::string(kXPrivetAuthTokenHeaderPrefix) + auth_token);
+ std::string(kPrivetV3AuthTokenHeaderPrefix) +
+ delegate_->GetAuthToken());
} else {
std::string token = GetPrivetAccessToken();
« no previous file with comments | « no previous file | chrome/browser/local_discovery/privet_url_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698