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

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

Issue 10825073: Stop using ScopedAllowIO in content::ResourceDispatcherHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Chrome Frame fix Created 8 years, 4 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
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 URLRequestJob* URLRequest::Interceptor::MaybeInterceptResponse( 102 URLRequestJob* URLRequest::Interceptor::MaybeInterceptResponse(
103 URLRequest* request) { 103 URLRequest* request) {
104 return NULL; 104 return NULL;
105 } 105 }
106 106
107 /////////////////////////////////////////////////////////////////////////////// 107 ///////////////////////////////////////////////////////////////////////////////
108 // URLRequest::Delegate 108 // URLRequest::Delegate
109 109
110 void URLRequest::Delegate::OnRequestBodyInitialized(URLRequest* request,
111 uint64 size) {
112 }
113
110 void URLRequest::Delegate::OnReceivedRedirect(URLRequest* request, 114 void URLRequest::Delegate::OnReceivedRedirect(URLRequest* request,
111 const GURL& new_url, 115 const GURL& new_url,
112 bool* defer_redirect) { 116 bool* defer_redirect) {
113 } 117 }
114 118
115 void URLRequest::Delegate::OnAuthRequired(URLRequest* request, 119 void URLRequest::Delegate::OnAuthRequired(URLRequest* request,
116 AuthChallengeInfo* auth_info) { 120 AuthChallengeInfo* auth_info) {
117 request->CancelAuth(); 121 request->CancelAuth();
118 } 122 }
119 123
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 url_canon::Replacements<char> replacements; 781 url_canon::Replacements<char> replacements;
778 const char kNewScheme[] = "https"; 782 const char kNewScheme[] = "https";
779 replacements.SetScheme(kNewScheme, 783 replacements.SetScheme(kNewScheme,
780 url_parse::Component(0, strlen(kNewScheme))); 784 url_parse::Component(0, strlen(kNewScheme)));
781 *redirect_url = url.ReplaceComponents(replacements); 785 *redirect_url = url.ReplaceComponents(replacements);
782 return true; 786 return true;
783 } 787 }
784 return false; 788 return false;
785 } 789 }
786 790
791 void URLRequest::NotifyRequestBodyInitialized(uint64 size) {
792 if (delegate_)
793 delegate_->OnRequestBodyInitialized(this, size);
794 }
795
787 void URLRequest::NotifyAuthRequired(AuthChallengeInfo* auth_info) { 796 void URLRequest::NotifyAuthRequired(AuthChallengeInfo* auth_info) {
788 NetworkDelegate::AuthRequiredResponse rv = 797 NetworkDelegate::AuthRequiredResponse rv =
789 NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; 798 NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
790 auth_info_ = auth_info; 799 auth_info_ = auth_info;
791 if (context_ && context_->network_delegate()) { 800 if (context_ && context_->network_delegate()) {
792 rv = context_->network_delegate()->NotifyAuthRequired( 801 rv = context_->network_delegate()->NotifyAuthRequired(
793 this, 802 this,
794 *auth_info, 803 *auth_info,
795 base::Bind(&URLRequest::NotifyAuthRequiredComplete, 804 base::Bind(&URLRequest::NotifyAuthRequiredComplete,
796 base::Unretained(this)), 805 base::Unretained(this)),
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 new base::debug::StackTrace(NULL, 0); 924 new base::debug::StackTrace(NULL, 0);
916 *stack_trace_copy = stack_trace; 925 *stack_trace_copy = stack_trace;
917 stack_trace_.reset(stack_trace_copy); 926 stack_trace_.reset(stack_trace_copy);
918 } 927 }
919 928
920 const base::debug::StackTrace* URLRequest::stack_trace() const { 929 const base::debug::StackTrace* URLRequest::stack_trace() const {
921 return stack_trace_.get(); 930 return stack_trace_.get();
922 } 931 }
923 932
924 } // namespace net 933 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698