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

Unified Diff: net/base/net_log.cc

Issue 10565009: (Finally) Remove NetLog::EventParameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix a couple more files Created 8 years, 6 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/net_log.h ('k') | net/http/http_request_headers_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_log.cc
===================================================================
--- net/base/net_log.cc (revision 142915)
+++ net/base/net_log.cc (working copy)
@@ -30,14 +30,6 @@
return dict;
}
-Value* EventParametersCallback(
- const scoped_refptr<NetLog::EventParameters>& params,
- NetLog::LogLevel /* log_level */) {
- if (!params.get())
- return NULL;
- return params->ToValue();
-}
-
Value* SourceEventParametersCallback(const NetLog::Source source,
NetLog::LogLevel /* log_level */) {
if (!source.is_valid())
@@ -81,13 +73,6 @@
} // namespace
-Value* NetLog::Source::ToValue() const {
- DictionaryValue* dict = new DictionaryValue();
- dict->SetInteger("type", static_cast<int>(type));
- dict->SetInteger("id", static_cast<int>(id));
- return dict;
-}
-
void NetLog::Source::AddToEventParameters(DictionaryValue* event_params) const {
DictionaryValue* dict = new DictionaryValue();
dict->SetInteger("type", static_cast<int>(type));
@@ -203,15 +188,6 @@
&parameters_callback);
}
-void NetLog::AddGlobalEntry(EventType type,
- const scoped_refptr<EventParameters>& params) {
- ParametersCallback callback = base::Bind(&EventParametersCallback, params);
- AddEntry(type,
- Source(net::NetLog::SOURCE_NONE, NextID()),
- net::NetLog::PHASE_NONE,
- &callback);
-}
-
// static
std::string NetLog::TickCountToString(const base::TimeTicks& time) {
int64 delta_time = (time - base::TimeTicks()).InMilliseconds();
@@ -381,35 +357,6 @@
AddEntry(type, NetLog::PHASE_END, get_parameters);
}
-void BoundNetLog::AddEntry(
- NetLog::EventType type,
- NetLog::EventPhase phase,
- const scoped_refptr<NetLog::EventParameters>& params) const {
- if (!net_log_)
- return;
- NetLog::ParametersCallback callback =
- base::Bind(&EventParametersCallback, params);
- net_log_->AddEntry(type, source_, phase, &callback);
-}
-
-void BoundNetLog::AddEvent(
- NetLog::EventType event_type,
- const scoped_refptr<NetLog::EventParameters>& params) const {
- AddEntry(event_type, NetLog::PHASE_NONE, params);
-}
-
-void BoundNetLog::BeginEvent(
- NetLog::EventType event_type,
- const scoped_refptr<NetLog::EventParameters>& params) const {
- AddEntry(event_type, NetLog::PHASE_BEGIN, params);
-}
-
-void BoundNetLog::EndEvent(
- NetLog::EventType event_type,
- const scoped_refptr<NetLog::EventParameters>& params) const {
- AddEntry(event_type, NetLog::PHASE_END, params);
-}
-
void BoundNetLog::AddEventWithNetErrorCode(NetLog::EventType event_type,
int net_error) const {
DCHECK_GT(0, net_error);
@@ -457,31 +404,4 @@
return BoundNetLog(source, net_log);
}
-NetLogStringParameter::NetLogStringParameter(const char* name,
- const std::string& value)
- : name_(name), value_(value) {
-}
-
-NetLogStringParameter::~NetLogStringParameter() {
-}
-
-Value* NetLogIntegerParameter::ToValue() const {
- DictionaryValue* dict = new DictionaryValue();
- dict->SetInteger(name_, value_);
- return dict;
-}
-
-Value* NetLogStringParameter::ToValue() const {
- DictionaryValue* dict = new DictionaryValue();
- dict->SetString(name_, value_);
- return dict;
-}
-
-Value* NetLogSourceParameter::ToValue() const {
- DictionaryValue* dict = new DictionaryValue();
- if (value_.is_valid())
- dict->Set(name_, value_.ToValue());
- return dict;
-}
-
} // namespace net
« no previous file with comments | « net/base/net_log.h ('k') | net/http/http_request_headers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698