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

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

Issue 42541: Prioritize which HTTP requests get a socket first by adding a priority level ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months 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 | « net/url_request/url_request.h ('k') | net/url_request/url_request_http_job.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) 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
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
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
OLDNEW
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698