Commit 026a3f51 authored by olli.raula's avatar olli.raula Committed by Commit bot

Remove ScopedVector from message_pump_perftest

BUG=554289

Review URL: https://codereview.chromium.org/1466653002

Cr-Commit-Position: refs/heads/master@{#361074}
parent 7848d137
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "net/log/net_log.h" #include "net/log/net_log.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/memory/scoped_vector.h"
#include "base/synchronization/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "base/threading/simple_thread.h" #include "base/threading/simple_thread.h"
#include "base/values.h" #include "base/values.h"
...@@ -128,17 +127,19 @@ class LoggingObserver : public NetLog::ThreadSafeObserver { ...@@ -128,17 +127,19 @@ class LoggingObserver : public NetLog::ThreadSafeObserver {
} }
void OnAddEntry(const NetLog::Entry& entry) override { void OnAddEntry(const NetLog::Entry& entry) override {
base::Value* value = entry.ToValue(); scoped_ptr<base::DictionaryValue> dict =
base::DictionaryValue* dict = NULL; base::DictionaryValue::From(make_scoped_ptr(entry.ToValue()));
ASSERT_TRUE(value->GetAsDictionary(&dict)); ASSERT_TRUE(dict);
values_.push_back(dict); values_.push_back(std::move(dict));
} }
size_t GetNumValues() const { return values_.size(); } size_t GetNumValues() const { return values_.size(); }
base::DictionaryValue* GetValue(size_t index) const { return values_[index]; } base::DictionaryValue* GetValue(size_t index) const {
return values_[index].get();
}
private: private:
ScopedVector<base::DictionaryValue> values_; std::vector<scoped_ptr<base::DictionaryValue>> values_;
}; };
void AddEvent(NetLog* net_log) { void AddEvent(NetLog* net_log) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment