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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.h

Issue 2835123005: Send the decoded size when response completed and stop summing in ResourceLoader::DidReceiveData() (Closed)
Patch Set: Created 3 years, 7 months 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) 2005, 2006, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 unsigned long long total_bytes_to_be_sent) override; 94 unsigned long long total_bytes_to_be_sent) override;
95 void DidReceiveResponse(const WebURLResponse&) override; 95 void DidReceiveResponse(const WebURLResponse&) override;
96 void DidReceiveResponse(const WebURLResponse&, 96 void DidReceiveResponse(const WebURLResponse&,
97 std::unique_ptr<WebDataConsumerHandle>) override; 97 std::unique_ptr<WebDataConsumerHandle>) override;
98 void DidReceiveCachedMetadata(const char* data, int length) override; 98 void DidReceiveCachedMetadata(const char* data, int length) override;
99 void DidReceiveData(const char*, int) override; 99 void DidReceiveData(const char*, int) override;
100 void DidReceiveTransferSizeUpdate(int transfer_size_diff) override; 100 void DidReceiveTransferSizeUpdate(int transfer_size_diff) override;
101 void DidDownloadData(int, int) override; 101 void DidDownloadData(int, int) override;
102 void DidFinishLoading(double finish_time, 102 void DidFinishLoading(double finish_time,
103 int64_t encoded_data_length, 103 int64_t encoded_data_length,
104 int64_t encoded_body_length) override; 104 int64_t encoded_body_length,
105 int64_t decoded_body_length) override;
105 void DidFail(const WebURLError&, 106 void DidFail(const WebURLError&,
106 int64_t encoded_data_length, 107 int64_t encoded_data_length,
107 int64_t encoded_body_length) override; 108 int64_t encoded_body_length,
109 int64_t decoded_body_length) override;
108 void HandleError(const ResourceError&); 110 void HandleError(const ResourceError&);
109 111
110 void DidFinishLoadingFirstPartInMultipart(); 112 void DidFinishLoadingFirstPartInMultipart();
111 113
112 private: 114 private:
113 // Assumes ResourceFetcher and Resource are non-null. 115 // Assumes ResourceFetcher and Resource are non-null.
114 ResourceLoader(ResourceFetcher*, Resource*); 116 ResourceLoader(ResourceFetcher*, Resource*);
115 117
116 // This method is currently only used for service worker fallback request and 118 // This method is currently only used for service worker fallback request and
117 // cache-aware loading, other users should be careful not to break 119 // cache-aware loading, other users should be careful not to break
(...skipping 11 matching lines...) Expand all
129 131
130 std::unique_ptr<WebURLLoader> loader_; 132 std::unique_ptr<WebURLLoader> loader_;
131 Member<ResourceFetcher> fetcher_; 133 Member<ResourceFetcher> fetcher_;
132 Member<Resource> resource_; 134 Member<Resource> resource_;
133 bool is_cache_aware_loading_activated_; 135 bool is_cache_aware_loading_activated_;
134 }; 136 };
135 137
136 } // namespace blink 138 } // namespace blink
137 139
138 #endif 140 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698