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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 void CancelRequestInternal(int error, bool from_renderer); |
86 void CompleteResponseStarted(); | 86 void CompleteResponseStarted(); |
87 void StartReading(bool is_continuation); | 87 void StartReading(bool is_continuation); |
88 void ResumeReading(); | 88 void ResumeReading(); |
89 void ReadMore(int* bytes_read); | |
90 // Passes a read result to the handler. | 89 // Passes a read result to the handler. |
91 void CompleteRead(int bytes_read); | 90 void CompleteRead(int bytes_read); |
92 void ResponseCompleted(); | 91 void ResponseCompleted(); |
93 void CallDidFinishLoading(); | 92 void CallDidFinishLoading(); |
94 void RecordHistograms(); | 93 void RecordHistograms(); |
95 | 94 |
96 bool is_deferred() const { return deferred_stage_ != DEFERRED_NONE; } | 95 bool is_deferred() const { return deferred_stage_ != DEFERRED_NONE; } |
97 | 96 |
98 // Used for categorizing loading of prefetches for reporting in histograms. | 97 // Used for categorizing loading of prefetches for reporting in histograms. |
99 // NOTE: This enumeration is used in histograms, so please do not add entries | 98 // 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_; | 139 int times_cancelled_after_request_start_; |
141 | 140 |
142 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; | 141 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; |
143 | 142 |
144 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); | 143 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); |
145 }; | 144 }; |
146 | 145 |
147 } // namespace content | 146 } // namespace content |
148 | 147 |
149 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ | 148 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ |
OLD | NEW |