OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_NAVIGATION_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_NAVIGATION_OBSERVER_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_NAVIGATION_OBSERVER_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_NAVIGATION_OBSERVER_H_ |
7 | 7 |
8 #include "base/supports_user_data.h" | 8 #include "base/supports_user_data.h" |
9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 class NavigationHandle; | 13 class NavigationHandle; |
14 } | 14 } |
15 | 15 |
16 namespace safe_browsing { | 16 namespace safe_browsing { |
17 class SafeBrowsingNavigationObserverManager; | 17 class SafeBrowsingNavigationObserverManager; |
18 | 18 |
19 // Struct to record the details of a navigation event for any frame. | 19 // Struct to record the details of a navigation event for any frame. |
20 // This information will be used to fill |url_chain| field in safe browsing | 20 // This information will be used to fill referrer chain info in various Safe |
21 // download pings. | 21 // Browsing requests and reports. |
22 struct NavigationEvent { | 22 struct NavigationEvent { |
23 NavigationEvent(); | 23 NavigationEvent(); |
24 NavigationEvent(NavigationEvent&& nav_event); | 24 NavigationEvent(NavigationEvent&& nav_event); |
25 NavigationEvent& operator=(NavigationEvent&& nav_event); | 25 NavigationEvent& operator=(NavigationEvent&& nav_event); |
26 ~NavigationEvent(); | 26 ~NavigationEvent(); |
27 | 27 |
28 GURL source_url; // URL that caused this navigation to occur. | 28 GURL source_url; // URL that caused this navigation to occur. |
29 // TODO(jialiul): source_url may be incorrect when | 29 // TODO(jialiul): source_url may be incorrect when |
30 // navigation involves frames targeting each other. | 30 // navigation involves frames targeting each other. |
31 // http://crbug.com/651895. | 31 // http://crbug.com/651895. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 bool has_user_gesture_; | 121 bool has_user_gesture_; |
122 | 122 |
123 base::Time last_user_gesture_timestamp_; | 123 base::Time last_user_gesture_timestamp_; |
124 | 124 |
125 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingNavigationObserver); | 125 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingNavigationObserver); |
126 }; | 126 }; |
127 | 127 |
128 } // namespace safe_browsing | 128 } // namespace safe_browsing |
129 | 129 |
130 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_NAVIGATION_OBSERVER_H_ | 130 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_NAVIGATION_OBSERVER_H_ |
OLD | NEW |