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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 21 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
22 #include "chrome/browser/history/chrome_history_client.h" | 22 #include "chrome/browser/history/chrome_history_client.h" |
23 #include "chrome/browser/history/history_service_factory.h" | 23 #include "chrome/browser/history/history_service_factory.h" |
24 #include "chrome/browser/history/web_history_service_factory.h" | 24 #include "chrome/browser/history/web_history_service_factory.h" |
25 #include "chrome/browser/prefs/browser_prefs.h" | 25 #include "chrome/browser/prefs/browser_prefs.h" |
26 #include "chrome/browser/profiles/profile_manager.h" | 26 #include "chrome/browser/profiles/profile_manager.h" |
27 #include "chrome/common/chrome_constants.h" | 27 #include "chrome/common/chrome_constants.h" |
28 #include "chrome/common/pref_names.h" | 28 #include "chrome/common/pref_names.h" |
29 #include "chrome/common/safe_browsing/csd.pb.h" | 29 #include "chrome/common/safe_browsing/csd.pb.h" |
30 #include "chrome/test/base/testing_browser_process.h" | 30 #include "chrome/test/base/testing_browser_process.h" |
31 #include "chrome/test/base/testing_pref_service_syncable.h" | |
32 #include "chrome/test/base/testing_profile.h" | 31 #include "chrome/test/base/testing_profile.h" |
33 #include "chrome/test/base/testing_profile_manager.h" | 32 #include "chrome/test/base/testing_profile_manager.h" |
34 #include "components/history/content/browser/content_visit_delegate.h" | 33 #include "components/history/content/browser/content_visit_delegate.h" |
35 #include "components/history/content/browser/download_constants_utils.h" | 34 #include "components/history/content/browser/download_constants_utils.h" |
36 #include "components/history/content/browser/history_database_helper.h" | 35 #include "components/history/content/browser/history_database_helper.h" |
37 #include "components/history/core/browser/download_constants.h" | 36 #include "components/history/core/browser/download_constants.h" |
38 #include "components/history/core/browser/download_row.h" | 37 #include "components/history/core/browser/download_row.h" |
39 #include "components/history/core/browser/history_constants.h" | 38 #include "components/history/core/browser/history_constants.h" |
40 #include "components/history/core/browser/history_database_params.h" | 39 #include "components/history/core/browser/history_database_params.h" |
41 #include "components/history/core/browser/history_service.h" | 40 #include "components/history/core/browser/history_service.h" |
| 41 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
42 #include "content/public/test/test_browser_thread_bundle.h" | 42 #include "content/public/test/test_browser_thread_bundle.h" |
43 #include "content/public/test/test_utils.h" | 43 #include "content/public/test/test_utils.h" |
44 #include "testing/gtest/include/gtest/gtest.h" | 44 #include "testing/gtest/include/gtest/gtest.h" |
45 | 45 |
46 namespace { | 46 namespace { |
47 | 47 |
48 // A BrowserContextKeyedServiceFactory::TestingFactoryFunction that creates a | 48 // A BrowserContextKeyedServiceFactory::TestingFactoryFunction that creates a |
49 // HistoryService for a TestingProfile. | 49 // HistoryService for a TestingProfile. |
50 scoped_ptr<KeyedService> BuildHistoryService(content::BrowserContext* context) { | 50 scoped_ptr<KeyedService> BuildHistoryService(content::BrowserContext* context) { |
51 TestingProfile* profile = static_cast<TestingProfile*>(context); | 51 TestingProfile* profile = static_cast<TestingProfile*>(context); |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 base::Unretained(this), | 385 base::Unretained(this), |
386 &last_download, | 386 &last_download, |
387 run_loop.QuitClosure()))); | 387 run_loop.QuitClosure()))); |
388 | 388 |
389 run_loop.Run(); | 389 run_loop.Run(); |
390 | 390 |
391 ExpectFoundTestDownload(last_download.Pass()); | 391 ExpectFoundTestDownload(last_download.Pass()); |
392 } | 392 } |
393 | 393 |
394 } // namespace safe_browsing | 394 } // namespace safe_browsing |
OLD | NEW |