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

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

Issue 872433003: Remove omnibox watcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 #include "chrome/browser/safe_browsing/incident_reporting/omnibox_interaction_in cident.h"
6
7 #include "base/logging.h"
8 #include "chrome/common/safe_browsing/csd.pb.h"
9
10 namespace safe_browsing {
11
12 OmniboxInteractionIncident::OmniboxInteractionIncident(
13 scoped_ptr<ClientIncidentReport_IncidentData_OmniboxInteractionIncident>
14 omnibox_interaction_incident) {
15 DCHECK(omnibox_interaction_incident);
16 DCHECK(omnibox_interaction_incident->has_origin());
17 payload()->set_allocated_omnibox_interaction(
18 omnibox_interaction_incident.release());
19 }
20
21 OmniboxInteractionIncident::~OmniboxInteractionIncident() {
22 }
23
24 IncidentType OmniboxInteractionIncident::GetType() const {
25 return IncidentType::OMNIBOX_INTERACTION;
26 }
27
28 std::string OmniboxInteractionIncident::GetKey() const {
29 // Return a constant, as only one kind of suspicious interaction is detected.
30 return "1";
31 }
32
33 uint32_t OmniboxInteractionIncident::ComputeDigest() const {
34 // Return a constant (independent of the incident's payload) so that only the
35 // first suspicious interaction is reported.
36 return 1u;
37 }
38
39 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698