| OLD | NEW |
| 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 CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ |
| 6 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 void ContinueWithCertificate(net::X509Certificate* cert) override; | 75 void ContinueWithCertificate(net::X509Certificate* cert) override; |
| 76 void CancelCertificateSelection() override; | 76 void CancelCertificateSelection() override; |
| 77 | 77 |
| 78 // ResourceController implementation: | 78 // ResourceController implementation: |
| 79 void Resume() override; | 79 void Resume() override; |
| 80 void Cancel() override; | 80 void Cancel() override; |
| 81 void CancelAndIgnore() override; | 81 void CancelAndIgnore() override; |
| 82 void CancelWithError(int error_code) override; | 82 void CancelWithError(int error_code) override; |
| 83 | 83 |
| 84 void StartRequestInternal(); | 84 void StartRequestInternal(); |
| 85 void CancelRequestInternal(int error, bool from_renderer); | 85 |
| 86 // Posts a task to cancel the request, for use by ResourceController methods. |
| 87 void CancelRequestAsync(int error, bool ignore); |
| 88 |
| 89 void CancelRequestInternal(int error, bool from_renderer, bool ignore); |
| 86 void CompleteResponseStarted(); | 90 void CompleteResponseStarted(); |
| 87 void StartReading(bool is_continuation); | 91 void StartReading(bool is_continuation); |
| 88 void ResumeReading(); | 92 void ResumeReading(); |
| 89 void ReadMore(int* bytes_read); | |
| 90 // Passes a read result to the handler. | 93 // Passes a read result to the handler. |
| 91 void CompleteRead(int bytes_read); | 94 void CompleteRead(int bytes_read); |
| 92 void ResponseCompleted(); | 95 void ResponseCompleted(); |
| 93 void CallDidFinishLoading(); | 96 void CallDidFinishLoading(); |
| 94 void RecordHistograms(); | 97 void RecordHistograms(); |
| 95 | 98 |
| 96 bool is_deferred() const { return deferred_stage_ != DEFERRED_NONE; } | 99 bool is_deferred() const { return deferred_stage_ != DEFERRED_NONE; } |
| 97 | 100 |
| 98 // Used for categorizing loading of prefetches for reporting in histograms. | 101 // Used for categorizing loading of prefetches for reporting in histograms. |
| 99 // NOTE: This enumeration is used in histograms, so please do not add entries | 102 // NOTE: This enumeration is used in histograms, so please do not add entries |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 int times_cancelled_after_request_start_; | 143 int times_cancelled_after_request_start_; |
| 141 | 144 |
| 142 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; | 145 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; |
| 143 | 146 |
| 144 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); | 147 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); |
| 145 }; | 148 }; |
| 146 | 149 |
| 147 } // namespace content | 150 } // namespace content |
| 148 | 151 |
| 149 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ | 152 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ |
| OLD | NEW |