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

Unified Diff: net/base/net_log.cc

Issue 9585026: Add a source id to global NetLog entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Move friend declaration Created 8 years, 9 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
Index: net/base/net_log.cc
===================================================================
--- net/base/net_log.cc (revision 126703)
+++ net/base/net_log.cc (working copy)
@@ -76,6 +76,14 @@
return net_log_;
}
+void NetLog::AddGlobalEntry(EventType type,
+ const scoped_refptr<EventParameters>& params) {
+ AddEntry(type,
+ Source(net::NetLog::SOURCE_NONE, this->NextID()),
+ net::NetLog::PHASE_NONE,
+ params);
+}
+
// static
std::string NetLog::TickCountToString(const base::TimeTicks& time) {
int64 delta_time = (time - base::TimeTicks()).InMilliseconds();
@@ -197,21 +205,10 @@
NetLog::EventType type,
NetLog::EventPhase phase,
const scoped_refptr<NetLog::EventParameters>& params) const {
- if (net_log_) {
- net_log_->AddEntry(type, base::TimeTicks::Now(), source_, phase, params);
- }
+ if (net_log_)
+ net_log_->AddEntry(type, source_, phase, params);
}
-void BoundNetLog::AddEntryWithTime(
- NetLog::EventType type,
- const base::TimeTicks& time,
- NetLog::EventPhase phase,
- const scoped_refptr<NetLog::EventParameters>& params) const {
- if (net_log_) {
- net_log_->AddEntry(type, time, source_, phase, params);
- }
-}
-
void BoundNetLog::AddEvent(
NetLog::EventType event_type,
const scoped_refptr<NetLog::EventParameters>& params) const {

Powered by Google App Engine
This is Rietveld 408576698