OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This test creates a safebrowsing service using test safebrowsing database | 5 // This test creates a safebrowsing service using test safebrowsing database |
6 // and a test protocol manager. It is used to test logics in safebrowsing | 6 // and a test protocol manager. It is used to test logics in safebrowsing |
7 // service. | 7 // service. |
8 | 8 |
9 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 9 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
10 | 10 |
11 #include <algorithm> | 11 #include <algorithm> |
12 #include <utility> | 12 #include <utility> |
13 | 13 |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
17 #include "base/files/scoped_temp_dir.h" | 17 #include "base/files/scoped_temp_dir.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "base/metrics/field_trial.h" | 20 #include "base/metrics/field_trial.h" |
21 #include "base/path_service.h" | 21 #include "base/path_service.h" |
22 #include "base/prefs/pref_service.h" | |
23 #include "base/strings/string_split.h" | 22 #include "base/strings/string_split.h" |
24 #include "base/strings/string_util.h" | 23 #include "base/strings/string_util.h" |
25 #include "base/strings/utf_string_conversions.h" | 24 #include "base/strings/utf_string_conversions.h" |
26 #include "base/test/thread_test_helper.h" | 25 #include "base/test/thread_test_helper.h" |
27 #include "base/time/time.h" | 26 #include "base/time/time.h" |
28 #include "build/build_config.h" | 27 #include "build/build_config.h" |
29 #include "chrome/browser/bookmarks/startup_task_runner_service_factory.h" | 28 #include "chrome/browser/bookmarks/startup_task_runner_service_factory.h" |
30 #include "chrome/browser/browser_process.h" | 29 #include "chrome/browser/browser_process.h" |
31 #include "chrome/browser/chrome_notification_types.h" | 30 #include "chrome/browser/chrome_notification_types.h" |
32 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 31 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
(...skipping 10 matching lines...) Expand all Loading... |
43 #include "chrome/browser/ui/browser.h" | 42 #include "chrome/browser/ui/browser.h" |
44 #include "chrome/browser/ui/browser_navigator_params.h" | 43 #include "chrome/browser/ui/browser_navigator_params.h" |
45 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 44 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
46 #include "chrome/common/chrome_paths.h" | 45 #include "chrome/common/chrome_paths.h" |
47 #include "chrome/common/chrome_switches.h" | 46 #include "chrome/common/chrome_switches.h" |
48 #include "chrome/common/pref_names.h" | 47 #include "chrome/common/pref_names.h" |
49 #include "chrome/test/base/in_process_browser_test.h" | 48 #include "chrome/test/base/in_process_browser_test.h" |
50 #include "chrome/test/base/ui_test_utils.h" | 49 #include "chrome/test/base/ui_test_utils.h" |
51 #include "components/bookmarks/browser/startup_task_runner_service.h" | 50 #include "components/bookmarks/browser/startup_task_runner_service.h" |
52 #include "components/content_settings/core/browser/host_content_settings_map.h" | 51 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 52 #include "components/prefs/pref_service.h" |
53 #include "components/safe_browsing_db/database_manager.h" | 53 #include "components/safe_browsing_db/database_manager.h" |
54 #include "components/safe_browsing_db/util.h" | 54 #include "components/safe_browsing_db/util.h" |
55 #include "content/public/browser/interstitial_page.h" | 55 #include "content/public/browser/interstitial_page.h" |
56 #include "content/public/browser/navigation_entry.h" | 56 #include "content/public/browser/navigation_entry.h" |
57 #include "content/public/browser/render_frame_host.h" | 57 #include "content/public/browser/render_frame_host.h" |
58 #include "content/public/browser/web_contents.h" | 58 #include "content/public/browser/web_contents.h" |
59 #include "content/public/test/browser_test_utils.h" | 59 #include "content/public/test/browser_test_utils.h" |
60 #include "net/cookies/cookie_store.h" | 60 #include "net/cookies/cookie_store.h" |
61 #include "net/cookies/cookie_util.h" | 61 #include "net/cookies/cookie_util.h" |
62 #include "net/test/embedded_test_server/embedded_test_server.h" | 62 #include "net/test/embedded_test_server/embedded_test_server.h" |
(...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1667 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, | 1667 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, |
1668 content::Source<SafeBrowsingDatabaseManager>( | 1668 content::Source<SafeBrowsingDatabaseManager>( |
1669 sb_service_->database_manager().get())); | 1669 sb_service_->database_manager().get())); |
1670 BrowserThread::PostTask( | 1670 BrowserThread::PostTask( |
1671 BrowserThread::IO, FROM_HERE, | 1671 BrowserThread::IO, FROM_HERE, |
1672 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this)); | 1672 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this)); |
1673 observer.Wait(); | 1673 observer.Wait(); |
1674 } | 1674 } |
1675 | 1675 |
1676 } // namespace safe_browsing | 1676 } // namespace safe_browsing |
OLD | NEW |