| 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 "chrome/browser/safe_browsing/safe_browsing_database.h" | 5 #include "chrome/browser/safe_browsing/safe_browsing_database.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/file_util.h" | 11 #include "base/files/file_util.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/metrics/stats_counters.h" | 14 #include "base/metrics/stats_counters.h" |
| 15 #include "base/process/process.h" | 15 #include "base/process/process.h" |
| 16 #include "base/process/process_metrics.h" | 16 #include "base/process/process_metrics.h" |
| 17 #include "base/sha1.h" | 17 #include "base/sha1.h" |
| 18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
| 20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 21 #include "chrome/browser/safe_browsing/prefix_set.h" | 21 #include "chrome/browser/safe_browsing/prefix_set.h" |
| (...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 bool SafeBrowsingDatabaseNew::IsMalwareIPMatchKillSwitchOn() { | 1567 bool SafeBrowsingDatabaseNew::IsMalwareIPMatchKillSwitchOn() { |
| 1568 SBFullHash malware_kill_switch = SBFullHashForString(kMalwareIPKillSwitchUrl); | 1568 SBFullHash malware_kill_switch = SBFullHashForString(kMalwareIPKillSwitchUrl); |
| 1569 std::vector<SBFullHash> full_hashes; | 1569 std::vector<SBFullHash> full_hashes; |
| 1570 full_hashes.push_back(malware_kill_switch); | 1570 full_hashes.push_back(malware_kill_switch); |
| 1571 return ContainsWhitelistedHashes(csd_whitelist_, full_hashes); | 1571 return ContainsWhitelistedHashes(csd_whitelist_, full_hashes); |
| 1572 } | 1572 } |
| 1573 | 1573 |
| 1574 bool SafeBrowsingDatabaseNew::IsCsdWhitelistKillSwitchOn() { | 1574 bool SafeBrowsingDatabaseNew::IsCsdWhitelistKillSwitchOn() { |
| 1575 return csd_whitelist_.second; | 1575 return csd_whitelist_.second; |
| 1576 } | 1576 } |
| OLD | NEW |