diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-19 14:58:35 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-19 14:58:35 +0000 |
commit | 06d36746222a362718d7756c056e7d3e89e72235 (patch) | |
tree | 6c8e146f8ab78e56ad8681b60265a269da52cb7e /net/base/net_log.cc | |
parent | 7b46241e22834e65c4e102d0ec9436ab5b0c922c (diff) | |
download | chromium_src-06d36746222a362718d7756c056e7d3e89e72235.zip chromium_src-06d36746222a362718d7756c056e7d3e89e72235.tar.gz chromium_src-06d36746222a362718d7756c056e7d3e89e72235.tar.bz2 |
(Finally) Remove NetLog::EventParameters.
R=eroman@chromium.org
BUG=126243
Review URL: https://chromiumcodereview.appspot.com/10565009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142953 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_log.cc')
-rw-r--r-- | net/base/net_log.cc | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/net/base/net_log.cc b/net/base/net_log.cc index a2f22dc..f15ce95 100644 --- a/net/base/net_log.cc +++ b/net/base/net_log.cc @@ -30,14 +30,6 @@ Value* BytesTransferredCallback(int byte_count, 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 @@ Value* NetLogString16Callback(const char* name, } // 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 @@ void NetLog::AddGlobalEntry( ¶meters_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 @@ void BoundNetLog::EndEvent( 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 @@ BoundNetLog BoundNetLog::Make(NetLog* net_log, 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 |