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

Side by Side Diff: net/url_request/url_request.h

Issue 7602023: Use a monotonic clock (TimeTicks) to report network times to WebCore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync & Merge Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/test/render_view_fake_resources_test.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_
6 #define NET_URL_REQUEST_URL_REQUEST_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/debug/leak_tracker.h" 13 #include "base/debug/leak_tracker.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/memory/linked_ptr.h" 15 #include "base/memory/linked_ptr.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/string16.h" 17 #include "base/string16.h"
18 #include "base/time.h"
18 #include "base/threading/non_thread_safe.h" 19 #include "base/threading/non_thread_safe.h"
19 #include "googleurl/src/gurl.h" 20 #include "googleurl/src/gurl.h"
20 #include "net/base/auth.h" 21 #include "net/base/auth.h"
21 #include "net/base/completion_callback.h" 22 #include "net/base/completion_callback.h"
22 #include "net/base/load_states.h" 23 #include "net/base/load_states.h"
23 #include "net/base/net_export.h" 24 #include "net/base/net_export.h"
24 #include "net/base/net_log.h" 25 #include "net/base/net_log.h"
25 #include "net/base/network_delegate.h" 26 #include "net/base/network_delegate.h"
26 #include "net/base/request_priority.h" 27 #include "net/base/request_priority.h"
27 #include "net/http/http_request_headers.h" 28 #include "net/http/http_request_headers.h"
(...skipping 13 matching lines...) Expand all
41 class NetworkDelayListenerTest; 42 class NetworkDelayListenerTest;
42 43
43 // Temporary layering violation to allow existing users of a deprecated 44 // Temporary layering violation to allow existing users of a deprecated
44 // interface. 45 // interface.
45 namespace appcache { 46 namespace appcache {
46 class AppCacheInterceptor; 47 class AppCacheInterceptor;
47 class AppCacheRequestHandlerTest; 48 class AppCacheRequestHandlerTest;
48 class AppCacheURLRequestJobTest; 49 class AppCacheURLRequestJobTest;
49 } 50 }
50 51
51 namespace base {
52 class Time;
53 } // namespace base
54
55 // Temporary layering violation to allow existing users of a deprecated 52 // Temporary layering violation to allow existing users of a deprecated
56 // interface. 53 // interface.
57 namespace fileapi { 54 namespace fileapi {
58 class FileSystemDirURLRequestJobTest; 55 class FileSystemDirURLRequestJobTest;
59 class FileSystemOperationWriteTest; 56 class FileSystemOperationWriteTest;
60 class FileSystemURLRequestJobTest; 57 class FileSystemURLRequestJobTest;
61 class FileWriterDelegateTest; 58 class FileWriterDelegateTest;
62 } 59 }
63 60
64 // Temporary layering violation to allow existing users of a deprecated 61 // Temporary layering violation to allow existing users of a deprecated
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 // separated by commas (per RFC 2616). This will not work with cookies since 446 // separated by commas (per RFC 2616). This will not work with cookies since
450 // comma can be used in cookie values. 447 // comma can be used in cookie values.
451 // TODO(darin): add API to enumerate response headers. 448 // TODO(darin): add API to enumerate response headers.
452 void GetResponseHeaderById(int header_id, std::string* value); 449 void GetResponseHeaderById(int header_id, std::string* value);
453 void GetResponseHeaderByName(const std::string& name, std::string* value); 450 void GetResponseHeaderByName(const std::string& name, std::string* value);
454 451
455 // Get all response headers, \n-delimited and \n\0-terminated. This includes 452 // Get all response headers, \n-delimited and \n\0-terminated. This includes
456 // the response status line. Restrictions on GetResponseHeaders apply. 453 // the response status line. Restrictions on GetResponseHeaders apply.
457 void GetAllResponseHeaders(std::string* headers); 454 void GetAllResponseHeaders(std::string* headers);
458 455
456 // The time when |this| was constructed.
457 base::TimeTicks creation_time() const { return creation_time_; }
458
459 // The time at which the returned response was requested. For cached 459 // The time at which the returned response was requested. For cached
460 // responses, this is the last time the cache entry was validated. 460 // responses, this is the last time the cache entry was validated.
461 const base::Time& request_time() const { 461 const base::Time& request_time() const {
462 return response_info_.request_time; 462 return response_info_.request_time;
463 } 463 }
464 464
465 // The time at which the returned response was generated. For cached 465 // The time at which the returned response was generated. For cached
466 // responses, this is the last time the cache entry was validated. 466 // responses, this is the last time the cache entry was validated.
467 const base::Time& response_time() const { 467 const base::Time& response_time() const {
468 return response_info_.response_time; 468 return response_info_.response_time;
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 // TODO(battre): Remove this. http://crbug.com/89049 807 // TODO(battre): Remove this. http://crbug.com/89049
808 bool has_notified_completion_; 808 bool has_notified_completion_;
809 809
810 // Authentication data used by the NetworkDelegate for this request, 810 // Authentication data used by the NetworkDelegate for this request,
811 // if one is present. |auth_credentials_| may be filled in when calling 811 // if one is present. |auth_credentials_| may be filled in when calling
812 // |NotifyAuthRequired| on the NetworkDelegate. |auth_info_| holds 812 // |NotifyAuthRequired| on the NetworkDelegate. |auth_info_| holds
813 // the authentication challenge being handled by |NotifyAuthRequired|. 813 // the authentication challenge being handled by |NotifyAuthRequired|.
814 AuthCredentials auth_credentials_; 814 AuthCredentials auth_credentials_;
815 scoped_refptr<AuthChallengeInfo> auth_info_; 815 scoped_refptr<AuthChallengeInfo> auth_info_;
816 816
817 base::TimeTicks creation_time_;
818
817 DISALLOW_COPY_AND_ASSIGN(URLRequest); 819 DISALLOW_COPY_AND_ASSIGN(URLRequest);
818 }; 820 };
819 821
820 } // namespace net 822 } // namespace net
821 823
822 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 824 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « content/test/render_view_fake_resources_test.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698