| Index: chrome/service/cloud_print/cloud_print_url_fetcher.h
|
| ===================================================================
|
| --- chrome/service/cloud_print/cloud_print_url_fetcher.h (revision 104911)
|
| +++ chrome/service/cloud_print/cloud_print_url_fetcher.h (working copy)
|
| @@ -35,6 +35,7 @@
|
| STOP_PROCESSING,
|
| RETRY_REQUEST,
|
| };
|
| +
|
| class Delegate {
|
| public:
|
| virtual ~Delegate() { }
|
| @@ -77,10 +78,20 @@
|
| virtual void OnRequestGiveUp() { }
|
| // Invoked when the request returns a 403 error (applicable only when
|
| // HandleRawResponse returns CONTINUE_PROCESSING).
|
| - virtual void OnRequestAuthError() = 0;
|
| + // Returning RETRY_REQUEST will retry current request. (auth information
|
| + // may have been updated and new info is available through the
|
| + // Authenticator interface).
|
| + // Returning CONTINUE_PROCESSING will treat auth error as a netwrok error.
|
| + virtual ResponseAction OnRequestAuthError() = 0;
|
| +
|
| + // Authentication information may change between retries.
|
| + // CloudPrintURLFetcher will request auth info before sending any request.
|
| + virtual std::string GetAuthHeader() = 0;
|
| };
|
| CloudPrintURLFetcher();
|
|
|
| + bool IsSameRequest(const URLFetcher* source);
|
| +
|
| void StartGetRequest(const GURL& url,
|
| Delegate* delegate,
|
| int max_retries,
|
|
|