Chromium Code Reviews| Index: chrome/browser/safe_browsing/binary_integrity_incident_handlers.cc |
| diff --git a/chrome/browser/safe_browsing/binary_integrity_incident_handlers.cc b/chrome/browser/safe_browsing/binary_integrity_incident_handlers.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f35236110cb49b87ea94f3acbe65d51ed2910af2 |
| --- /dev/null |
| +++ b/chrome/browser/safe_browsing/binary_integrity_incident_handlers.cc |
| @@ -0,0 +1,26 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/safe_browsing/binary_integrity_incident_handlers.h" |
| + |
| +#include "base/logging.h" |
| +#include "chrome/browser/safe_browsing/incident_handler_util.h" |
| +#include "chrome/common/safe_browsing/csd.pb.h" |
| + |
| +namespace safe_browsing { |
| + |
| +std::string GetBinaryIntegrityIncidentKey( |
| + const ClientIncidentReport_IncidentData& incident_data) { |
| + DCHECK(incident_data.has_binary_integrity()); |
| + DCHECK(incident_data.binary_integrity().has_file()); |
| + return incident_data.binary_integrity().file(); |
|
grt (UTC plus 2)
2014/08/08 02:23:05
this needs to be consistent across chrome updates,
pmonette_google.com
2014/08/08 15:05:42
Okay makes sense. It's now file_basename anyway!
|
| +} |
| + |
| +uint32_t GetBinaryIntegrityIncidentDigest( |
| + const ClientIncidentReport_IncidentData& incident_data) { |
| + DCHECK(incident_data.has_binary_integrity()); |
| + return HashMessage(incident_data.binary_integrity()); |
| +} |
| + |
| +} // namespace safe_browsing |