OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/safe_browsing/incident_reporting/omnibox_incident_handl
ers.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "chrome/common/safe_browsing/csd.pb.h" |
| 9 |
| 10 namespace safe_browsing { |
| 11 |
| 12 std::string GetOmniboxIncidentKey( |
| 13 const ClientIncidentReport_IncidentData& incident_data) { |
| 14 DCHECK(incident_data.has_omnibox_interaction()); |
| 15 // Return a constant, as only one kind of suspicious interaction is detected. |
| 16 return std::string("1"); |
| 17 } |
| 18 |
| 19 uint32_t GetOmniboxIncidentDigest( |
| 20 const ClientIncidentReport_IncidentData& incident_data) { |
| 21 DCHECK(incident_data.has_omnibox_interaction()); |
| 22 // Return a constant (independent of the incident's payload) so that only the |
| 23 // first suspicious interaction is reported. |
| 24 return 1u; |
| 25 } |
| 26 |
| 27 } // namespace safe_browsing |
OLD | NEW |