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

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

Issue 454623002: Send privet auth token in PrivetV3 mode instead of X-Privet token (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « chrome/browser/local_discovery/privet_http.h ('k') | chrome/browser/local_discovery/privet_url_fetcher.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.h
diff --git a/chrome/browser/local_discovery/privet_url_fetcher.h b/chrome/browser/local_discovery/privet_url_fetcher.h
index 5b2b80ca28733bcbe2042e098ecb5260f8e4ce19..698ca09208d151afd010c7ecfb10efc43c5db098 100644
--- a/chrome/browser/local_discovery/privet_url_fetcher.h
+++ b/chrome/browser/local_discovery/privet_url_fetcher.h
@@ -42,11 +42,15 @@ class PrivetURLFetcher : public net::URLFetcherDelegate {
public:
virtual ~Delegate() {}
- // If you do not implement this method, you will always get a
- // TOKEN_ERROR error when your token is invalid.
+ // If you do not implement this method for PrivetV1 callers, you will always
+ // get a TOKEN_ERROR error when your token is invalid.
virtual void OnNeedPrivetToken(
PrivetURLFetcher* fetcher,
const TokenCallback& callback);
+
+ // If this returns the empty string, will not send an auth token.
+ virtual std::string GetAuthToken();
+
virtual void OnError(PrivetURLFetcher* fetcher, ErrorType error) = 0;
virtual void OnParsedJson(PrivetURLFetcher* fetcher,
const base::DictionaryValue& value,
@@ -81,6 +85,8 @@ class PrivetURLFetcher : public net::URLFetcherDelegate {
void SendEmptyPrivetToken();
+ void V3Mode();
+
// Set the contents of the Range header. |OnRawData| must return true if this
// is called.
void SetByteRange(int start, int end);
@@ -121,6 +127,7 @@ class PrivetURLFetcher : public net::URLFetcherDelegate {
bool send_empty_privet_token_;
bool has_byte_range_;
bool make_response_file_;
+ bool v3_mode_;
int byte_range_start_;
int byte_range_end_;
« no previous file with comments | « chrome/browser/local_discovery/privet_http.h ('k') | chrome/browser/local_discovery/privet_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698