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

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

Issue 891793002: Take a Profile when adding an incident to the incident reporting service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment and formatting Created 5 years, 10 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 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy zer.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy zer.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Only create a report if the signature is untrusted. 71 // Only create a report if the signature is untrusted.
72 if (!signature_info->trusted()) { 72 if (!signature_info->trusted()) {
73 scoped_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident> 73 scoped_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident>
74 incident( 74 incident(
75 new ClientIncidentReport_IncidentData_BinaryIntegrityIncident()); 75 new ClientIncidentReport_IncidentData_BinaryIntegrityIncident());
76 76
77 incident->set_file_basename(binary_path.BaseName().AsUTF8Unsafe()); 77 incident->set_file_basename(binary_path.BaseName().AsUTF8Unsafe());
78 incident->set_allocated_signature(signature_info.release()); 78 incident->set_allocated_signature(signature_info.release());
79 79
80 // Send the report. 80 // Send the report.
81 callback.Run(make_scoped_ptr( 81 callback.Run(nullptr, make_scoped_ptr(
82 new BinaryIntegrityIncident(incident.Pass()))); 82 new BinaryIntegrityIncident(incident.Pass())));
robertshield 2015/01/30 21:04:52 What do you think about having two types of callba
grt (UTC plus 2) 2015/01/30 21:16:29 Yeah, I thought about that. I wonder if an interfa
83 } 83 }
84 } 84 }
85 } 85 }
86 86
87 #if !defined(OS_WIN) 87 #if !defined(OS_WIN)
88 std::vector<base::FilePath> GetCriticalBinariesPath() { 88 std::vector<base::FilePath> GetCriticalBinariesPath() {
89 return std::vector<base::FilePath>(); 89 return std::vector<base::FilePath>();
90 } 90 }
91 #endif // !defined(OS_WIN) 91 #endif // !defined(OS_WIN)
92 92
93 } // namespace safe_browsing 93 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698