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

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

Issue 12701011: [Net] Propagate priority changes from URLRequest to HttpTransaction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
OLDNEW
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 #include "net/url_request/url_request.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 } 821 }
822 822
823 int64 URLRequest::GetExpectedContentSize() const { 823 int64 URLRequest::GetExpectedContentSize() const {
824 int64 expected_content_size = -1; 824 int64 expected_content_size = -1;
825 if (job_) 825 if (job_)
826 expected_content_size = job_->expected_content_size(); 826 expected_content_size = job_->expected_content_size();
827 827
828 return expected_content_size; 828 return expected_content_size;
829 } 829 }
830 830
831 void URLRequest::SetPriority(RequestPriority priority) {
832 DCHECK_GE(priority, MINIMUM_PRIORITY);
833 DCHECK_LT(priority, NUM_PRIORITIES);
mmenke 2013/03/12 18:40:22 if priority matches priority_, should we abort ear
akalin 2013/03/12 22:08:28 Done.
834 priority_ = priority;
835 if (job_) {
836 net_log_.AddEvent(NetLog::TYPE_URL_REQUEST_SET_PRIORITY,
837 NetLog::IntegerCallback("priority", priority_));
838 job_->SetPriority(priority_);
839 }
840 }
841
831 bool URLRequest::GetHSTSRedirect(GURL* redirect_url) const { 842 bool URLRequest::GetHSTSRedirect(GURL* redirect_url) const {
832 const GURL& url = this->url(); 843 const GURL& url = this->url();
833 if (!url.SchemeIs("http")) 844 if (!url.SchemeIs("http"))
834 return false; 845 return false;
835 TransportSecurityState::DomainState domain_state; 846 TransportSecurityState::DomainState domain_state;
836 if (context()->transport_security_state() && 847 if (context()->transport_security_state() &&
837 context()->transport_security_state()->GetDomainState( 848 context()->transport_security_state()->GetDomainState(
838 url.host(), 849 url.host(),
839 SSLConfigService::IsSNIAvailable(context()->ssl_config_service()), 850 SSLConfigService::IsSNIAvailable(context()->ssl_config_service()),
840 &domain_state) && 851 &domain_state) &&
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 new base::debug::StackTrace(NULL, 0); 1009 new base::debug::StackTrace(NULL, 0);
999 *stack_trace_copy = stack_trace; 1010 *stack_trace_copy = stack_trace;
1000 stack_trace_.reset(stack_trace_copy); 1011 stack_trace_.reset(stack_trace_copy);
1001 } 1012 }
1002 1013
1003 const base::debug::StackTrace* URLRequest::stack_trace() const { 1014 const base::debug::StackTrace* URLRequest::stack_trace() const {
1004 return stack_trace_.get(); 1015 return stack_trace_.get();
1005 } 1016 }
1006 1017
1007 } // namespace net 1018 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698