Chromium Code Reviews| Index: chrome/browser/safe_browsing/incident_reporting/omnibox_watcher.h |
| diff --git a/chrome/browser/safe_browsing/incident_reporting/omnibox_watcher.h b/chrome/browser/safe_browsing/incident_reporting/omnibox_watcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a368f9f58cd7201c3eadaeecea9f1cd1e6b59850 |
| --- /dev/null |
| +++ b/chrome/browser/safe_browsing/incident_reporting/omnibox_watcher.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_OMNIBOX_WATCHER_H_ |
| +#define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_OMNIBOX_WATCHER_H_ |
| + |
| +#include "chrome/browser/safe_browsing/incident_reporting/add_incident_callback.h" |
| +#include "content/public/browser/notification_observer.h" |
| +#include "content/public/browser/notification_registrar.h" |
| + |
| +namespace safe_browsing { |
| + |
| +class OmniboxWatcher : public content::NotificationObserver { |
| + public: |
| + OmniboxWatcher(const AddIncidentCallback& callback); |
| + ~OmniboxWatcher() override; |
| + |
| + private: |
| + // content::NotificationObserver: |
| + void Observe(int type, |
| + const content::NotificationSource& source, |
| + const content::NotificationDetails& details) override; |
| + |
| + // The place to send a callback when we witness a suspicious omnibox |
| + // navigation. |
| + const AddIncidentCallback& incident_callback_; |
|
grt (UTC plus 2)
2014/11/15 17:56:15
AddIncidentCallback incident_callback_;
Mark P
2014/11/18 00:54:44
Done.
|
| + |
| + // Registrar for receiving Omnibox event notifications. |
| + content::NotificationRegistrar registrar_; |
| +}; |
|
grt (UTC plus 2)
2014/11/15 17:56:15
#include "base/macros.h"
DISALLOW_COPY_AND_ASSIGN(
Mark P
2014/11/18 00:54:44
Done.
|
| + |
| +} // namespace safe_browsing |
| + |
| +#endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_OMNIBOX_WATCHER_H_ |