| OLD | NEW |
| 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 <vector> | 8 #include <string> |
| 9 #include <utility> |
| 9 | 10 |
| 10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 11 | 12 |
| 12 namespace base { | 13 namespace base { |
| 13 class FilePath; | 14 class FilePath; |
| 15 class TimeDelta; |
| 14 } // namespace base | 16 } // namespace base |
| 15 | 17 |
| 16 namespace safe_browsing { | 18 namespace safe_browsing { |
| 17 | 19 |
| 18 class IncidentReceiver; | 20 class IncidentReceiver; |
| 19 | 21 |
| 20 // Registers a process-wide analysis with the incident reporting service that | 22 // Registers a process-wide analysis with the incident reporting service that |
| 21 // will verify the signature of the most critical binaries used by Chrome. It | 23 // will verify the signature of the most critical binaries used by Chrome. It |
| 22 // will send an incident report every time a signature verification fails. | 24 // will send an incident report every time a signature verification fails. |
| 23 void RegisterBinaryIntegrityAnalysis(); | 25 void RegisterBinaryIntegrityAnalysis(); |
| 24 | 26 |
| 25 // Callback to pass to the incident reporting service. The incident reporting | 27 // Callback to pass to the incident reporting service. The incident reporting |
| 26 // service will decide when to start the analysis. | 28 // service will decide when to start the analysis. |
| 27 void VerifyBinaryIntegrity(scoped_ptr<IncidentReceiver> incident_receiver); | 29 void VerifyBinaryIntegrity(scoped_ptr<IncidentReceiver> incident_receiver); |
| 28 | 30 |
| 29 // Returns a vector containing the paths to all the binaries to verify. | 31 // Record how long the signature verification took. |
| 30 std::vector<base::FilePath> GetCriticalBinariesPath(); | 32 void RecordSignatureVerificationTime(size_t file_index, |
| 33 const base::TimeDelta& verification_time); |
| 34 |
| 35 // Clear past incident reports for a file or bundle. This is used if the code |
| 36 // object is now integral, as it will allow future incidents to be reported. |
| 37 void ClearBinaryIntegrityForFile(IncidentReceiver* incident_receiver, |
| 38 const std::string& basename); |
| 31 | 39 |
| 32 } // namespace safe_browsing | 40 } // namespace safe_browsing |
| 33 | 41 |
| 34 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_ANAL
YZER_H_ | 42 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_ANAL
YZER_H_ |
| OLD | NEW |