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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer.h

Issue 1870003002: Convert //chrome/browser/safe_browsing from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address comments Created 4 years, 8 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_ANALYZE R_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_ANALYZE R_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_ANALYZE R_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_ANALYZE R_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 12
12 #include "base/memory/scoped_ptr.h"
13 13
14 namespace base { 14 namespace base {
15 class FilePath; 15 class FilePath;
16 class TimeDelta; 16 class TimeDelta;
17 } // namespace base 17 } // namespace base
18 18
19 namespace safe_browsing { 19 namespace safe_browsing {
20 20
21 class IncidentReceiver; 21 class IncidentReceiver;
22 22
23 // Registers a process-wide analysis with the incident reporting service that 23 // Registers a process-wide analysis with the incident reporting service that
24 // will verify the signature of the most critical binaries used by Chrome. It 24 // will verify the signature of the most critical binaries used by Chrome. It
25 // will send an incident report every time a signature verification fails. 25 // will send an incident report every time a signature verification fails.
26 void RegisterBinaryIntegrityAnalysis(); 26 void RegisterBinaryIntegrityAnalysis();
27 27
28 // Callback to pass to the incident reporting service. The incident reporting 28 // Callback to pass to the incident reporting service. The incident reporting
29 // service will decide when to start the analysis. 29 // service will decide when to start the analysis.
30 void VerifyBinaryIntegrity(scoped_ptr<IncidentReceiver> incident_receiver); 30 void VerifyBinaryIntegrity(std::unique_ptr<IncidentReceiver> incident_receiver);
31 31
32 // Record how long the signature verification took. 32 // Record how long the signature verification took.
33 void RecordSignatureVerificationTime(size_t file_index, 33 void RecordSignatureVerificationTime(size_t file_index,
34 const base::TimeDelta& verification_time); 34 const base::TimeDelta& verification_time);
35 35
36 // Clear past incident reports for a file or bundle. This is used if the code 36 // Clear past incident reports for a file or bundle. This is used if the code
37 // object is now integral, as it will allow future incidents to be reported. 37 // object is now integral, as it will allow future incidents to be reported.
38 void ClearBinaryIntegrityForFile(IncidentReceiver* incident_receiver, 38 void ClearBinaryIntegrityForFile(IncidentReceiver* incident_receiver,
39 const std::string& basename); 39 const std::string& basename);
40 40
41 } // namespace safe_browsing 41 } // namespace safe_browsing
42 42
43 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_ANAL YZER_H_ 43 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_ANAL YZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698