New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 711432 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

NetLogs from about:net-export doesn't show about:flags settings

Project Member Reported by davidben@chromium.org, Apr 13 2017

Issue description

Chrome Version: (copy from chrome://version)
OS: (e.g. Win7, OSX 10.9.5, etc...)

What steps will reproduce the problem?
(1) Set some flags in about:flags
(2) Export a log in about:net-export
(3) Export a log in about:net-internals
(4) Import them back into about:net-internals

What is the expected result?
Both logs contain about:flags information.

What happens instead?
Only the net-internals one does.

Please use labels and text to provide additional information.


For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 

Comment 1 by eroman@chromium.org, Apr 14 2017

Cc: wangyix@chromium.org
Labels: -Pri-3 Pri-2
Status: Available (was: Untriaged)
I imagine what happens is the ChromeNetLog singleton is being initialized with the command line early on during browser startup.

And the flags command lines are manufactured and shoved into CommandLine after this.

Comment 2 by eroman@chromium.org, Apr 26 2017

Labels: M-60
Owner: eroman@chromium.org
Status: Assigned (was: Available)

Comment 3 by eroman@chromium.org, May 31 2017

Labels: -M-60
Haven't had a chance to work on this yet, but too late for M60 as that has branched.

Comment 4 by eroman@chromium.org, Jun 29 2017

Status: Started (was: Assigned)
David, when I change about:flags settings, I get a prompt saying that "Your changes will take effect the next time you relaunch Google Chrome." 
If you relaunch Chrome, you should see the flags reflected in subsequent NetLogs. 

Did you relaunch Chrome after changing about:flags?

Yes. I just checked Chrome Canary and the issue is still there. Even without a restart, the --flag-switches-begin --flag-switches-end pair would end up there.

The issue was already confirmed and the cause diagnosed in comment #1. The cause is ChromeNetLog is created when BrowserProcessImpl is created, but that happens just before about:flags is applied in about_flags::ConvertFlagsToSwitches. (See ChromeBrowserMainParse::PreCreateThreadsImpl.)

Interestingly, CrOS seems to handle this differently here, probably so the flags affect the user session too?
https://cs.chromium.org/chromium/src/chrome/browser/chromeos/login/session/user_session_manager.cc?rcl=ca9fb2ee4a1fe804200b3b8916c81369a666e56a&l=268
https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/flags_ui.cc?type=cs&q=about_flags::ConvertFlagsToSwitches&l=235

Probably this means that this bug does not affect CrOS but does affect other platforms.
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 30 2017

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

commit 30355da69277622a7f6bb2129c0435b1e1223f49
Author: eroman <eroman@chromium.org>
Date: Fri Jun 30 17:59:00 2017

Fix about:flags information not showing up in chrome://net-export/ logs

Pass the command-line and channel as dependencies to StartNetLog() rather than saving them in the ChromeNetLog constructor.

The issue is that the CommandLine singleton may be mutated after ChromeNetLog has been initialized (it gets re-written to include synthesized switches for about:flags).

BUG= 711432 

Review-Url: https://codereview.chromium.org/2965623002
Cr-Commit-Position: refs/heads/master@{#483754}

[modify] https://crrev.com/30355da69277622a7f6bb2129c0435b1e1223f49/chrome/browser/ui/webui/net_export_ui.cc
[modify] https://crrev.com/30355da69277622a7f6bb2129c0435b1e1223f49/components/net_log/chrome_net_log.cc
[modify] https://crrev.com/30355da69277622a7f6bb2129c0435b1e1223f49/components/net_log/chrome_net_log.h
[modify] https://crrev.com/30355da69277622a7f6bb2129c0435b1e1223f49/components/net_log/net_log_file_writer.cc
[modify] https://crrev.com/30355da69277622a7f6bb2129c0435b1e1223f49/components/net_log/net_log_file_writer.h
[modify] https://crrev.com/30355da69277622a7f6bb2129c0435b1e1223f49/components/net_log/net_log_file_writer_unittest.cc
[modify] https://crrev.com/30355da69277622a7f6bb2129c0435b1e1223f49/ios/chrome/browser/ui/webui/net_export/BUILD.gn
[modify] https://crrev.com/30355da69277622a7f6bb2129c0435b1e1223f49/ios/chrome/browser/ui/webui/net_export/net_export_ui.cc

Comment 8 by eroman@chromium.org, Jun 30 2017

Status: Fixed (was: Started)
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 30 2017

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

commit 144002e61ba9773f3375290854e4dcaee320a218
Author: eroman <eroman@chromium.org>
Date: Fri Jun 30 21:19:27 2017

Fix net-export file path that is used on desktop.

This bug was introduced by 30355da69277622a7f6bb2129c0435b1e1223f49.

BUG= 711432 

Review-Url: https://codereview.chromium.org/2968723003
Cr-Commit-Position: refs/heads/master@{#483817}

[modify] https://crrev.com/144002e61ba9773f3375290854e4dcaee320a218/chrome/browser/ui/webui/net_export_ui.cc

Sign in to add a comment