OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
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/macros.h" |
15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
16 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
17 #include "base/supports_user_data.h" | 18 #include "base/supports_user_data.h" |
18 #include "base/threading/non_thread_safe.h" | 19 #include "base/threading/non_thread_safe.h" |
19 #include "base/time/time.h" | 20 #include "base/time/time.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/load_timing_info.h" | 24 #include "net/base/load_timing_info.h" |
24 #include "net/base/net_error_details.h" | 25 #include "net/base/net_error_details.h" |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 bool is_pending() const { return is_pending_; } | 515 bool is_pending() const { return is_pending_; } |
515 | 516 |
516 // Returns true if the request is in the process of redirecting to a new | 517 // Returns true if the request is in the process of redirecting to a new |
517 // URL but has not yet initiated the new request. | 518 // URL but has not yet initiated the new request. |
518 bool is_redirecting() const { return is_redirecting_; } | 519 bool is_redirecting() const { return is_redirecting_; } |
519 | 520 |
520 // Returns the error status of the request. | 521 // Returns the error status of the request. |
521 const URLRequestStatus& status() const { return status_; } | 522 const URLRequestStatus& status() const { return status_; } |
522 | 523 |
523 // Returns a globally unique identifier for this request. | 524 // Returns a globally unique identifier for this request. |
524 uint64 identifier() const { return identifier_; } | 525 uint64_t identifier() const { return identifier_; } |
525 | 526 |
526 // This method is called to start the request. The delegate will receive | 527 // This method is called to start the request. The delegate will receive |
527 // a OnResponseStarted callback when the request is started. The request | 528 // a OnResponseStarted callback when the request is started. The request |
528 // must have a delegate set before this method is called. | 529 // must have a delegate set before this method is called. |
529 void Start(); | 530 void Start(); |
530 | 531 |
531 // This method may be called at any time after Start() has been called to | 532 // This method may be called at any time after Start() has been called to |
532 // cancel the request. This method may be called many times, and it has | 533 // cancel the request. This method may be called many times, and it has |
533 // no effect once the response has completed. It is guaranteed that no | 534 // no effect once the response has completed. It is guaranteed that no |
534 // methods of the delegate will be called after the request has been | 535 // methods of the delegate will be called after the request has been |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 HostPortPair proxy_server_; | 861 HostPortPair proxy_server_; |
861 | 862 |
862 scoped_ptr<const base::debug::StackTrace> stack_trace_; | 863 scoped_ptr<const base::debug::StackTrace> stack_trace_; |
863 | 864 |
864 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 865 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
865 }; | 866 }; |
866 | 867 |
867 } // namespace net | 868 } // namespace net |
868 | 869 |
869 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 870 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |