OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // TODO(rdsmith): This class needs to delegate URLRequest::Delegate methods | 5 // TODO(rdsmith): This class needs to delegate URLRequest::Delegate methods |
6 // to the net/ embedder for correct implementation of authentication. | 6 // to the net/ embedder for correct implementation of authentication. |
7 // Specifically, this class needs the embedder to provide functionality | 7 // Specifically, this class needs the embedder to provide functionality |
8 // corresponding to | 8 // corresponding to |
9 // URLRequest::Delegate::{OnAuthRequired,OnCertificateRequested}. | 9 // URLRequest::Delegate::{OnAuthRequired,OnCertificateRequested}. |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual bool ScheduleReload(const GURL& dictionary_url, | 58 virtual bool ScheduleReload(const GURL& dictionary_url, |
59 const OnDictionaryFetchedCallback& callback); | 59 const OnDictionaryFetchedCallback& callback); |
60 | 60 |
61 // Cancel any in-progress requests. | 61 // Cancel any in-progress requests. |
62 virtual void Cancel(); | 62 virtual void Cancel(); |
63 | 63 |
64 // Implementation of URLRequest::Delegate methods. | 64 // Implementation of URLRequest::Delegate methods. |
65 void OnReceivedRedirect(URLRequest* request, | 65 void OnReceivedRedirect(URLRequest* request, |
66 const RedirectInfo& redirect_info, | 66 const RedirectInfo& redirect_info, |
67 bool* defer_redirect) override; | 67 bool* defer_redirect) override; |
68 void OnResponseStarted(URLRequest* request) override; | 68 void OnResponseStarted(URLRequest* request, int net_error) override; |
69 void OnReadCompleted(URLRequest* request, int bytes_read) override; | 69 void OnReadCompleted(URLRequest* request, int bytes_read) override; |
70 | 70 |
71 private: | 71 private: |
72 enum State { | 72 enum State { |
73 STATE_NONE, | 73 STATE_NONE, |
74 STATE_SEND_REQUEST, | 74 STATE_SEND_REQUEST, |
75 STATE_RECEIVED_REDIRECT, | 75 STATE_RECEIVED_REDIRECT, |
76 STATE_SEND_REQUEST_PENDING, | 76 STATE_SEND_REQUEST_PENDING, |
77 STATE_READ_BODY, | 77 STATE_READ_BODY, |
78 STATE_READ_BODY_COMPLETE, | 78 STATE_READ_BODY_COMPLETE, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // Store the URLRequestContext associated with the owning SdchManager for | 120 // Store the URLRequestContext associated with the owning SdchManager for |
121 // use while fetching. | 121 // use while fetching. |
122 URLRequestContext* const context_; | 122 URLRequestContext* const context_; |
123 | 123 |
124 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); | 124 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); |
125 }; | 125 }; |
126 | 126 |
127 } // namespace net | 127 } // namespace net |
128 | 128 |
129 #endif // NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_ | 129 #endif // NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_ |
OLD | NEW |