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

Side by Side Diff: content/browser/loader/netlog_observer.cc

Issue 2158073002: Revert of [DevTools] Always report encodedDataLength in Network.ResponseReceived. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 // 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/browser/loader/netlog_observer.h" 5 #include "content/browser/loader/netlog_observer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 ResourceRequestInfoImpl::ForRequest(request); 188 ResourceRequestInfoImpl::ForRequest(request);
189 if (!request_info || !request_info->ShouldReportRawHeaders()) 189 if (!request_info || !request_info->ShouldReportRawHeaders())
190 return; 190 return;
191 191
192 uint32_t source_id = request->net_log().source().id; 192 uint32_t source_id = request->net_log().source().id;
193 NetLogObserver* dev_tools_net_log_observer = NetLogObserver::GetInstance(); 193 NetLogObserver* dev_tools_net_log_observer = NetLogObserver::GetInstance();
194 if (dev_tools_net_log_observer == NULL) 194 if (dev_tools_net_log_observer == NULL)
195 return; 195 return;
196 response->head.devtools_info = 196 response->head.devtools_info =
197 dev_tools_net_log_observer->GetResourceInfo(source_id); 197 dev_tools_net_log_observer->GetResourceInfo(source_id);
198 response->head.encoded_data_length = request->GetTotalReceivedBytes();
199 } 198 }
200 199
201 } // namespace content 200 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698