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

Side by Side Diff: content/renderer/fetchers/resource_fetcher_impl.cc

Issue 2540023003: Dispatch encoded_data_length separately in content/child (Closed)
Patch Set: fix Created 4 years 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
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 "content/renderer/fetchers/resource_fetcher_impl.h" 5 #include "content/renderer/fetchers/resource_fetcher_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // WebURLLoaderClient methods: 73 // WebURLLoaderClient methods:
74 void didReceiveResponse(const blink::WebURLResponse& response) override { 74 void didReceiveResponse(const blink::WebURLResponse& response) override {
75 DCHECK(!completed_); 75 DCHECK(!completed_);
76 76
77 response_ = response; 77 response_ = response;
78 } 78 }
79 void didReceiveCachedMetadata(const char* data, int data_length) override { 79 void didReceiveCachedMetadata(const char* data, int data_length) override {
80 DCHECK(!completed_); 80 DCHECK(!completed_);
81 DCHECK_GT(data_length, 0); 81 DCHECK_GT(data_length, 0);
82 } 82 }
83 void didReceiveData(const char* data, 83 void didReceiveData(const char* data, int data_length) override {
84 int data_length,
85 int encoded_data_length) override {
86 DCHECK(!completed_); 84 DCHECK(!completed_);
87 DCHECK_GT(data_length, 0); 85 DCHECK_GT(data_length, 0);
88 86
89 data_.append(data, data_length); 87 data_.append(data, data_length);
90 } 88 }
91 void didFinishLoading(double finishTime, 89 void didFinishLoading(double finishTime,
92 int64_t total_encoded_data_length, 90 int64_t total_encoded_data_length,
93 int64_t total_encoded_body_length) override { 91 int64_t total_encoded_body_length) override {
94 DCHECK(!completed_); 92 DCHECK(!completed_);
95 93
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 void ResourceFetcherImpl::OnLoadComplete() { 204 void ResourceFetcherImpl::OnLoadComplete() {
207 timeout_timer_.Stop(); 205 timeout_timer_.Stop();
208 } 206 }
209 207
210 void ResourceFetcherImpl::Cancel() { 208 void ResourceFetcherImpl::Cancel() {
211 loader_->cancel(); 209 loader_->cancel();
212 client_->Cancel(); 210 client_->Cancel();
213 } 211 }
214 212
215 } // namespace content 213 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698