diff options
Diffstat (limited to 'chromium/components/domain_reliability')
10 files changed, 21 insertions, 18 deletions
diff --git a/chromium/components/domain_reliability/dispatcher.cc b/chromium/components/domain_reliability/dispatcher.cc index 00166e62201..0dd1c17674a 100644 --- a/chromium/components/domain_reliability/dispatcher.cc +++ b/chromium/components/domain_reliability/dispatcher.cc @@ -10,7 +10,6 @@ #include "base/bind.h" #include "base/callback.h" -#include "base/message_loop/message_loop.h" #include "base/timer/timer.h" #include "components/domain_reliability/util.h" diff --git a/chromium/components/domain_reliability/header.cc b/chromium/components/domain_reliability/header.cc index 0d2136d8a12..cefcd602a52 100644 --- a/chromium/components/domain_reliability/header.cc +++ b/chromium/components/domain_reliability/header.cc @@ -278,7 +278,7 @@ DomainReliabilityHeader::ReleaseConfig() { } std::string DomainReliabilityHeader::ToString() const { - std::string string = ""; + std::string string; int64_t max_age_s = max_age_.InSeconds(); if (config_->collectors.empty()) { @@ -314,7 +314,7 @@ DomainReliabilityHeader::DomainReliabilityHeader( base::TimeDelta max_age) : status_(status), config_(std::move(config)), max_age_(max_age) { DCHECK_EQ(PARSE_SET_CONFIG, status_); - DCHECK(config_.get()); + DCHECK(config_); DCHECK_NE(0, max_age_.InMicroseconds()); } diff --git a/chromium/components/domain_reliability/monitor.cc b/chromium/components/domain_reliability/monitor.cc index a5cf89e8aca..64cf9b17883 100644 --- a/chromium/components/domain_reliability/monitor.cc +++ b/chromium/components/domain_reliability/monitor.cc @@ -336,7 +336,7 @@ void DomainReliabilityMonitor::OnRequestLegComplete( return; int response_code; - if (request.response_info.headers.get()) + if (request.response_info.headers) response_code = request.response_info.headers->response_code(); else response_code = -1; @@ -394,7 +394,7 @@ void DomainReliabilityMonitor::OnRequestLegComplete( void DomainReliabilityMonitor::MaybeHandleHeader( const RequestInfo& request) { - if (!request.response_info.headers.get()) + if (!request.response_info.headers) return; size_t iter = 0; diff --git a/chromium/components/domain_reliability/quic_error_mapping.h b/chromium/components/domain_reliability/quic_error_mapping.h index f9d373b27d6..48e5b238dfb 100644 --- a/chromium/components/domain_reliability/quic_error_mapping.h +++ b/chromium/components/domain_reliability/quic_error_mapping.h @@ -7,7 +7,7 @@ #include <string> -#include "net/quic/core/quic_packets.h" +#include "net/third_party/quic/core/quic_packets.h" // N.B. This file and the .cc are separate from util.h/.cc so that they can be // independently updated by folks working on QUIC when new errors are added. diff --git a/chromium/components/domain_reliability/service.cc b/chromium/components/domain_reliability/service.cc index ed369b869d6..3efe542ef57 100644 --- a/chromium/components/domain_reliability/service.cc +++ b/chromium/components/domain_reliability/service.cc @@ -65,7 +65,7 @@ class DomainReliabilityServiceImpl : public DomainReliabilityService { scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, scoped_refptr<base::SingleThreadTaskRunner> network_task_runner) override { - DCHECK(!network_task_runner_.get()); + DCHECK(!network_task_runner_); std::unique_ptr<DomainReliabilityMonitor> monitor( new DomainReliabilityMonitor( @@ -86,7 +86,7 @@ class DomainReliabilityServiceImpl : public DomainReliabilityService { DomainReliabilityClearMode clear_mode, const base::Callback<bool(const GURL&)>& origin_filter, const base::Closure& callback) override { - DCHECK(network_task_runner_.get()); + DCHECK(network_task_runner_); network_task_runner_->PostTaskAndReply( FROM_HERE, base::Bind(&DomainReliabilityMonitor::ClearBrowsingData, @@ -96,7 +96,7 @@ class DomainReliabilityServiceImpl : public DomainReliabilityService { void GetWebUIData(const base::Callback<void(std::unique_ptr<base::Value>)>& callback) const override { - DCHECK(network_task_runner_.get()); + DCHECK(network_task_runner_); PostTaskAndReplyWithResult( network_task_runner_.get(), @@ -106,7 +106,7 @@ class DomainReliabilityServiceImpl : public DomainReliabilityService { } void SetDiscardUploadsForTesting(bool discard_uploads) override { - DCHECK(network_task_runner_.get()); + DCHECK(network_task_runner_); network_task_runner_->PostTask( FROM_HERE, @@ -117,7 +117,7 @@ class DomainReliabilityServiceImpl : public DomainReliabilityService { void AddContextForTesting( std::unique_ptr<const DomainReliabilityConfig> config) override { - DCHECK(network_task_runner_.get()); + DCHECK(network_task_runner_); network_task_runner_->PostTask( FROM_HERE, base::BindOnce(&AddContextForTestingOnNetworkTaskRunner, @@ -125,7 +125,7 @@ class DomainReliabilityServiceImpl : public DomainReliabilityService { } void ForceUploadsForTesting() override { - DCHECK(network_task_runner_.get()); + DCHECK(network_task_runner_); network_task_runner_->PostTask( FROM_HERE, diff --git a/chromium/components/domain_reliability/service_unittest.cc b/chromium/components/domain_reliability/service_unittest.cc index 301b8df1b0e..84a1b1b459b 100644 --- a/chromium/components/domain_reliability/service_unittest.cc +++ b/chromium/components/domain_reliability/service_unittest.cc @@ -5,8 +5,8 @@ #include "components/domain_reliability/service.h" #include "base/logging.h" -#include "base/message_loop/message_loop.h" #include "base/run_loop.h" +#include "base/single_thread_task_runner.h" #include "base/test/test_simple_task_runner.h" #include "base/time/time.h" #include "components/domain_reliability/monitor.h" diff --git a/chromium/components/domain_reliability/test_util.cc b/chromium/components/domain_reliability/test_util.cc index e34d1bd59cb..c805207e282 100644 --- a/chromium/components/domain_reliability/test_util.cc +++ b/chromium/components/domain_reliability/test_util.cc @@ -121,7 +121,9 @@ MockTime::MockTime() MockTime::~MockTime() {} -base::Time MockTime::Now() { return now_; } +base::Time MockTime::Now() const { + return now_; +} base::TimeTicks MockTime::NowTicks() const { return now_ticks_; } diff --git a/chromium/components/domain_reliability/test_util.h b/chromium/components/domain_reliability/test_util.h index 30d32d08d8d..725f3ae66a9 100644 --- a/chromium/components/domain_reliability/test_util.h +++ b/chromium/components/domain_reliability/test_util.h @@ -75,7 +75,7 @@ class MockTime : public MockableTime { ~MockTime() override; // MockableTime implementation: - base::Time Now() override; + base::Time Now() const override; base::TimeTicks NowTicks() const override; std::unique_ptr<MockableTime::Timer> CreateTimer() override; diff --git a/chromium/components/domain_reliability/util.cc b/chromium/components/domain_reliability/util.cc index 5895c7653b2..27ebf275d9c 100644 --- a/chromium/components/domain_reliability/util.cc +++ b/chromium/components/domain_reliability/util.cc @@ -241,7 +241,9 @@ MockableTime::MockableTime() {} ActualTime::ActualTime() {} ActualTime::~ActualTime() {} -base::Time ActualTime::Now() { return base::Time::Now(); } +base::Time ActualTime::Now() const { + return base::Time::Now(); +} base::TimeTicks ActualTime::NowTicks() const { return base::TimeTicks::Now(); } diff --git a/chromium/components/domain_reliability/util.h b/chromium/components/domain_reliability/util.h index 0b95d2329e6..b0fba9d5e55 100644 --- a/chromium/components/domain_reliability/util.h +++ b/chromium/components/domain_reliability/util.h @@ -82,7 +82,7 @@ class DOMAIN_RELIABILITY_EXPORT MockableTime : public base::Clock, ~MockableTime() override; // Clock impl; returns base::Time::Now() or a mocked version thereof. - base::Time Now() override = 0; + base::Time Now() const override = 0; // TickClock impl; returns base::TimeTicks::Now() or a mocked version thereof. base::TimeTicks NowTicks() const override = 0; @@ -105,7 +105,7 @@ class DOMAIN_RELIABILITY_EXPORT ActualTime : public MockableTime { ~ActualTime() override; // MockableTime implementation: - base::Time Now() override; + base::Time Now() const override; base::TimeTicks NowTicks() const override; std::unique_ptr<MockableTime::Timer> CreateTimer() override; }; |