summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/cronet/android/cronet_url_request_context_adapter.cc4
-rw-r--r--components/cronet/android/cronet_url_request_context_adapter.h4
-rw-r--r--components/cronet/android/url_request_context_adapter.cc4
-rw-r--r--components/cronet/android/url_request_context_adapter.h4
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc2
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc4
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc4
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc2
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h2
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc4
-rw-r--r--components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h6
-rw-r--r--components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc28
12 files changed, 33 insertions, 35 deletions
diff --git a/components/cronet/android/cronet_url_request_context_adapter.cc b/components/cronet/android/cronet_url_request_context_adapter.cc
index ef4e9f5c..5a1f569 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.cc
+++ b/components/cronet/android/cronet_url_request_context_adapter.cc
@@ -18,7 +18,7 @@
#include "net/base/net_errors.h"
#include "net/base/network_delegate_impl.h"
#include "net/http/http_auth_handler_factory.h"
-#include "net/log/net_log_logger.h"
+#include "net/log/write_to_file_net_log_observer.h"
#include "net/proxy/proxy_service.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h"
@@ -293,7 +293,7 @@ void CronetURLRequestContextAdapter::StartNetLogToFileOnNetworkThread(
if (!file)
return;
- net_log_logger_.reset(new net::NetLogLogger());
+ net_log_logger_.reset(new net::WriteToFileNetLogObserver());
net_log_logger_->StartObserving(context_->net_log(), file.Pass(), nullptr,
context_.get());
}
diff --git a/components/cronet/android/cronet_url_request_context_adapter.h b/components/cronet/android/cronet_url_request_context_adapter.h
index da44d0f..d20c02fc 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.h
+++ b/components/cronet/android/cronet_url_request_context_adapter.h
@@ -22,7 +22,7 @@ class SingleThreadTaskRunner;
} // namespace base
namespace net {
-class NetLogLogger;
+class WriteToFileNetLogObserver;
class URLRequestContext;
class ProxyConfigService;
} // namespace net
@@ -87,7 +87,7 @@ class CronetURLRequestContextAdapter {
// Network thread is owned by |this|, but is destroyed from java thread.
base::Thread* network_thread_;
// |net_log_logger_| and |context_| should only be accessed on network thread.
- scoped_ptr<net::NetLogLogger> net_log_logger_;
+ scoped_ptr<net::WriteToFileNetLogObserver> net_log_logger_;
scoped_ptr<net::URLRequestContext> context_;
scoped_ptr<net::ProxyConfigService> proxy_config_service_;
diff --git a/components/cronet/android/url_request_context_adapter.cc b/components/cronet/android/url_request_context_adapter.cc
index 6ce58d0..45ed5fb 100644
--- a/components/cronet/android/url_request_context_adapter.cc
+++ b/components/cronet/android/url_request_context_adapter.cc
@@ -21,7 +21,7 @@
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_network_layer.h"
#include "net/http/http_server_properties.h"
-#include "net/log/net_log_logger.h"
+#include "net/log/write_to_file_net_log_observer.h"
#include "net/proxy/proxy_service.h"
#include "net/ssl/ssl_config_service_defaults.h"
#include "net/url_request/static_http_user_agent_settings.h"
@@ -285,7 +285,7 @@ void URLRequestContextAdapter::StartNetLogToFileHelper(
if (!file)
return;
- net_log_logger_.reset(new net::NetLogLogger());
+ net_log_logger_.reset(new net::WriteToFileNetLogObserver());
net_log_logger_->StartObserving(context_->net_log(), file.Pass(), nullptr,
context_.get());
}
diff --git a/components/cronet/android/url_request_context_adapter.h b/components/cronet/android/url_request_context_adapter.h
index bc741f1..932ad92 100644
--- a/components/cronet/android/url_request_context_adapter.h
+++ b/components/cronet/android/url_request_context_adapter.h
@@ -21,7 +21,7 @@
namespace net {
-class NetLogLogger;
+class WriteToFileNetLogObserver;
class ProxyConfigService;
@@ -107,7 +107,7 @@ class URLRequestContextAdapter : public net::URLRequestContextGetter {
bool load_disable_cache_;
base::Thread* network_thread_;
scoped_ptr<NetLogObserver> net_log_observer_;
- scoped_ptr<net::NetLogLogger> net_log_logger_;
+ scoped_ptr<net::WriteToFileNetLogObserver> net_log_logger_;
scoped_ptr<net::ProxyConfigService> proxy_config_service_;
scoped_ptr<URLRequestContextConfig> config_;
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc
index 44746c1..c397da4 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc
@@ -13,7 +13,7 @@
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
-#include "net/log/capturing_net_log.h"
+#include "net/log/test_net_log.h"
#include "net/proxy/proxy_server.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_request_test_util.h"
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
index bb8fb3d..ee10e1d 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
@@ -10,7 +10,7 @@
#include "base/test/test_simple_task_runner.h"
#include "base/values.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
-#include "net/log/capturing_net_log.h"
+#include "net/log/test_net_log.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -20,7 +20,7 @@ class DataReductionProxyConfiguratorTest : public testing::Test {
public:
void SetUp() override {
task_runner_ = new base::TestSimpleTaskRunner();
- net_log_.reset(new net::CapturingNetLog());
+ net_log_.reset(new net::TestNetLog());
data_reduction_proxy_event_store_.reset(
new data_reduction_proxy::DataReductionProxyEventStore(task_runner_));
config_.reset(new DataReductionProxyConfigurator(
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
index 8475211..b4189e2 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
@@ -24,7 +24,7 @@
#include "net/base/net_errors.h"
#include "net/base/request_priority.h"
#include "net/http/http_response_headers.h"
-#include "net/log/capturing_net_log.h"
+#include "net/log/test_net_log.h"
#include "net/proxy/proxy_server.h"
#include "net/socket/socket_test_util.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
@@ -235,7 +235,7 @@ class DataReductionProxyInterceptorWithServerTest : public testing::Test {
}
private:
- net::CapturingNetLog net_log_;
+ net::TestNetLog net_log_;
net::TestNetworkDelegate network_delegate_;
net::TestURLRequestContext context_;
net::test_server::EmbeddedTestServer proxy_;
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
index bf130c2..2556ed2 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
@@ -18,8 +18,8 @@
#include "net/base/host_port_pair.h"
#include "net/base/load_flags.h"
#include "net/http/http_response_headers.h"
-#include "net/log/capturing_net_log.h"
#include "net/log/net_log.h"
+#include "net/log/test_net_log.h"
#include "net/proxy/proxy_config.h"
#include "net/proxy/proxy_server.h"
#include "net/url_request/url_request.h"
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h
index bfe3947..3df3671 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h
@@ -12,7 +12,7 @@
#include "base/prefs/testing_pref_service.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h"
#include "net/base/net_util.h"
-#include "net/log/capturing_net_log.h"
+#include "net/log/test_net_log.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_request_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
index 921a99a..7aff4be 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
@@ -296,7 +296,7 @@ DataReductionProxyTestContext::Builder::Build() {
scoped_refptr<net::URLRequestContextGetter> request_context_getter;
scoped_ptr<TestingPrefServiceSimple> pref_service(
new TestingPrefServiceSimple());
- scoped_ptr<net::CapturingNetLog> net_log(new net::CapturingNetLog());
+ scoped_ptr<net::TestNetLog> net_log(new net::TestNetLog());
if (request_context_) {
request_context_getter = new net::TrivialURLRequestContextGetter(
request_context_, task_runner);
@@ -400,7 +400,7 @@ DataReductionProxyTestContext::DataReductionProxyTestContext(
scoped_ptr<base::MessageLoop> loop,
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
scoped_ptr<TestingPrefServiceSimple> simple_pref_service,
- scoped_ptr<net::CapturingNetLog> net_log,
+ scoped_ptr<net::TestNetLog> net_log,
scoped_refptr<net::URLRequestContextGetter> request_context_getter,
net::MockClientSocketFactory* mock_socket_factory,
scoped_ptr<TestDataReductionProxyIOData> io_data,
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h
index 7b2add4..d51e316 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h
@@ -19,7 +19,7 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h"
#include "net/base/backoff_entry.h"
-#include "net/log/capturing_net_log.h"
+#include "net/log/test_net_log.h"
#include "testing/gmock/include/gmock/gmock.h"
class TestingPrefServiceSimple;
@@ -391,7 +391,7 @@ class DataReductionProxyTestContext {
scoped_ptr<base::MessageLoop> loop,
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
scoped_ptr<TestingPrefServiceSimple> simple_pref_service,
- scoped_ptr<net::CapturingNetLog> net_log,
+ scoped_ptr<net::TestNetLog> net_log,
scoped_refptr<net::URLRequestContextGetter> request_context_getter,
net::MockClientSocketFactory* mock_socket_factory,
scoped_ptr<TestDataReductionProxyIOData> io_data,
@@ -410,7 +410,7 @@ class DataReductionProxyTestContext {
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
scoped_ptr<TestingPrefServiceSimple> simple_pref_service_;
- scoped_ptr<net::CapturingNetLog> net_log_;
+ scoped_ptr<net::TestNetLog> net_log_;
scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
// Non-owned pointer. Will be NULL if |this| was built without specifying a
// |net::MockClientSocketFactory|.
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
index a02d92a..6f266dd 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
@@ -10,8 +10,8 @@
#include "base/strings/string_number_conversions.h"
#include "base/test/test_simple_task_runner.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h"
-#include "net/log/capturing_net_log.h"
#include "net/log/net_log.h"
+#include "net/log/test_net_log.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace data_reduction_proxy {
@@ -20,8 +20,8 @@ class DataReductionProxyEventStoreTest : public testing::Test {
public:
DataReductionProxyEventStoreTest()
: task_runner_(scoped_refptr<base::TestSimpleTaskRunner>(
- new base::TestSimpleTaskRunner())),
- net_log_(new net::CapturingNetLog()) {
+ new base::TestSimpleTaskRunner())),
+ net_log_(new net::TestNetLog()) {
bound_net_log_ = net::BoundNetLog::Make(
net_log_.get(), net::NetLog::SOURCE_DATA_REDUCTION_PROXY);
}
@@ -30,8 +30,8 @@ class DataReductionProxyEventStoreTest : public testing::Test {
proxy_.reset(new DataReductionProxyEventStore(task_runner_));
}
- net::CapturingNetLog::CapturedEntry GetSingleEntry() const {
- net::CapturingNetLog::CapturedEntryList entries;
+ net::TestNetLog::CapturedEntry GetSingleEntry() const {
+ net::TestNetLog::CapturedEntryList entries;
net_log_->GetEntries(&entries);
EXPECT_EQ(1u, entries.size());
return entries[0];
@@ -45,9 +45,7 @@ class DataReductionProxyEventStoreTest : public testing::Test {
return task_runner_.get();
}
- net::CapturingNetLog* net_log() {
- return net_log_.get();
- }
+ net::TestNetLog* net_log() { return net_log_.get(); }
const net::BoundNetLog& bound_net_log() {
return bound_net_log_;
@@ -55,7 +53,7 @@ class DataReductionProxyEventStoreTest : public testing::Test {
private:
scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
- scoped_ptr<net::CapturingNetLog> net_log_;
+ scoped_ptr<net::TestNetLog> net_log_;
scoped_ptr<DataReductionProxyEventStore> proxy_;
net::BoundNetLog bound_net_log_;
};
@@ -69,7 +67,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddProxyEnabledEvent) {
TestDataReductionProxyParams::DefaultSSLOrigin());
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_ENABLED,
entry.type);
}
@@ -79,7 +77,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddProxyDisabledEvent) {
proxy()->AddProxyDisabledEvent(net_log());
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_ENABLED,
entry.type);
}
@@ -91,7 +89,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddBypassActionEvent) {
base::TimeDelta::FromMinutes(1));
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_BYPASS_REQUESTED,
entry.type);
EXPECT_NE(nullptr, proxy()->last_bypass_event_.get());
@@ -105,7 +103,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestAddBypassTypeEvent) {
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
EXPECT_EQ(1u, net_log()->GetSize());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_BYPASS_REQUESTED,
entry.type);
EXPECT_NE(nullptr, proxy()->last_bypass_event_.get());
@@ -118,7 +116,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestBeginSecureProxyCheck) {
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
EXPECT_EQ(1u, net_log()->GetSize());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_CANARY_REQUEST,
entry.type);
EXPECT_EQ(CHECK_PENDING, proxy()->secure_proxy_check_state_);
@@ -131,7 +129,7 @@ TEST_F(DataReductionProxyEventStoreTest, TestEndSecureProxyCheck) {
task_runner()->RunPendingTasks();
EXPECT_EQ(1u, proxy()->stored_events_.size());
EXPECT_EQ(1u, net_log()->GetSize());
- net::CapturingNetLog::CapturedEntry entry = GetSingleEntry();
+ net::TestNetLog::CapturedEntry entry = GetSingleEntry();
EXPECT_EQ(net::NetLog::TYPE_DATA_REDUCTION_PROXY_CANARY_REQUEST,
entry.type);
EXPECT_EQ(CHECK_SUCCESS, proxy()->secure_proxy_check_state_);