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

Side by Side Diff: net/log/net_log_util.cc

Issue 1458093002: Remove unused ScopedVector from net_log_util (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "net/log/net_log_util.h" 5 #include "net/log/net_log_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 DCHECK_EQ((*contexts.begin())->net_log(), context->net_log()); 507 DCHECK_EQ((*contexts.begin())->net_log(), context->net_log());
508 for (const auto& request : *context->url_requests()) { 508 for (const auto& request : *context->url_requests()) {
509 requests.push_back(request); 509 requests.push_back(request);
510 } 510 }
511 } 511 }
512 512
513 // Sort by creation time. 513 // Sort by creation time.
514 std::sort(requests.begin(), requests.end(), RequestCreatedBefore); 514 std::sort(requests.begin(), requests.end(), RequestCreatedBefore);
515 515
516 // Create fake events. 516 // Create fake events.
517 ScopedVector<NetLog::Entry> entries;
518 for (const auto& request : requests) { 517 for (const auto& request : requests) {
519 NetLog::ParametersCallback callback = 518 NetLog::ParametersCallback callback =
520 base::Bind(&GetRequestStateAsValue, base::Unretained(request)); 519 base::Bind(&GetRequestStateAsValue, base::Unretained(request));
521 520
522 // Note that passing the hardcoded NetLogCaptureMode::Default() below is 521 // Note that passing the hardcoded NetLogCaptureMode::Default() below is
523 // fine, since GetRequestStateAsValue() ignores the capture mode. 522 // fine, since GetRequestStateAsValue() ignores the capture mode.
524 NetLog::EntryData entry_data( 523 NetLog::EntryData entry_data(
525 NetLog::TYPE_REQUEST_ALIVE, request->net_log().source(), 524 NetLog::TYPE_REQUEST_ALIVE, request->net_log().source(),
526 NetLog::PHASE_BEGIN, request->creation_time(), &callback); 525 NetLog::PHASE_BEGIN, request->creation_time(), &callback);
527 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default()); 526 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default());
528 observer->OnAddEntry(entry); 527 observer->OnAddEntry(entry);
529 } 528 }
530 } 529 }
531 530
532 } // namespace net 531 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698