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

Side by Side Diff: chrome/browser/safe_browsing/preference_validation_delegate.h

Issue 470213002: Moving all the incident reporting stuff to a common folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@binsign
Patch Set: Created 6 years, 4 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 2014 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_PREFERENCE_VALIDATION_DELEGATE_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_PREFERENCE_VALIDATION_DELEGATE_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "chrome/browser/prefs/tracked/tracked_preference_validation_delegate.h"
11 #include "chrome/browser/safe_browsing/add_incident_callback.h"
12
13 namespace safe_browsing {
14
15 // A preference validation delegate that adds incidents to a given receiver
16 // for preference validation failures.
17 class PreferenceValidationDelegate
18 : public TrackedPreferenceValidationDelegate {
19 public:
20 explicit PreferenceValidationDelegate(
21 const AddIncidentCallback& add_incident);
22 virtual ~PreferenceValidationDelegate();
23
24 private:
25 // TrackedPreferenceValidationDelegate methods.
26 virtual void OnAtomicPreferenceValidation(
27 const std::string& pref_path,
28 const base::Value* value,
29 PrefHashStoreTransaction::ValueState value_state,
30 TrackedPreferenceHelper::ResetAction reset_action) OVERRIDE;
31 virtual void OnSplitPreferenceValidation(
32 const std::string& pref_path,
33 const base::DictionaryValue* dict_value,
34 const std::vector<std::string>& invalid_keys,
35 PrefHashStoreTransaction::ValueState value_state,
36 TrackedPreferenceHelper::ResetAction reset_action) OVERRIDE;
37
38 AddIncidentCallback add_incident_;
39
40 DISALLOW_COPY_AND_ASSIGN(PreferenceValidationDelegate);
41 };
42
43 } // namespace safe_browsing
44
45 #endif // CHROME_BROWSER_SAFE_BROWSING_PREFERENCE_VALIDATION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698