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

Unified Diff: google_apis/gcm/tools/mcs_probe.cc

Issue 612023003: Make --log-net-log and NetLogLogger hide cookies by default, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix new test Created 6 years, 3 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
Index: google_apis/gcm/tools/mcs_probe.cc
diff --git a/google_apis/gcm/tools/mcs_probe.cc b/google_apis/gcm/tools/mcs_probe.cc
index c86b3e30603e6b539f1e5d4befeba5ba6e1b9a4f..099035d817441c69405cdcd6f7342691abbb5721 100644
--- a/google_apis/gcm/tools/mcs_probe.cc
+++ b/google_apis/gcm/tools/mcs_probe.cc
@@ -162,15 +162,6 @@ class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter {
scoped_ptr<MyTestURLRequestContext> context_;
};
-// A net log that logs all events by default.
-class MyTestNetLog : public net::NetLog {
- public:
- MyTestNetLog() {
- SetBaseLogLevel(LOG_ALL);
- }
- virtual ~MyTestNetLog() {}
-};
-
// A cert verifier that access all certificates.
class MyTestCertVerifier : public net::CertVerifier {
public:
@@ -229,9 +220,8 @@ class MCSProbe {
// Network state.
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
- MyTestNetLog net_log_;
+ net::NetLog net_log_;
scoped_ptr<net::NetLogLogger> logger_;
- scoped_ptr<base::Value> net_constants_;
scoped_ptr<net::HostResolver> host_resolver_;
scoped_ptr<net::CertVerifier> cert_verifier_;
scoped_ptr<net::ChannelIDService> system_channel_id_service_;
@@ -364,9 +354,10 @@ void MCSProbe::InitializeNetworkState() {
log_file = fopen(log_path.value().c_str(), "w");
#endif
}
- net_constants_.reset(net::NetLogLogger::GetConstants());
if (log_file != NULL) {
- logger_.reset(new net::NetLogLogger(log_file, *net_constants_));
+ scoped_ptr<base::Value> net_constants(net::NetLogLogger::GetConstants());
+ logger_.reset(new net::NetLogLogger(log_file, *net_constants));
+ logger_->set_log_level(net::NetLog::LOG_ALL_BUT_BYTES);
logger_->StartObserving(&net_log_);
}

Powered by Google App Engine
This is Rietveld 408576698