Chromium Code Reviews
Help | Chromium Project | Sign in
(3)

Issue 1556018: Add support for attaching custom parameters to NetLog events. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years ago by eroman
Modified:
2 years, 10 months ago
Reviewers:
willchan
CC:
chromium-reviews_chromium.org, ben+cc_chromium.org, arv, darin-cc_chromium.org, PaweĊ‚ Hajdan Jr.
Visibility:
Public.

Description

Add support for attaching custom parameters to NetLog events.

BUG=37421
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=44057

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 18

Patch Set 3 : sync up #

Patch Set 4 : Address willchan's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+520 lines, -395 lines) Lint Patch
M chrome/browser/dom_ui/net_internals_ui.cc View 1 2 3 chunks +19 lines, -46 lines 0 comments 0 errors Download
M chrome/browser/net/chrome_net_log.h View 1 2 1 chunk +10 lines, -2 lines 0 comments 0 errors Download
M chrome/browser/net/chrome_net_log.cc View 1 2 1 chunk +7 lines, -2 lines 0 comments 0 errors Download
M chrome/browser/net/passive_log_collector.h View 1 2 8 chunks +14 lines, -13 lines 0 comments 0 errors Download
M chrome/browser/net/passive_log_collector.cc View 1 2 3 9 chunks +37 lines, -33 lines 0 comments 0 errors Download
M chrome/browser/net/passive_log_collector_unittest.cc View 1 2 2 chunks +16 lines, -35 lines 0 comments 0 errors Download
M chrome/browser/net/view_net_internals_job_factory.cc View 1 2 1 chunk +1 line, -1 line 0 comments 0 errors Download
M chrome/browser/resources/net_internals/loggrouper.js View 1 2 3 chunks +4 lines, -6 lines 0 comments 0 errors Download
M chrome/browser/resources/net_internals/logviewpainter.js View 1 2 2 chunks +18 lines, -21 lines 0 comments 0 errors Download
M chrome/browser/resources/net_internals/main.js View 1 2 2 chunks +0 lines, -5 lines 0 comments 0 errors Download
M chrome/browser/resources/net_internals/sourceentry.js View 1 2 2 chunks +26 lines, -8 lines 0 comments 0 errors Download
M net/base/host_resolver_impl.h View 1 2 1 chunk +1 line, -1 line 0 comments 0 errors Download
M net/base/host_resolver_impl.cc View 1 2 3 chunks +8 lines, -8 lines 0 comments 0 errors Download
M net/base/net_log.h View 1 2 3 7 chunks +138 lines, -43 lines 0 comments 0 errors Download
M net/base/net_log.cc View 1 2 3 5 chunks +87 lines, -74 lines 0 comments 0 errors Download
M net/base/net_log_event_type_list.h View 1 2 3 chunks +19 lines, -0 lines 0 comments 0 errors Download
M net/base/net_log_unittest.h View 1 2 3 chunks +10 lines, -13 lines 0 comments 0 errors Download
M net/base/net_log_util.h View 1 2 1 chunk +2 lines, -1 line 0 comments 0 errors Download
M net/base/net_log_util.cc View 1 2 3 8 chunks +67 lines, -38 lines 0 comments 0 errors Download
M net/base/net_log_util_unittest.cc View 1 2 5 chunks +18 lines, -28 lines 0 comments 0 errors Download
M net/proxy/proxy_service.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments 0 errors Download
M net/socket/client_socket_pool_base_unittest.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments 0 errors Download
M net/socket_stream/socket_stream.cc View 1 2 3 chunks +4 lines, -4 lines 0 comments 0 errors Download
M net/url_request/url_request.cc View 1 2 3 chunks +9 lines, -8 lines 0 comments 0 errors Download
Commit:

Messages

Total messages: 3
eroman
4 years ago #1
willchan
LGTM The casting makes me a bit nervous. I'm going to think about whether or ...
4 years ago #2
eroman
4 years ago #3
http://codereview.chromium.org/1556018/diff/20001/21018
File chrome/browser/net/passive_log_collector.cc (right):

http://codereview.chromium.org/1556018/diff/20001/21018#newcode276
chrome/browser/net/passive_log_collector.cc:276: // Note: we look at the first
*two* entries, since the outter REQUEST_ALIVE
On 2010/04/09 00:14:41, willchan wrote:
> s/outter/outer/

Done.

http://codereview.chromium.org/1556018/diff/20001/21009
File net/base/net_log.h (right):

http://codereview.chromium.org/1556018/diff/20001/21009#newcode31
net/base/net_log.h:31: //  TODO(eroman): Remove the 'const' qualitifer from the
BoundNetLog methods.
On 2010/04/09 00:14:41, willchan wrote:
> You've got one too many whitespaces before the TODO.  It's setting off lint
> errors.

Done.

http://codereview.chromium.org/1556018/diff/20001/21009#newcode92
net/base/net_log.h:92: };
On 2010/04/09 00:14:41, willchan wrote:
> DISALLOW_COPY_AND_ASSIGN

Done.

http://codereview.chromium.org/1556018/diff/20001/21009#newcode110
net/base/net_log.h:110: EventParameters* extra_parameters) = 0;
On 2010/04/09 00:14:41, willchan wrote:
> This should be const.  Is it non-const because of our dumb RefCounted
> implementation?  I'm going to fix that.

Correct. |extra_parameters| should not be mutable, to facilitate sharing it
across observers (and possibly in the future threads).

http://codereview.chromium.org/1556018/diff/20001/21009#newcode127
net/base/net_log.h:127: DISALLOW_COPY_AND_ASSIGN(NetLog);
On 2010/04/09 00:14:41, willchan wrote:
> You need basictypes.h for this.

Done.

http://codereview.chromium.org/1556018/diff/20001/21009#newcode192
net/base/net_log.h:192: explicit NetLogStringParameter(const std::string& str) :
str_(str) {}
On 2010/04/09 00:14:41, willchan wrote:
> This constructor should be defined in the .cc.  basic_string's constructor is
> non-trivial and inlined in many stl implementations.

Done.

http://codereview.chromium.org/1556018/diff/20001/21009#newcode194
net/base/net_log.h:194: const std::string& string() const {
On 2010/04/09 00:14:41, willchan wrote:
> I think all these accessors should be value() and value_ instead of type()
> type_.  That way, if the types change, then we don't need to change the
calling
> code.
> 
> I thought briefly about whether or not we'd want to simply templatize this. 
> It's possible we may be able to achieve some safety wrt the casting we'll have
> to do with EventParameter.

Done.

http://codereview.chromium.org/1556018/diff/20001/21009#newcode219
net/base/net_log.h:219: int integer_;
On 2010/04/09 00:14:41, willchan wrote:
> const

Done.

http://codereview.chromium.org/1556018/diff/20001/21009#newcode238
net/base/net_log.h:238: const char* literal_;
On 2010/04/09 00:14:41, willchan wrote:
> const char* const

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1280:2d3e6564b7b6