summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_job.h
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 21:03:54 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 21:03:54 +0000
commit3a3d4747769aec2954a2ca21de4812c5892994aa (patch)
treedb112f2c73cc39e9d6088059eae1fc9d35b74920 /net/url_request/url_request_job.h
parent2235b22b88260fde392b753b5d7bb7904e5efbc6 (diff)
downloadchromium_src-3a3d4747769aec2954a2ca21de4812c5892994aa.zip
chromium_src-3a3d4747769aec2954a2ca21de4812c5892994aa.tar.gz
chromium_src-3a3d4747769aec2954a2ca21de4812c5892994aa.tar.bz2
Move implementation from header to source.
This is an effort to speed up compile and link time, and also minimizing the size of the intermediary .o files on disk. For example, just moving the constructor/destructor from the classes in chrome/browser/pref_member.{cc,h} netted a 368k drop in total .o file size. In aggregate, this shrinks libbrowser.a by 10 megabytes, and a few odd megabytes on most other chrome .a files. A lot of this was done before I started harvesting what the most included symbols were across all of chrome's code. Most of them are in webkit, but there's plenty in base/ that are used everywhere to keep me busy for several patches to come. BUG=none TEST=none Review URL: http://codereview.chromium.org/3012001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52528 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_job.h')
-rw-r--r--net/url_request/url_request_job.h36
1 files changed, 15 insertions, 21 deletions
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h
index c0916e8..617bbf9 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: