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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.h

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, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.h
diff --git a/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.h b/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.h
index 6516c0c6bf85ff8a33ef264d824010aae537f498..7dee45a8a426fa330bce79db83a8ce2b493179f3 100644
--- a/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.h
+++ b/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.h
@@ -11,15 +11,18 @@
#include "chrome/browser/prefs/tracked/tracked_preference_validation_delegate.h"
#include "chrome/browser/safe_browsing/incident_reporting/add_incident_callback.h"
+class Profile;
+
namespace safe_browsing {
// A preference validation delegate that adds incidents to a given receiver
-// for preference validation failures.
+// for preference validation failures. The profile for which the delegate
+// operates must outlive the delegate itself.
class PreferenceValidationDelegate
: public TrackedPreferenceValidationDelegate {
public:
- explicit PreferenceValidationDelegate(
- const AddIncidentCallback& add_incident);
+ PreferenceValidationDelegate(Profile* profile,
+ const AddIncidentCallback& add_incident);
~PreferenceValidationDelegate() override;
private:
@@ -36,6 +39,7 @@ class PreferenceValidationDelegate
PrefHashStoreTransaction::ValueState value_state,
bool is_personal) override;
+ Profile* profile_;
AddIncidentCallback add_incident_;
DISALLOW_COPY_AND_ASSIGN(PreferenceValidationDelegate);

Powered by Google App Engine
This is Rietveld 408576698