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

Unified Diff: net/base/capturing_net_log.cc

Issue 4067002: First pass at adding http/backend cache to NetLog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Lint fixes Created 9 years, 12 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/capturing_net_log.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/capturing_net_log.cc
===================================================================
--- net/base/capturing_net_log.cc (revision 70512)
+++ net/base/capturing_net_log.cc (working copy)
@@ -18,7 +18,9 @@
CapturingNetLog::Entry::~Entry() {}
CapturingNetLog::CapturingNetLog(size_t max_num_entries)
- : last_id_(-1), max_num_entries_(max_num_entries) {
+ : last_id_(-1),
+ max_num_entries_(max_num_entries),
+ log_level_(LOG_ALL_BUT_BYTES) {
}
CapturingNetLog::~CapturingNetLog() {}
@@ -39,7 +41,8 @@
}
NetLog::LogLevel CapturingNetLog::GetLogLevel() const {
- return LOG_ALL_BUT_BYTES;
+ AutoLock lock(lock_);
+ return log_level_;
}
void CapturingNetLog::GetEntries(EntryList* entry_list) const {
@@ -52,6 +55,11 @@
entries_.clear();
}
+void CapturingNetLog::SetLogLevel(NetLog::LogLevel log_level) {
+ AutoLock lock(lock_);
+ log_level_ = log_level;
+}
+
CapturingBoundNetLog::CapturingBoundNetLog(const NetLog::Source& source,
CapturingNetLog* net_log)
: source_(source), capturing_net_log_(net_log) {
@@ -71,4 +79,8 @@
capturing_net_log_->Clear();
}
+void CapturingBoundNetLog::SetLogLevel(NetLog::LogLevel log_level) {
+ capturing_net_log_->SetLogLevel(log_level);
+}
+
} // namespace net
« no previous file with comments | « net/base/capturing_net_log.h ('k') | net/base/net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698