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

Unified Diff: components/cronet/android/cronet_url_request_context_adapter.cc

Issue 2698143004: Add ongoing events to net-export log when logging starts (Closed)
Patch Set: Fixed Eric's comments from ps10 Created 3 years, 10 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 | « chrome/browser/ui/webui/net_export_ui.cc ('k') | components/net_log/net_log_file_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/cronet_url_request_context_adapter.cc
diff --git a/components/cronet/android/cronet_url_request_context_adapter.cc b/components/cronet/android/cronet_url_request_context_adapter.cc
index 7d0bf0f5f2e7eb86a411b0f72bcf07c3f524077e..a74342c49927392d7455a943f153c02c9a3564cb 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.cc
+++ b/components/cronet/android/cronet_url_request_context_adapter.cc
@@ -10,6 +10,7 @@
#include <limits>
#include <map>
+#include <set>
xunjieli 2017/02/24 18:49:03 why is this needed?
wangyix1 2017/02/24 22:07:19 The first param to CreateNetLogEntriesForActiveObj
xunjieli 2017/02/24 22:10:08 Acknowledged.
eroman 2017/02/24 23:43:45 I don't think you quite answered Helen's question.
#include <utility>
#include <vector>
@@ -1022,16 +1023,18 @@ void CronetURLRequestContextAdapter::StartNetLogToBoundedFileOnNetworkThread(
base::FilePath file_path(dir_path);
DCHECK(base::PathIsWritable(file_path));
- bounded_file_observer_.reset(
- new net::FileNetLogObserver(GetFileThread()->task_runner()));
+ bounded_file_observer_ = net::FileNetLogObserver::CreateBounded(
+ GetFileThread()->task_runner(), file_path, size, kNumNetLogEventFiles,
+ /*constants=*/nullptr);
+
+ CreateNetLogEntriesForActiveObjects({context_.get()},
+ bounded_file_observer_.get());
net::NetLogCaptureMode capture_mode =
include_socket_bytes ? net::NetLogCaptureMode::IncludeSocketBytes()
: net::NetLogCaptureMode::Default();
-
- bounded_file_observer_->StartObservingBounded(
- g_net_log.Get().net_log(), capture_mode, file_path,
- /*constants=*/nullptr, context_.get(), size, kNumNetLogEventFiles);
+ bounded_file_observer_->StartObserving(g_net_log.Get().net_log(),
+ capture_mode);
}
void CronetURLRequestContextAdapter::StopBoundedFileNetLogOnNetworkThread() {
« no previous file with comments | « chrome/browser/ui/webui/net_export_ui.cc ('k') | components/net_log/net_log_file_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698