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

Side by Side Diff: webkit/glue/resource_fetcher.cc

Issue 295041: DevTools: report correct content length for resources (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/resource_fetcher.h ('k') | webkit/glue/webplugin_impl.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "webkit/glue/resource_fetcher.h" 5 #include "webkit/glue/resource_fetcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "webkit/api/public/WebFrame.h" 8 #include "webkit/api/public/WebFrame.h"
9 #include "webkit/api/public/WebKit.h" 9 #include "webkit/api/public/WebKit.h"
10 #include "webkit/api/public/WebKitClient.h" 10 #include "webkit/api/public/WebKitClient.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 unsigned long long total_bytes_to_be_sent) { 66 unsigned long long total_bytes_to_be_sent) {
67 } 67 }
68 68
69 void ResourceFetcher::didReceiveResponse( 69 void ResourceFetcher::didReceiveResponse(
70 WebURLLoader* loader, const WebURLResponse& response) { 70 WebURLLoader* loader, const WebURLResponse& response) {
71 DCHECK(!completed_); 71 DCHECK(!completed_);
72 response_ = response; 72 response_ = response;
73 } 73 }
74 74
75 void ResourceFetcher::didReceiveData( 75 void ResourceFetcher::didReceiveData(
76 WebURLLoader* loader, const char* data, int data_length, 76 WebURLLoader* loader, const char* data, int data_length) {
77 long long total_data_length) {
78 DCHECK(!completed_); 77 DCHECK(!completed_);
79 DCHECK(data_length > 0); 78 DCHECK(data_length > 0);
80 79
81 data_.append(data, data_length); 80 data_.append(data, data_length);
82 } 81 }
83 82
84 void ResourceFetcher::didFinishLoading(WebURLLoader* loader) { 83 void ResourceFetcher::didFinishLoading(WebURLLoader* loader) {
85 DCHECK(!completed_); 84 DCHECK(!completed_);
86 completed_ = true; 85 completed_ = true;
87 86
(...skipping 25 matching lines...) Expand all
113 } 112 }
114 113
115 void ResourceFetcherWithTimeout::TimeoutFired() { 114 void ResourceFetcherWithTimeout::TimeoutFired() {
116 if (!completed_) { 115 if (!completed_) {
117 loader_->cancel(); 116 loader_->cancel();
118 didFail(NULL, WebURLError()); 117 didFail(NULL, WebURLError());
119 } 118 }
120 } 119 }
121 120
122 } // namespace webkit_glue 121 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/resource_fetcher.h ('k') | webkit/glue/webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698