Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/suspicious_module_incident.cc

Issue 1643573002: Add a ModuleLoadAnalyzer which checks modules against a whitelist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase-update'd Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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/suspicious_module_inci dent.h"
6
7 #include "base/logging.h"
8 #include "chrome/browser/safe_browsing/incident_reporting/incident_handler_util. h"
9 #include "chrome/common/safe_browsing/csd.pb.h"
10
11 namespace safe_browsing {
12
13 SuspiciousModuleIncident::SuspiciousModuleIncident(
14 scoped_ptr<ClientIncidentReport_IncidentData_SuspiciousModuleIncident>
15 suspicious_module_incident) {
16 DCHECK(suspicious_module_incident);
17 DCHECK(suspicious_module_incident->has_path());
18 payload()->set_allocated_suspicious_module(
19 suspicious_module_incident.release());
20 }
21
22 SuspiciousModuleIncident::~SuspiciousModuleIncident() {}
23
24 IncidentType SuspiciousModuleIncident::GetType() const {
25 return IncidentType::SUSPICIOUS_MODULE;
26 }
27
28 // Returns the sanitized path of the module.
29 std::string SuspiciousModuleIncident::GetKey() const {
30 return payload()->suspicious_module().path();
31 }
32
33 // Returns a digest computed over the payload.
34 uint32_t SuspiciousModuleIncident::ComputeDigest() const {
35 return HashMessage(payload()->suspicious_module());
36 }
37
38 MinimumProfileConsent SuspiciousModuleIncident::GetMinimumProfileConsent()
39 const {
40 return MinimumProfileConsent::SAFE_BROWSING_EXTENDED_REPORTING_ENABLED;
41 }
42
43 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698