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

Side by Side Diff: chrome/browser/dom_ui/net_internals_ui.cc

Issue 1716007: Cleanup: Address some of the todos in net_log.h... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address willchan's comments Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/net/passive_log_collector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/dom_ui/net_internals_ui.h" 5 #include "chrome/browser/dom_ui/net_internals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 source_dict->SetInteger(L"id", source.id); 71 source_dict->SetInteger(L"id", source.id);
72 source_dict->SetInteger(L"type", static_cast<int>(source.type)); 72 source_dict->SetInteger(L"type", static_cast<int>(source.type));
73 entry_dict->Set(L"source", source_dict); 73 entry_dict->Set(L"source", source_dict);
74 74
75 // Set the event info. 75 // Set the event info.
76 entry_dict->SetInteger(L"type", static_cast<int>(type)); 76 entry_dict->SetInteger(L"type", static_cast<int>(type));
77 entry_dict->SetInteger(L"phase", static_cast<int>(phase)); 77 entry_dict->SetInteger(L"phase", static_cast<int>(phase));
78 78
79 // Set the event-specific parameters. 79 // Set the event-specific parameters.
80 if (extra_parameters) 80 if (extra_parameters)
81 entry_dict->SetString(L"extra_parameters", extra_parameters->ToString()); 81 entry_dict->Set(L"extra_parameters", extra_parameters->ToValue());
82 82
83 return entry_dict; 83 return entry_dict;
84 } 84 }
85 85
86 class NetInternalsHTMLSource : public ChromeURLDataManager::DataSource { 86 class NetInternalsHTMLSource : public ChromeURLDataManager::DataSource {
87 public: 87 public:
88 NetInternalsHTMLSource(); 88 NetInternalsHTMLSource();
89 89
90 // Called when the network layer has requested a resource underneath 90 // Called when the network layer has requested a resource underneath
91 // the path we registered. 91 // the path we registered.
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource(); 693 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource();
694 694
695 // Set up the chrome://net-internals/ source. 695 // Set up the chrome://net-internals/ source.
696 ChromeThread::PostTask( 696 ChromeThread::PostTask(
697 ChromeThread::IO, FROM_HERE, 697 ChromeThread::IO, FROM_HERE,
698 NewRunnableMethod( 698 NewRunnableMethod(
699 Singleton<ChromeURLDataManager>::get(), 699 Singleton<ChromeURLDataManager>::get(),
700 &ChromeURLDataManager::AddDataSource, 700 &ChromeURLDataManager::AddDataSource,
701 make_scoped_refptr(html_source))); 701 make_scoped_refptr(html_source)));
702 } 702 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/passive_log_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698