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..75740480b0b98e0a24f86e33129857169ff7e472 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 scoped_ptr<KeyedService>(); |
sky
2015/06/08 20:18:49
nullptr (and 83).
Ilya Sherman
2015/06/08 22:11:43
Done.
|
} |
- 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 scoped_ptr<KeyedService>(); |
} |
} // namespace |