Index: chrome/browser/safe_browsing/client_side_detection_service_unittest.cc |
diff --git a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc |
index cea82c8adc5110fbab7d2e43217e990b8c5ac860..9498d8838a5ee0bb38dd8d1ebf78ce1308e32872 100644 |
--- a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc |
+++ b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc |
@@ -15,6 +15,7 @@ |
#include "base/callback.h" |
#include "base/logging.h" |
#include "base/macros.h" |
+#include "base/memory/ptr_util.h" |
#include "base/message_loop/message_loop.h" |
#include "base/metrics/field_trial.h" |
#include "base/run_loop.h" |
@@ -155,42 +156,40 @@ class ClientSideDetectionServiceTest : public testing::Test { |
void SetCache(const GURL& gurl, bool is_phishing, base::Time time) { |
csd_service_->cache_[gurl] = |
- make_linked_ptr(new ClientSideDetectionService::CacheState(is_phishing, |
- time)); |
+ base::MakeUnique<ClientSideDetectionService::CacheState>( |
+ is_phishing, time); |
} |
void TestCache() { |
- ClientSideDetectionService::PhishingCache& cache = csd_service_->cache_; |
+ auto& cache = csd_service_->cache_; |
base::Time now = base::Time::Now(); |
base::Time time = |
now - base::TimeDelta::FromDays( |
ClientSideDetectionService::kNegativeCacheIntervalDays) + |
base::TimeDelta::FromMinutes(5); |
cache[GURL("http://first.url.com/")] = |
- make_linked_ptr(new ClientSideDetectionService::CacheState(false, |
- time)); |
+ base::MakeUnique<ClientSideDetectionService::CacheState>(false, time); |
time = |
now - base::TimeDelta::FromDays( |
ClientSideDetectionService::kNegativeCacheIntervalDays) - |
base::TimeDelta::FromHours(1); |
- cache[GURL("http://second.url.com/")] = |
- make_linked_ptr(new ClientSideDetectionService::CacheState(false, |
- time)); |
+ cache[GURL("http://second.url.com/")] |
+ = base::MakeUnique<ClientSideDetectionService::CacheState>(false, time); |
time = |
now - base::TimeDelta::FromMinutes( |
ClientSideDetectionService::kPositiveCacheIntervalMinutes) - |
base::TimeDelta::FromMinutes(5); |
- cache[GURL("http://third.url.com/")] = |
- make_linked_ptr(new ClientSideDetectionService::CacheState(true, time)); |
+ cache[GURL("http://third.url.com/")] |
+ = base::MakeUnique<ClientSideDetectionService::CacheState>(true, time); |
time = |
now - base::TimeDelta::FromMinutes( |
ClientSideDetectionService::kPositiveCacheIntervalMinutes) + |
base::TimeDelta::FromMinutes(5); |
cache[GURL("http://fourth.url.com/")] = |
- make_linked_ptr(new ClientSideDetectionService::CacheState(true, time)); |
+ base::MakeUnique<ClientSideDetectionService::CacheState>(true, time); |
csd_service_->UpdateCache(); |