New issue
Advanced search Search tips

Issue 874693 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 28
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Feature



Sign in to add a comment

Provide a way to log events on chrome://safe-browsing

Project Member Reported by vakh@chromium.org, Aug 15

Issue description

Something like:

CRSBLOG(1) << "This is a log: " << *this;

or even:

CRSBLOG(1, "This is a log");

or even just:

CRSBLOG("This is a log");

This would be really useful in debugging and testing.
Please make sure it works for Android too.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3cdb7d19ce78a109ca9e0f9cf64a0da69506d11d

commit 3cdb7d19ce78a109ca9e0f9cf64a0da69506d11d
Author: Daniel Rubery <drubery@chromium.org>
Date: Tue Aug 21 16:33:21 2018

Add CRSBLOG macro to log debug messages on chrome://safe-browsing

Example usage is: CRSBLOG << "debug messages " << this; It should
serialize all objects in the same way as the regular LOG macro.

Bug:  874693 
Change-Id: I761184f919129a62dbde741bf97cf4a1d1cdb1ad
Reviewed-on: https://chromium-review.googlesource.com/1181654
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584779}
[modify] https://crrev.com/3cdb7d19ce78a109ca9e0f9cf64a0da69506d11d/components/safe_browsing/web_ui/resources/safe_browsing.html
[modify] https://crrev.com/3cdb7d19ce78a109ca9e0f9cf64a0da69506d11d/components/safe_browsing/web_ui/resources/safe_browsing.js
[modify] https://crrev.com/3cdb7d19ce78a109ca9e0f9cf64a0da69506d11d/components/safe_browsing/web_ui/safe_browsing_ui.cc
[modify] https://crrev.com/3cdb7d19ce78a109ca9e0f9cf64a0da69506d11d/components/safe_browsing/web_ui/safe_browsing_ui.h

Status: Fixed (was: Assigned)
Status: Assigned (was: Fixed)
Modify this to be a no-op when no chrome://safe-browsing tab is open. This will make it more like LOG, which only evaluates the streamed arguments when the conditions to log are met (verbosity, debug, etc.)
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ad7fea06d6ef8c2f6c5002712f18e49142b09312

commit ad7fea06d6ef8c2f6c5002712f18e49142b09312
Author: Daniel Rubery <drubery@chromium.org>
Date: Mon Aug 27 18:54:54 2018

Add conditional evaluation to CRSBLOG

LOG doesn't even evaluate the streamed arguments if the conditions for
logging aren't met (verbosity, debug, etc.) Now CRSBLOG does the same,
so that CRSBLOG << Function() is a noop if there are no listening
chrome://safe-browsing tabs.

Bug:  874693 
Change-Id: I6e1316b280b87264e65cb789151cff8596eb380a
Reviewed-on: https://chromium-review.googlesource.com/1187008
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586346}
[modify] https://crrev.com/ad7fea06d6ef8c2f6c5002712f18e49142b09312/components/BUILD.gn
[modify] https://crrev.com/ad7fea06d6ef8c2f6c5002712f18e49142b09312/components/safe_browsing/DEPS
[modify] https://crrev.com/ad7fea06d6ef8c2f6c5002712f18e49142b09312/components/safe_browsing/web_ui/BUILD.gn
[modify] https://crrev.com/ad7fea06d6ef8c2f6c5002712f18e49142b09312/components/safe_browsing/web_ui/safe_browsing_ui.cc
[modify] https://crrev.com/ad7fea06d6ef8c2f6c5002712f18e49142b09312/components/safe_browsing/web_ui/safe_browsing_ui.h
[add] https://crrev.com/ad7fea06d6ef8c2f6c5002712f18e49142b09312/components/safe_browsing/web_ui/safe_browsing_ui_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment