| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_d
etector.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_d
etector.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 << history_path.value(); | 72 << history_path.value(); |
| 73 return nullptr; | 73 return nullptr; |
| 74 } | 74 } |
| 75 | 75 |
| 76 scoped_ptr<history::HistoryService> history_service( | 76 scoped_ptr<history::HistoryService> history_service( |
| 77 new history::HistoryService( | 77 new history::HistoryService( |
| 78 make_scoped_ptr(new ChromeHistoryClient( | 78 make_scoped_ptr(new ChromeHistoryClient( |
| 79 BookmarkModelFactory::GetForProfile(profile))), | 79 BookmarkModelFactory::GetForProfile(profile))), |
| 80 scoped_ptr<history::VisitDelegate>())); | 80 scoped_ptr<history::VisitDelegate>())); |
| 81 if (history_service->Init( | 81 if (history_service->Init( |
| 82 profile->GetPrefs()->GetString(prefs::kAcceptLanguages), | |
| 83 history::HistoryDatabaseParamsForPath(profile->GetPath()))) { | 82 history::HistoryDatabaseParamsForPath(profile->GetPath()))) { |
| 84 return std::move(history_service); | 83 return std::move(history_service); |
| 85 } | 84 } |
| 86 | 85 |
| 87 ADD_FAILURE() << "failed to initialize history service"; | 86 ADD_FAILURE() << "failed to initialize history service"; |
| 88 return nullptr; | 87 return nullptr; |
| 89 } | 88 } |
| 90 | 89 |
| 91 } // namespace | 90 } // namespace |
| 92 | 91 |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 } | 598 } |
| 600 | 599 |
| 601 INSTANTIATE_TEST_CASE_P(OffDomainInclusionDetectorTestInstance, | 600 INSTANTIATE_TEST_CASE_P(OffDomainInclusionDetectorTestInstance, |
| 602 OffDomainInclusionDetectorTest, | 601 OffDomainInclusionDetectorTest, |
| 603 Values(TestCase::WHITELISTED, | 602 Values(TestCase::WHITELISTED, |
| 604 TestCase::IN_HISTORY, | 603 TestCase::IN_HISTORY, |
| 605 TestCase::IN_HISTORY_AND_WHITELISTED, | 604 TestCase::IN_HISTORY_AND_WHITELISTED, |
| 606 TestCase::UNKNOWN)); | 605 TestCase::UNKNOWN)); |
| 607 | 606 |
| 608 } // namespace safe_browsing | 607 } // namespace safe_browsing |
| OLD | NEW |