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

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

Issue 1128083003: Converted bare pointer to scoped_ptr in net/url_request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted the comment desciption. Created 5 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
« no previous file with comments | « no previous file | net/url_request/url_request.h » ('j') | 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698