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 #include <deque> | 5 #include <deque> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 void OnCheckBrowseURLDone(const GURL& gurl, Client* client) { | 748 void OnCheckBrowseURLDone(const GURL& gurl, Client* client) { |
749 std::vector<SBThreatType> expected_threats; | 749 std::vector<SBThreatType> expected_threats; |
750 expected_threats.push_back(SB_THREAT_TYPE_URL_MALWARE); | 750 expected_threats.push_back(SB_THREAT_TYPE_URL_MALWARE); |
751 expected_threats.push_back(SB_THREAT_TYPE_URL_PHISHING); | 751 expected_threats.push_back(SB_THREAT_TYPE_URL_PHISHING); |
752 // TODO(nparker): Replace SafeBrowsingCheck w/ a call to | 752 // TODO(nparker): Replace SafeBrowsingCheck w/ a call to |
753 // client->OnCheckBrowseUrlResult() | 753 // client->OnCheckBrowseUrlResult() |
754 LocalSafeBrowsingDatabaseManager::SafeBrowsingCheck sb_check( | 754 LocalSafeBrowsingDatabaseManager::SafeBrowsingCheck sb_check( |
755 std::vector<GURL>(1, gurl), | 755 std::vector<GURL>(1, gurl), |
756 std::vector<SBFullHash>(), | 756 std::vector<SBFullHash>(), |
757 client, | 757 client, |
758 safe_browsing_util::MALWARE, | 758 safe_browsing::MALWARE, |
759 expected_threats); | 759 expected_threats); |
760 sb_check.url_results[0] = threat_type_; | 760 sb_check.url_results[0] = threat_type_; |
761 sb_check.OnSafeBrowsingResult(); | 761 sb_check.OnSafeBrowsingResult(); |
762 } | 762 } |
763 | 763 |
764 GURL url_; | 764 GURL url_; |
765 SBThreatType threat_type_; | 765 SBThreatType threat_type_; |
766 DISALLOW_COPY_AND_ASSIGN(FakeSafeBrowsingDatabaseManager); | 766 DISALLOW_COPY_AND_ASSIGN(FakeSafeBrowsingDatabaseManager); |
767 }; | 767 }; |
768 | 768 |
(...skipping 3391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4160 | 4160 |
4161 NavigateToDestURL(); | 4161 NavigateToDestURL(); |
4162 EXPECT_EQ(1U, task_manager.tasks().size()); | 4162 EXPECT_EQ(1U, task_manager.tasks().size()); |
4163 } | 4163 } |
4164 | 4164 |
4165 } // namespace | 4165 } // namespace |
4166 | 4166 |
4167 #endif // defined(ENABLE_TASK_MANAGER) | 4167 #endif // defined(ENABLE_TASK_MANAGER) |
4168 | 4168 |
4169 } // namespace prerender | 4169 } // namespace prerender |
OLD | NEW |