diff options
author | vishal.b <vishal.b@samsung.com> | 2015-04-17 01:45:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-17 08:46:07 +0000 |
commit | 62985ca964bae26730280620d01a606eeff1d226 (patch) | |
tree | 52f6c9ad2f7b20990796d14687a5d0b79780baf7 /components/data_reduction_proxy | |
parent | 817cf387dbb2b63fb8c00f0f9b1535a152d88b62 (diff) | |
download | chromium_src-62985ca964bae26730280620d01a606eeff1d226.zip chromium_src-62985ca964bae26730280620d01a606eeff1d226.tar.gz chromium_src-62985ca964bae26730280620d01a606eeff1d226.tar.bz2 |
Rename NetLogLogger and CapturingNetLog
Renaming two classes
CapturingNetLog --> TestNetLog
NetLogLogger --> WriteToFileNetLogObserver
BUG=473252
TBR=jam,mmenke
Review URL: https://codereview.chromium.org/1084533002
Cr-Commit-Position: refs/heads/master@{#325611}
Diffstat (limited to 'components/data_reduction_proxy')
8 files changed, 25 insertions, 27 deletions
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_); |