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

Side by Side Diff: third_party/WebKit/Source/core/fetch/Resource.h

Issue 2519843002: Update ResourceResponse::encodedDataLength when response is completed (Closed)
Patch Set: Update ResourceResponse::encodedDataLength when response is completed 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 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org>
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 rights reserved. 6 rights reserved.
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 m_cacheIdentifier = cacheIdentifier; 293 m_cacheIdentifier = cacheIdentifier;
294 } 294 }
295 String cacheIdentifier() const { return m_cacheIdentifier; } 295 String cacheIdentifier() const { return m_cacheIdentifier; }
296 296
297 virtual void didSendData(unsigned long long /* bytesSent */, 297 virtual void didSendData(unsigned long long /* bytesSent */,
298 unsigned long long /* totalBytesToBeSent */) {} 298 unsigned long long /* totalBytesToBeSent */) {}
299 virtual void didDownloadData(int) {} 299 virtual void didDownloadData(int) {}
300 300
301 double loadFinishTime() const { return m_loadFinishTime; } 301 double loadFinishTime() const { return m_loadFinishTime; }
302 302
303 void setEncodedDataLength(int64_t value) {
304 m_response.setEncodedDataLength(value);
305 }
303 void addToEncodedBodyLength(int value) { 306 void addToEncodedBodyLength(int value) {
304 m_response.addToEncodedBodyLength(value); 307 m_response.addToEncodedBodyLength(value);
305 } 308 }
306 void addToDecodedBodyLength(int value) { 309 void addToDecodedBodyLength(int value) {
307 m_response.addToDecodedBodyLength(value); 310 m_response.addToDecodedBodyLength(value);
308 } 311 }
309 312
310 virtual bool canReuse(const ResourceRequest&) const { return true; } 313 virtual bool canReuse(const ResourceRequest&) const { return true; }
311 314
312 // If cache-aware loading is activated, this callback is called when the first 315 // If cache-aware loading is activated, this callback is called when the first
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 }; 494 };
492 495
493 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 496 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
494 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ 497 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \
495 resource->getType() == Resource::typeName, \ 498 resource->getType() == Resource::typeName, \
496 resource.getType() == Resource::typeName); 499 resource.getType() == Resource::typeName);
497 500
498 } // namespace blink 501 } // namespace blink
499 502
500 #endif 503 #endif
OLDNEW
« no previous file with comments | « content/renderer/fetchers/resource_fetcher_impl.cc ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698