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

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

Issue 6342017: Revert "Perf test of disabling ChromeNetLog." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 base::AutoLock lock(lock_); 88 base::AutoLock lock(lock_);
89 89
90 // Notify all of the log observers. 90 // Notify all of the log observers.
91 #if 0
92 FOR_EACH_OBSERVER(ThreadSafeObserver, observers_, 91 FOR_EACH_OBSERVER(ThreadSafeObserver, observers_,
93 OnAddEntry(type, time, source, phase, params)); 92 OnAddEntry(type, time, source, phase, params));
94 #endif
95 } 93 }
96 94
97 uint32 ChromeNetLog::NextID() { 95 uint32 ChromeNetLog::NextID() {
98 return base::subtle::NoBarrier_AtomicIncrement(&last_id_, 1); 96 return base::subtle::NoBarrier_AtomicIncrement(&last_id_, 1);
99 } 97 }
100 98
101 net::NetLog::LogLevel ChromeNetLog::GetLogLevel() const { 99 net::NetLog::LogLevel ChromeNetLog::GetLogLevel() const {
102 base::subtle::Atomic32 log_level = base::subtle::NoBarrier_Load(&log_level_); 100 base::subtle::Atomic32 log_level = base::subtle::NoBarrier_Load(&log_level_);
103 return static_cast<net::NetLog::LogLevel>(log_level); 101 return static_cast<net::NetLog::LogLevel>(log_level);
104 } 102 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 144 }
147 base::subtle::NoBarrier_Store(&log_level_, new_log_level); 145 base::subtle::NoBarrier_Store(&log_level_, new_log_level);
148 } 146 }
149 147
150 void ChromeNetLog::AddObserverWhileLockHeld(ThreadSafeObserver* observer) { 148 void ChromeNetLog::AddObserverWhileLockHeld(ThreadSafeObserver* observer) {
151 DCHECK(!observer->net_log_); 149 DCHECK(!observer->net_log_);
152 observer->net_log_ = this; 150 observer->net_log_ = this;
153 observers_.AddObserver(observer); 151 observers_.AddObserver(observer);
154 UpdateLogLevel_(); 152 UpdateLogLevel_();
155 } 153 }
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