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

Unified Diff: net/url_request/url_request_job.h

Issue 3012001: Move implementation from header to source. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: blank line Created 10 years, 5 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
Index: net/url_request/url_request_job.h
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h
index c0916e80f55e5f8127480c5bb4419f1efb68db8d..617bbf9500a5b95db8881790538a3f2f188111b0 100644
--- a/net/url_request/url_request_job.h
+++ b/net/url_request/url_request_job.h
@@ -51,10 +51,10 @@ class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob>,
// Sets the upload data, most requests have no upload data, so this is a NOP.
// Job types supporting upload data will override this.
- virtual void SetUpload(net::UploadData* upload) { }
+ virtual void SetUpload(net::UploadData* upload);
// Sets extra request headers for Job types that support request headers.
- virtual void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) {}
+ virtual void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers);
// If any error occurs while starting the Job, NotifyStartError should be
// called.
@@ -98,26 +98,24 @@ class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob>,
virtual void StopCaching();
// Called to fetch the current load state for the job.
- virtual net::LoadState GetLoadState() const { return net::LOAD_STATE_IDLE; }
+ virtual net::LoadState GetLoadState() const;
// Called to get the upload progress in bytes.
- virtual uint64 GetUploadProgress() const { return 0; }
+ virtual uint64 GetUploadProgress() const;
// Called to fetch the charset for this request. Only makes sense for some
// types of requests. Returns true on success. Calling this on a type that
// doesn't have a charset will return false.
- virtual bool GetCharset(std::string* charset) { return false; }
+ virtual bool GetCharset(std::string* charset);
// Called to get response info.
- virtual void GetResponseInfo(net::HttpResponseInfo* info) {}
+ virtual void GetResponseInfo(net::HttpResponseInfo* info);
// Returns the cookie values included in the response, if applicable.
// Returns true if applicable.
// NOTE: This removes the cookies from the job, so it will only return
// useful results once per job.
- virtual bool GetResponseCookies(std::vector<std::string>* cookies) {
- return false;
- }
+ virtual bool GetResponseCookies(std::vector<std::string>* cookies);
// Called to fetch the encoding types for this request. Only makes sense for
// some types of requests. Returns true on success. Calling this on a request
@@ -130,16 +128,14 @@ class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob>,
// in the reverse order (in the above example, ungzip first, and then sdch
// expand).
virtual bool GetContentEncodings(
- std::vector<Filter::FilterType>* encoding_types) {
- return false;
- }
+ std::vector<Filter::FilterType>* encoding_types);
// Find out if this is a download.
virtual bool IsDownload() const;
// Find out if this is a response to a request that advertised an SDCH
// dictionary. Only makes sense for some types of requests.
- virtual bool IsSdchResponse() const { return false; }
+ virtual bool IsSdchResponse() const;
// Called to setup stream filter for this request. An example of filter is
// content encoding/decoding.
@@ -162,14 +158,12 @@ class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob>,
// location. This may be used to implement protocol-specific restrictions.
// If this function returns false, then the URLRequest will fail reporting
// net::ERR_UNSAFE_REDIRECT.
- virtual bool IsSafeRedirect(const GURL& location) {
- return true;
- }
+ virtual bool IsSafeRedirect(const GURL& location);
// Called to determine if this response is asking for authentication. Only
// makes sense for some types of requests. The caller is responsible for
// obtaining the credentials passing them to SetAuth.
- virtual bool NeedsAuth() { return false; }
+ virtual bool NeedsAuth();
// Fills the authentication info with the server's response.
virtual void GetAuthChallengeInfo(
@@ -212,13 +206,13 @@ class URLRequestJob : public base::RefCountedThreadSafe<URLRequestJob>,
// FilterContext methods:
// These methods are not applicable to all connections.
- virtual bool GetMimeType(std::string* mime_type) const { return false; }
+ virtual bool GetMimeType(std::string* mime_type) const;
virtual bool GetURL(GURL* gurl) const;
virtual base::Time GetRequestTime() const;
- virtual bool IsCachedContent() const { return false; }
+ virtual bool IsCachedContent() const;
virtual int64 GetByteReadCount() const;
- virtual int GetResponseCode() const { return -1; }
- virtual int GetInputStreamBufferSize() const { return kFilterBufSize; }
+ virtual int GetResponseCode() const;
+ virtual int GetInputStreamBufferSize() const;
virtual void RecordPacketStats(StatisticSelector statistic) const;
protected:
« base/tracked.h ('K') | « net/base/filter.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698