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

Unified Diff: net/base/host_resolver_impl.cc

Issue 1556018: Add support for attaching custom parameters to NetLog events. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address willchan's comments Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/host_resolver_impl.h ('k') | net/base/net_log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_impl.cc
===================================================================
--- net/base/host_resolver_impl.cc (revision 44049)
+++ net/base/host_resolver_impl.cc (working copy)
@@ -163,16 +163,16 @@
RequestsTrace() {}
void Add(const std::string& msg) {
- NetLog::Entry entry;
- entry.type = NetLog::Entry::TYPE_STRING;
- entry.time = base::TimeTicks::Now();
- entry.string = msg;
-
+ CapturingNetLog::Entry entry(NetLog::TYPE_TODO_STRING,
+ base::TimeTicks::Now(),
+ NetLog::Source(),
+ NetLog::PHASE_NONE,
+ new NetLogStringParameter(msg));
AutoLock l(lock_);
entries_.push_back(entry);
}
- void Get(std::vector<NetLog::Entry>* entries) {
+ void Get(CapturingNetLog::EntryList* entries) {
AutoLock l(lock_);
*entries = entries_;
}
@@ -184,7 +184,7 @@
private:
Lock lock_;
- std::vector<NetLog::Entry> entries_;
+ CapturingNetLog::EntryList entries_;
};
//-----------------------------------------------------------------------------
@@ -912,7 +912,7 @@
return !!requests_trace_; // Cast to bool.
}
-bool HostResolverImpl::GetRequestsTrace(std::vector<NetLog::Entry>* entries) {
+bool HostResolverImpl::GetRequestsTrace(CapturingNetLog::EntryList* entries) {
if (!requests_trace_)
return false;
requests_trace_->Get(entries);
« no previous file with comments | « net/base/host_resolver_impl.h ('k') | net/base/net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698