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

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

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
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/tracked_preference_incident_handlers.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/tracked_preference_inc ident_handlers.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/safe_browsing/incident_handler_util.h" 8 #include "chrome/browser/safe_browsing/incident_reporting/incident_handler_util. h"
9 #include "chrome/common/safe_browsing/csd.pb.h" 9 #include "chrome/common/safe_browsing/csd.pb.h"
10 10
11 namespace safe_browsing { 11 namespace safe_browsing {
12 12
13 std::string GetTrackedPreferenceIncidentKey( 13 std::string GetTrackedPreferenceIncidentKey(
14 const ClientIncidentReport_IncidentData& incident_data) { 14 const ClientIncidentReport_IncidentData& incident_data) {
15 DCHECK(incident_data.has_tracked_preference()); 15 DCHECK(incident_data.has_tracked_preference());
16 DCHECK(incident_data.tracked_preference().has_path()); 16 DCHECK(incident_data.tracked_preference().has_path());
17 return incident_data.tracked_preference().path(); 17 return incident_data.tracked_preference().path();
18 } 18 }
19 19
20 uint32_t GetTrackedPreferenceIncidentDigest( 20 uint32_t GetTrackedPreferenceIncidentDigest(
21 const ClientIncidentReport_IncidentData& incident_data) { 21 const ClientIncidentReport_IncidentData& incident_data) {
22 DCHECK(incident_data.has_tracked_preference()); 22 DCHECK(incident_data.has_tracked_preference());
23 23
24 // Tracked preference incidents are sufficiently canonical (and have no 24 // Tracked preference incidents are sufficiently canonical (and have no
25 // default values), so it's safe to serialize the incident as given. 25 // default values), so it's safe to serialize the incident as given.
26 return HashMessage(incident_data.tracked_preference()); 26 return HashMessage(incident_data.tracked_preference());
27 } 27 }
28 28
29 } // namespace safe_browsing 29 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698