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

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

Issue 10310124: Implement a ResourceThrottle for URL overriding in Chrome on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: incorporated feedback Created 8 years, 6 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
« no previous file with comments | « content/public/browser/web_contents_delegate.cc ('k') | net/url_request/url_request.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) 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 #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 <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 // Cancels the request and sets the error to |error| (see net_error_list.h 530 // Cancels the request and sets the error to |error| (see net_error_list.h
531 // for values). 531 // for values).
532 void CancelWithError(int error); 532 void CancelWithError(int error);
533 533
534 // Cancels the request and sets the error to |error| (see net_error_list.h 534 // Cancels the request and sets the error to |error| (see net_error_list.h
535 // for values) and attaches |ssl_info| as the SSLInfo for that request. This 535 // for values) and attaches |ssl_info| as the SSLInfo for that request. This
536 // is useful to attach a certificate and certificate error to a canceled 536 // is useful to attach a certificate and certificate error to a canceled
537 // request. 537 // request.
538 void CancelWithSSLError(int error, const SSLInfo& ssl_info); 538 void CancelWithSSLError(int error, const SSLInfo& ssl_info);
539 539
540 // Cancels the requests and sets the status to HANDLED_EXTERNALLY.
541 void CancelWithHandledExternallyStatus();
darin (slow to review) 2012/05/29 23:39:32 It looks like this may actually be moving in the w
542
540 // Read initiates an asynchronous read from the response, and must only 543 // Read initiates an asynchronous read from the response, and must only
541 // be called after the OnResponseStarted callback is received with a 544 // be called after the OnResponseStarted callback is received with a
542 // successful status. 545 // successful status.
543 // If data is available, Read will return true, and the data and length will 546 // If data is available, Read will return true, and the data and length will
544 // be returned immediately. If data is not available, Read returns false, 547 // be returned immediately. If data is not available, Read returns false,
545 // and an asynchronous Read is initiated. The Read is finished when 548 // and an asynchronous Read is initiated. The Read is finished when
546 // the caller receives the OnReadComplete callback. Unless the request was 549 // the caller receives the OnReadComplete callback. Unless the request was
547 // cancelled, OnReadComplete will always be called, even if the read failed. 550 // cancelled, OnReadComplete will always be called, even if the read failed.
548 // 551 //
549 // The buf parameter is a buffer to receive the data. If the operation 552 // The buf parameter is a buffer to receive the data. If the operation
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 // Restarting involves replacing the current job with a new one such as what 680 // Restarting involves replacing the current job with a new one such as what
678 // happens when following a HTTP redirect. 681 // happens when following a HTTP redirect.
679 void RestartWithJob(URLRequestJob* job); 682 void RestartWithJob(URLRequestJob* job);
680 void PrepareToRestart(); 683 void PrepareToRestart();
681 684
682 // Detaches the job from this request in preparation for this object going 685 // Detaches the job from this request in preparation for this object going
683 // away or the job being replaced. The job will not call us back when it has 686 // away or the job being replaced. The job will not call us back when it has
684 // been orphaned. 687 // been orphaned.
685 void OrphanJob(); 688 void OrphanJob();
686 689
687 // Cancels the request and set the error and ssl info for this request to the 690 // Cancels the request and set the status and ssl info for this request to
688 // passed values. 691 // the passed values.
689 void DoCancel(int error, const SSLInfo& ssl_info); 692 void DoCancel(const URLRequestStatus& status, const SSLInfo& ssl_info);
690 693
691 // Notifies the network delegate that the request has been completed. 694 // Notifies the network delegate that the request has been completed.
692 // This does not imply a successful completion. Also a canceled request is 695 // This does not imply a successful completion. Also a canceled request is
693 // considered completed. 696 // considered completed.
694 void NotifyRequestCompleted(); 697 void NotifyRequestCompleted();
695 698
696 // Called by URLRequestJob to allow interception when the final response 699 // Called by URLRequestJob to allow interception when the final response
697 // occurs. 700 // occurs.
698 void NotifyResponseStarted(); 701 void NotifyResponseStarted();
699 702
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 base::TimeTicks creation_time_; 804 base::TimeTicks creation_time_;
802 805
803 scoped_ptr<const base::debug::StackTrace> stack_trace_; 806 scoped_ptr<const base::debug::StackTrace> stack_trace_;
804 807
805 DISALLOW_COPY_AND_ASSIGN(URLRequest); 808 DISALLOW_COPY_AND_ASSIGN(URLRequest);
806 }; 809 };
807 810
808 } // namespace net 811 } // namespace net
809 812
810 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 813 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_delegate.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698