diff options
author | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-27 20:43:33 +0000 |
---|---|---|
committer | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-27 20:43:33 +0000 |
commit | e1acf6f902e50222baf99bfb492ecc38a1604975 (patch) | |
tree | 503d45705b14be7e2f1ed86c71d6064abbf90fbe /net/http | |
parent | a2f5993e1ce940e8a8eec900abaeed02e2eee09b (diff) | |
download | chromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.zip chromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.tar.gz chromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.tar.bz2 |
Move Time, TimeDelta and TimeTicks into namespace base.
Review URL: http://codereview.chromium.org/7995
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_cache.cc | 2 | ||||
-rw-r--r-- | net/http/http_cache_unittest.cc | 2 | ||||
-rw-r--r-- | net/http/http_network_transaction.cc | 2 | ||||
-rw-r--r-- | net/http/http_response_headers.cc | 3 | ||||
-rw-r--r-- | net/http/http_response_headers.h | 30 | ||||
-rw-r--r-- | net/http/http_response_headers_unittest.cc | 1 | ||||
-rw-r--r-- | net/http/http_response_info.h | 4 | ||||
-rw-r--r-- | net/http/http_transaction_unittest.h | 4 | ||||
-rw-r--r-- | net/http/http_transaction_winhttp.cc | 2 |
9 files changed, 32 insertions, 18 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc index 10fa6b0..4c00738 100644 --- a/net/http/http_cache.cc +++ b/net/http/http_cache.cc @@ -21,6 +21,8 @@ #include "net/http/http_transaction.h" #include "net/http/http_util.h" +using base::Time; + namespace net { // disk cache entry data indices. diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc index b715aa6..92ac6ca 100644 --- a/net/http/http_cache_unittest.cc +++ b/net/http/http_cache_unittest.cc @@ -16,6 +16,8 @@ #include "net/http/http_transaction_unittest.h" #include "testing/gtest/include/gtest/gtest.h" +using base::Time; + namespace { //----------------------------------------------------------------------------- diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 5ef592a..cad17af 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -28,6 +28,8 @@ // + pre-emptive authorization // + use the username/password encoded in the URL. +using base::Time; + namespace net { //----------------------------------------------------------------------------- diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc index 1a7ea57..8c80c49 100644 --- a/net/http/http_response_headers.cc +++ b/net/http/http_response_headers.cc @@ -18,6 +18,9 @@ #include "net/base/escape.h" #include "net/http/http_util.h" +using base::Time; +using base::TimeDelta; + namespace net { //----------------------------------------------------------------------------- diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h index feba262..3edb070 100644 --- a/net/http/http_response_headers.h +++ b/net/http/http_response_headers.h @@ -14,8 +14,11 @@ #include "net/http/http_version.h" class Pickle; + +namespace base { class Time; class TimeDelta; +} namespace net { @@ -150,33 +153,33 @@ class HttpResponseHeaders : // support unit testing. The request_time parameter indicates the time at // which the request was made that resulted in this response, which was // received at response_time. - bool RequiresValidation(const Time& request_time, - const Time& response_time, - const Time& current_time) const; + bool RequiresValidation(const base::Time& request_time, + const base::Time& response_time, + const base::Time& current_time) const; // Returns the amount of time the server claims the response is fresh from // the time the response was generated. See section 13.2.4 of RFC 2616. See // RequiresValidation for a description of the response_time parameter. - TimeDelta GetFreshnessLifetime(const Time& response_time) const; + base::TimeDelta GetFreshnessLifetime(const base::Time& response_time) const; // Returns the age of the response. See section 13.2.3 of RFC 2616. // See RequiresValidation for a description of this method's parameters. - TimeDelta GetCurrentAge(const Time& request_time, - const Time& response_time, - const Time& current_time) const; + base::TimeDelta GetCurrentAge(const base::Time& request_time, + const base::Time& response_time, + const base::Time& current_time) const; // The following methods extract values from the response headers. If a // value is not present, then false is returned. Otherwise, true is returned // and the out param is assigned to the corresponding value. - bool GetMaxAgeValue(TimeDelta* value) const; - bool GetAgeValue(TimeDelta* value) const; - bool GetDateValue(Time* value) const; - bool GetLastModifiedValue(Time* value) const; - bool GetExpiresValue(Time* value) const; + bool GetMaxAgeValue(base::TimeDelta* value) const; + bool GetAgeValue(base::TimeDelta* value) const; + bool GetDateValue(base::Time* value) const; + bool GetLastModifiedValue(base::Time* value) const; + bool GetExpiresValue(base::Time* value) const; // Extracts the time value of a particular header. This method looks for the // first matching header value and parses its value as a HTTP-date. - bool GetTimeValuedHeader(const std::string& name, Time* result) const; + bool GetTimeValuedHeader(const std::string& name, base::Time* result) const; // Determines if this response indicates a keep-alive connection. bool IsKeepAlive() const; @@ -284,4 +287,3 @@ class HttpResponseHeaders : } // namespace net #endif // NET_HTTP_RESPONSE_HEADERS_H_ - diff --git a/net/http/http_response_headers_unittest.cc b/net/http/http_response_headers_unittest.cc index df3add4..fa5cbaa 100644 --- a/net/http/http_response_headers_unittest.cc +++ b/net/http/http_response_headers_unittest.cc @@ -11,6 +11,7 @@ #include "testing/gtest/include/gtest/gtest.h" using namespace std; +using base::Time; using net::HttpResponseHeaders; using net::HttpVersion; diff --git a/net/http/http_response_info.h b/net/http/http_response_info.h index ee0767f..80defef 100644 --- a/net/http/http_response_info.h +++ b/net/http/http_response_info.h @@ -17,11 +17,11 @@ class HttpResponseInfo { public: // The time at which the request was made that resulted in this response. // For cached responses, this time could be "far" in the past. - Time request_time; + base::Time request_time; // The time at which the response headers were received. For cached // responses, this time could be "far" in the past. - Time response_time; + base::Time response_time; // If the response headers indicate a 401 or 407 failure, then this structure // will contain additional information about the authentication challenge. diff --git a/net/http/http_transaction_unittest.h b/net/http/http_transaction_unittest.h index 0b8a1c9..93f76c7 100644 --- a/net/http/http_transaction_unittest.h +++ b/net/http/http_transaction_unittest.h @@ -211,8 +211,8 @@ class MockNetworkTransaction : public net::HttpTransaction { StringPrintf("%s\n%s\n", resp_status.c_str(), resp_headers.c_str()); std::replace(header_data.begin(), header_data.end(), '\n', '\0'); - response_.request_time = Time::Now(); - response_.response_time = Time::Now(); + response_.request_time = base::Time::Now(); + response_.response_time = base::Time::Now(); response_.headers = new net::HttpResponseHeaders(header_data); response_.ssl_info.cert_status = t->cert_status; data_ = resp_data; diff --git a/net/http/http_transaction_winhttp.cc b/net/http/http_transaction_winhttp.cc index 550f32a..0dfb9db 100644 --- a/net/http/http_transaction_winhttp.cc +++ b/net/http/http_transaction_winhttp.cc @@ -29,6 +29,8 @@ #pragma comment(lib, "winhttp.lib") #pragma warning(disable: 4355) +using base::Time; + namespace net { static int TranslateOSError(DWORD error) { |