Index: chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc |
diff --git a/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc |
index 22d7cf89e39caaf91e4c1797d0121d5757a4c4ac..862a657b1255c55e0fed8e5cd6696acd28a6dcc7 100644 |
--- a/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc |
+++ b/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc |
@@ -56,7 +56,7 @@ const int kFakeRenderProcessId = 123; |
// A BrowserContextKeyedServiceFactory::TestingFactoryFunction that creates a |
// HistoryService for a TestingProfile. |
-KeyedService* BuildHistoryService(content::BrowserContext* context) { |
+scoped_ptr<KeyedService> BuildHistoryService(content::BrowserContext* context) { |
TestingProfile* profile = static_cast<TestingProfile*>(context); |
// Delete the file before creating the service. |
@@ -66,21 +66,21 @@ KeyedService* BuildHistoryService(content::BrowserContext* context) { |
base::PathExists(history_path)) { |
ADD_FAILURE() << "failed to delete history db file " |
<< history_path.value(); |
- return NULL; |
+ return nullptr; |
} |
- history::HistoryService* history_service = new history::HistoryService( |
- ChromeHistoryClientFactory::GetForProfile(profile), |
- scoped_ptr<history::VisitDelegate>()); |
+ scoped_ptr<history::HistoryService> history_service( |
+ new history::HistoryService( |
+ ChromeHistoryClientFactory::GetForProfile(profile), |
+ scoped_ptr<history::VisitDelegate>())); |
if (history_service->Init( |
profile->GetPrefs()->GetString(prefs::kAcceptLanguages), |
history::HistoryDatabaseParamsForPath(profile->GetPath()))) { |
- return history_service; |
+ return history_service.Pass(); |
} |
ADD_FAILURE() << "failed to initialize history service"; |
- delete history_service; |
- return NULL; |
+ return nullptr; |
} |
} // namespace |