OLD | NEW |
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 return false; | 123 return false; |
124 // If requests were created at the same time, sort by ID. Mostly matters for | 124 // If requests were created at the same time, sort by ID. Mostly matters for |
125 // testing purposes. | 125 // testing purposes. |
126 return request1->identifier() < request2->identifier(); | 126 return request1->identifier() < request2->identifier(); |
127 } | 127 } |
128 | 128 |
129 // Returns a Value representing the state of a pre-existing URLRequest when | 129 // Returns a Value representing the state of a pre-existing URLRequest when |
130 // net-internals was opened. | 130 // net-internals was opened. |
131 base::Value* GetRequestStateAsValue(const net::URLRequest* request, | 131 base::Value* GetRequestStateAsValue(const net::URLRequest* request, |
132 NetLogCaptureMode capture_mode) { | 132 NetLogCaptureMode capture_mode) { |
133 return request->GetStateAsValue(); | 133 return request->GetStateAsValue().release(); |
134 } | 134 } |
135 | 135 |
136 } // namespace | 136 } // namespace |
137 | 137 |
138 scoped_ptr<base::DictionaryValue> GetNetConstants() { | 138 scoped_ptr<base::DictionaryValue> GetNetConstants() { |
139 scoped_ptr<base::DictionaryValue> constants_dict(new base::DictionaryValue()); | 139 scoped_ptr<base::DictionaryValue> constants_dict(new base::DictionaryValue()); |
140 | 140 |
141 // Version of the file format. | 141 // Version of the file format. |
142 constants_dict->SetInteger("logFormatVersion", kLogFormatVersion); | 142 constants_dict->SetInteger("logFormatVersion", kLogFormatVersion); |
143 | 143 |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 // fine, since GetRequestStateAsValue() ignores the capture mode. | 525 // fine, since GetRequestStateAsValue() ignores the capture mode. |
526 NetLog::EntryData entry_data( | 526 NetLog::EntryData entry_data( |
527 NetLog::TYPE_REQUEST_ALIVE, request->net_log().source(), | 527 NetLog::TYPE_REQUEST_ALIVE, request->net_log().source(), |
528 NetLog::PHASE_BEGIN, request->creation_time(), &callback); | 528 NetLog::PHASE_BEGIN, request->creation_time(), &callback); |
529 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default()); | 529 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default()); |
530 observer->OnAddEntry(entry); | 530 observer->OnAddEntry(entry); |
531 } | 531 } |
532 } | 532 } |
533 | 533 |
534 } // namespace net | 534 } // namespace net |
OLD | NEW |