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

Unified Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 10399083: Make NetLog take in callbacks that return Values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix net-internals Created 8 years, 7 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
Index: chrome/browser/ui/webui/net_internals/net_internals_ui.cc
===================================================================
--- chrome/browser/ui/webui/net_internals/net_internals_ui.cc (revision 137673)
+++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc (working copy)
@@ -478,20 +478,16 @@
void OnSetLogLevel(const ListValue* list);
// ChromeNetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(net::NetLog::EventType type,
- const base::TimeTicks& time,
- const net::NetLog::Source& source,
- net::NetLog::EventPhase phase,
- net::NetLog::EventParameters* params);
+ virtual void OnAddEntry(const net::NetLog::Entry& entry) OVERRIDE;
// ConnectionTester::Delegate implementation:
- virtual void OnStartConnectionTestSuite();
+ virtual void OnStartConnectionTestSuite() OVERRIDE;
virtual void OnStartConnectionTestExperiment(
- const ConnectionTester::Experiment& experiment);
+ const ConnectionTester::Experiment& experiment) OVERRIDE;
virtual void OnCompletedConnectionTestExperiment(
const ConnectionTester::Experiment& experiment,
- int result);
- virtual void OnCompletedConnectionTestSuite();
+ int result) OVERRIDE;
+ virtual void OnCompletedConnectionTestSuite() OVERRIDE;
// Helper that calls g_browser.receive in the renderer, passing in |command|
// and |arg|. Takes ownership of |arg|. If the renderer is displaying a log
@@ -1501,19 +1497,15 @@
// Note that unlike other methods of IOThreadImpl, this function
// can be called from ANY THREAD.
void NetInternalsMessageHandler::IOThreadImpl::OnAddEntry(
- net::NetLog::EventType type,
- const base::TimeTicks& time,
- const net::NetLog::Source& source,
- net::NetLog::EventPhase phase,
- net::NetLog::EventParameters* params) {
+ const net::NetLog::Entry& entry) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&IOThreadImpl::AddEntryToQueue, this,
- net::NetLog::EntryToDictionaryValue(type, time, source, phase,
- params, false)));
+ entry.ToValue()));
}
-void NetInternalsMessageHandler::IOThreadImpl::AddEntryToQueue(Value* entry) {
+void NetInternalsMessageHandler::IOThreadImpl::AddEntryToQueue(
+ Value* entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (!pending_entries_.get()) {
pending_entries_.reset(new ListValue());

Powered by Google App Engine
This is Rietveld 408576698