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

Side by Side Diff: chrome/browser/net/chrome_net_log.cc

Issue 6288011: Perf test of disabling ChromeNetLog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ignore added entries instead. Created 9 years, 11 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 | Annotate | Revision Log
« 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/net/chrome_net_log.h" 5 #include "chrome/browser/net/chrome_net_log.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 void ChromeNetLog::AddEntry(EventType type, 83 void ChromeNetLog::AddEntry(EventType type,
84 const base::TimeTicks& time, 84 const base::TimeTicks& time,
85 const Source& source, 85 const Source& source,
86 EventPhase phase, 86 EventPhase phase,
87 EventParameters* params) { 87 EventParameters* params) {
88 AutoLock lock(lock_); 88 AutoLock lock(lock_);
89 89
90 // Notify all of the log observers. 90 // Notify all of the log observers.
91 #if 0
91 FOR_EACH_OBSERVER(ThreadSafeObserver, observers_, 92 FOR_EACH_OBSERVER(ThreadSafeObserver, observers_,
92 OnAddEntry(type, time, source, phase, params)); 93 OnAddEntry(type, time, source, phase, params));
94 #endif
93 } 95 }
94 96
95 uint32 ChromeNetLog::NextID() { 97 uint32 ChromeNetLog::NextID() {
96 return base::subtle::NoBarrier_AtomicIncrement(&last_id_, 1); 98 return base::subtle::NoBarrier_AtomicIncrement(&last_id_, 1);
97 } 99 }
98 100
99 net::NetLog::LogLevel ChromeNetLog::GetLogLevel() const { 101 net::NetLog::LogLevel ChromeNetLog::GetLogLevel() const {
100 base::subtle::Atomic32 log_level = base::subtle::NoBarrier_Load(&log_level_); 102 base::subtle::Atomic32 log_level = base::subtle::NoBarrier_Load(&log_level_);
101 return static_cast<net::NetLog::LogLevel>(log_level); 103 return static_cast<net::NetLog::LogLevel>(log_level);
102 } 104 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 146 }
145 base::subtle::NoBarrier_Store(&log_level_, new_log_level); 147 base::subtle::NoBarrier_Store(&log_level_, new_log_level);
146 } 148 }
147 149
148 void ChromeNetLog::AddObserverWhileLockHeld(ThreadSafeObserver* observer) { 150 void ChromeNetLog::AddObserverWhileLockHeld(ThreadSafeObserver* observer) {
149 DCHECK(!observer->net_log_); 151 DCHECK(!observer->net_log_);
150 observer->net_log_ = this; 152 observer->net_log_ = this;
151 observers_.AddObserver(observer); 153 observers_.AddObserver(observer);
152 UpdateLogLevel_(); 154 UpdateLogLevel_();
153 } 155 }
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