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

Unified Diff: chrome/browser/ui/webui/net_export_ui.cc

Issue 2965623002: Fix about:flags information not showing up in chrome://net-export/ logs (Closed)
Patch Set: . Created 3 years, 6 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
« no previous file with comments | « no previous file | components/net_log/chrome_net_log.h » ('j') | components/net_log/chrome_net_log.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/net_export_ui.cc
diff --git a/chrome/browser/ui/webui/net_export_ui.cc b/chrome/browser/ui/webui/net_export_ui.cc
index 3f5b6f896fb509650eaa3611d154f224ef03db1a..24cad05fa305376d4df489ba23d4dc6a7ccde28d 100644
--- a/chrome/browser/ui/webui/net_export_ui.cc
+++ b/chrome/browser/ui/webui/net_export_ui.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/chrome_select_file_policy.h"
+#include "chrome/common/channel_info.h"
#include "chrome/common/url_constants.h"
#include "components/grit/components_resources.h"
#include "components/net_log/chrome_net_log.h"
@@ -111,6 +112,8 @@ class NetExportMessageHandler
// Send NetLog data via email.
static void SendEmail(const base::FilePath& file_to_send);
+ void StartNetLog(const base::FilePath& path);
+
// Reveal |path| in the shell on desktop platforms.
void ShowFileInShell(const base::FilePath& path);
@@ -222,8 +225,7 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
net_log::NetLogFileWriter::CaptureModeFromString(capture_mode_string);
if (UsingMobileUI()) {
- file_writer_->StartNetLog(base::FilePath(), capture_mode_,
- GetURLRequestContexts());
+ StartNetLog(base::FilePath());
} else {
base::FilePath initial_dir = last_save_dir.Pointer()->empty() ?
DownloadPrefs::FromBrowserContext(
@@ -280,7 +282,7 @@ void NetExportMessageHandler::FileSelected(const base::FilePath& path,
DCHECK(select_file_dialog_);
*last_save_dir.Pointer() = path.DirName();
- file_writer_->StartNetLog(path, capture_mode_, GetURLRequestContexts());
+ StartNetLog(path);
// IMPORTANT: resetting the dialog may lead to the deletion of |path|, so keep
// this line last.
@@ -315,6 +317,15 @@ void NetExportMessageHandler::SendEmail(const base::FilePath& file_to_send) {
#endif
}
+void NetExportMessageHandler::StartNetLog(const base::FilePath& path) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+ file_writer_->StartNetLog(
+ base::FilePath(), capture_mode_,
+ base::CommandLine::ForCurrentProcess()->GetCommandLineString(),
+ chrome::GetChannelString(), GetURLRequestContexts());
+}
+
void NetExportMessageHandler::ShowFileInShell(const base::FilePath& path) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (path.empty())
« no previous file with comments | « no previous file | components/net_log/chrome_net_log.h » ('j') | components/net_log/chrome_net_log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698