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/last_download_finder.h
" | 5 #include "chrome/browser/safe_browsing/incident_reporting/last_download_finder.h
" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 << history_path.value(); | 65 << history_path.value(); |
66 return nullptr; | 66 return nullptr; |
67 } | 67 } |
68 | 68 |
69 scoped_ptr<history::HistoryService> history_service( | 69 scoped_ptr<history::HistoryService> history_service( |
70 new history::HistoryService( | 70 new history::HistoryService( |
71 make_scoped_ptr(new ChromeHistoryClient( | 71 make_scoped_ptr(new ChromeHistoryClient( |
72 BookmarkModelFactory::GetForProfile(profile))), | 72 BookmarkModelFactory::GetForProfile(profile))), |
73 scoped_ptr<history::VisitDelegate>())); | 73 scoped_ptr<history::VisitDelegate>())); |
74 if (history_service->Init( | 74 if (history_service->Init( |
75 profile->GetPrefs()->GetString(prefs::kAcceptLanguages), | |
76 history::HistoryDatabaseParamsForPath(profile->GetPath()))) { | 75 history::HistoryDatabaseParamsForPath(profile->GetPath()))) { |
77 return std::move(history_service); | 76 return std::move(history_service); |
78 } | 77 } |
79 | 78 |
80 ADD_FAILURE() << "failed to initialize history service"; | 79 ADD_FAILURE() << "failed to initialize history service"; |
81 return nullptr; | 80 return nullptr; |
82 } | 81 } |
83 | 82 |
84 #if defined(OS_WIN) | 83 #if defined(OS_WIN) |
85 static const base::FilePath::CharType kBinaryFileName[] = | 84 static const base::FilePath::CharType kBinaryFileName[] = |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 base::Bind(&LastDownloadFinderTest::OnLastDownload, | 455 base::Bind(&LastDownloadFinderTest::OnLastDownload, |
457 base::Unretained(this), &last_binary_download, | 456 base::Unretained(this), &last_binary_download, |
458 &last_non_binary_download, run_loop.QuitClosure()))); | 457 &last_non_binary_download, run_loop.QuitClosure()))); |
459 | 458 |
460 run_loop.Run(); | 459 run_loop.Run(); |
461 | 460 |
462 ASSERT_TRUE(last_binary_download); | 461 ASSERT_TRUE(last_binary_download); |
463 } | 462 } |
464 | 463 |
465 } // namespace safe_browsing | 464 } // namespace safe_browsing |
OLD | NEW |