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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/omnibox_watcher.h

Issue 720163003: Safe Browsing: Add Omnibox Interaction Incident Reporter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: spacing Created 6 years 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_INCIDENT_REPORTING_OMNIBOX_WATCHER_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_OMNIBOX_WATCHER_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "chrome/browser/safe_browsing/incident_reporting/add_incident_callback. h"
11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h"
13
14 class Profile;
15
16 namespace safe_browsing {
17
18 // Observes all URLs opened via the omnibox, adding an incident to the
19 // incident reporting service for those that are typed impossibly quickly.
20 class OmniboxWatcher : public content::NotificationObserver {
21 public:
22 explicit OmniboxWatcher(Profile* profile,
grt (UTC plus 2) 2014/12/09 20:15:52 ah, now explicit isn't needed since there are two
Mark P 2014/12/09 20:24:27 Done.
23 const AddIncidentCallback& callback);
24 ~OmniboxWatcher() override;
25
26 private:
27 // content::NotificationObserver:
28 void Observe(int type,
29 const content::NotificationSource& source,
30 const content::NotificationDetails& details) override;
31
32 // The place to send a callback when we witness a suspicious omnibox
33 // navigation.
34 AddIncidentCallback incident_callback_;
35
36 // Registrar for receiving Omnibox event notifications.
37 content::NotificationRegistrar registrar_;
38
39 DISALLOW_COPY_AND_ASSIGN(OmniboxWatcher);
40 };
41
42 } // namespace safe_browsing
43
44 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_OMNIBOX_WATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698