| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/basictypes.h" | |
| 14 #include "base/debug/leak_tracker.h" | 13 #include "base/debug/leak_tracker.h" |
| 15 #include "base/linked_ptr.h" | 14 #include "base/linked_ptr.h" |
| 15 #include "base/logging.h" |
| 16 #include "base/non_thread_safe.h" | 16 #include "base/non_thread_safe.h" |
| 17 #include "base/ref_counted.h" | 17 #include "base/ref_counted.h" |
| 18 #include "base/string16.h" | 18 #include "base/string16.h" |
| 19 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
| 20 #include "net/base/load_states.h" | 20 #include "net/base/load_states.h" |
| 21 #include "net/base/net_log.h" | 21 #include "net/base/net_log.h" |
| 22 #include "net/base/request_priority.h" | 22 #include "net/base/request_priority.h" |
| 23 #include "net/http/http_request_headers.h" | 23 #include "net/http/http_request_headers.h" |
| 24 #include "net/http/http_response_info.h" | 24 #include "net/http/http_response_info.h" |
| 25 #include "net/url_request/url_request_status.h" | 25 #include "net/url_request/url_request_status.h" |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 URLRequestContext* context(); | 528 URLRequestContext* context(); |
| 529 void set_context(URLRequestContext* context); | 529 void set_context(URLRequestContext* context); |
| 530 | 530 |
| 531 const net::BoundNetLog& net_log() const { return net_log_; } | 531 const net::BoundNetLog& net_log() const { return net_log_; } |
| 532 | 532 |
| 533 // Returns the expected content size if available | 533 // Returns the expected content size if available |
| 534 int64 GetExpectedContentSize() const; | 534 int64 GetExpectedContentSize() const; |
| 535 | 535 |
| 536 // Returns the priority level for this request. | 536 // Returns the priority level for this request. |
| 537 net::RequestPriority priority() const { return priority_; } | 537 net::RequestPriority priority() const { return priority_; } |
| 538 void set_priority(net::RequestPriority priority); | 538 void set_priority(net::RequestPriority priority) { |
| 539 DCHECK_GE(priority, net::HIGHEST); |
| 540 DCHECK_LT(priority, net::NUM_PRIORITIES); |
| 541 priority_ = priority; |
| 542 } |
| 539 | 543 |
| 540 #ifdef UNIT_TEST | 544 #ifdef UNIT_TEST |
| 541 URLRequestJob* job() { return job_; } | 545 URLRequestJob* job() { return job_; } |
| 542 #endif | 546 #endif |
| 543 | 547 |
| 544 protected: | 548 protected: |
| 545 // Allow the URLRequestJob class to control the is_pending() flag. | 549 // Allow the URLRequestJob class to control the is_pending() flag. |
| 546 void set_is_pending(bool value) { is_pending_ = value; } | 550 void set_is_pending(bool value) { is_pending_ = value; } |
| 547 | 551 |
| 548 // Allow the URLRequestJob class to set our status too | 552 // Allow the URLRequestJob class to set our status too |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 base::debug::LeakTracker<URLRequest> leak_tracker_; | 642 base::debug::LeakTracker<URLRequest> leak_tracker_; |
| 639 | 643 |
| 640 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 644 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 641 }; | 645 }; |
| 642 | 646 |
| 643 } // namespace net | 647 } // namespace net |
| 644 | 648 |
| 645 typedef net::URLRequest URLRequest; | 649 typedef net::URLRequest URLRequest; |
| 646 | 650 |
| 647 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 651 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |