| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "net/url_request/url_request.h" | 5 #include "net/url_request/url_request.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
| 9 #include "base/singleton.h" | 9 #include "base/singleton.h" |
| 10 #include "base/stats_counters.h" | 10 #include "base/stats_counters.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 URLRequest::URLRequest(const GURL& url, Delegate* delegate) | 40 URLRequest::URLRequest(const GURL& url, Delegate* delegate) |
| 41 : url_(url), | 41 : url_(url), |
| 42 original_url_(url), | 42 original_url_(url), |
| 43 method_("GET"), | 43 method_("GET"), |
| 44 load_flags_(net::LOAD_NORMAL), | 44 load_flags_(net::LOAD_NORMAL), |
| 45 delegate_(delegate), | 45 delegate_(delegate), |
| 46 is_pending_(false), | 46 is_pending_(false), |
| 47 user_data_(NULL), | 47 user_data_(NULL), |
| 48 enable_profiling_(false), | 48 enable_profiling_(false), |
| 49 redirect_limit_(kMaxRedirects), | 49 redirect_limit_(kMaxRedirects), |
| 50 final_upload_progress_(0) { | 50 final_upload_progress_(0), |
| 51 priority_(0) { |
| 51 URLREQUEST_COUNT_CTOR(); | 52 URLREQUEST_COUNT_CTOR(); |
| 52 SIMPLE_STATS_COUNTER("URLRequestCount"); | 53 SIMPLE_STATS_COUNTER("URLRequestCount"); |
| 53 origin_pid_ = base::GetCurrentProcId(); | 54 origin_pid_ = base::GetCurrentProcId(); |
| 54 | 55 |
| 55 // Sanity check out environment. | 56 // Sanity check out environment. |
| 56 DCHECK(MessageLoop::current()) << | 57 DCHECK(MessageLoop::current()) << |
| 57 "The current MessageLoop must exist"; | 58 "The current MessageLoop must exist"; |
| 58 DCHECK_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type()) << | 59 DCHECK_EQ(MessageLoop::TYPE_IO, MessageLoop::current()->type()) << |
| 59 "The current MessageLoop must be TYPE_IO"; | 60 "The current MessageLoop must be TYPE_IO"; |
| 60 } | 61 } |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 } | 441 } |
| 441 | 442 |
| 442 #ifndef NDEBUG | 443 #ifndef NDEBUG |
| 443 | 444 |
| 444 URLRequestMetrics::~URLRequestMetrics() { | 445 URLRequestMetrics::~URLRequestMetrics() { |
| 445 DLOG_IF(WARNING, object_count != 0) << | 446 DLOG_IF(WARNING, object_count != 0) << |
| 446 "Leaking " << object_count << " URLRequest object(s)"; | 447 "Leaking " << object_count << " URLRequest object(s)"; |
| 447 } | 448 } |
| 448 | 449 |
| 449 #endif | 450 #endif |
| OLD | NEW |