| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The Safe Browsing service is responsible for downloading anti-phishing and | 5 // The Safe Browsing service is responsible for downloading anti-phishing and |
| 6 // anti-malware tables and checking urls against them. | 6 // anti-malware tables and checking urls against them. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ | 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ |
| 9 #define CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ | 9 #define CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 : public base::RefCountedThreadSafe<SafeBrowsingUIManager> { | 43 : public base::RefCountedThreadSafe<SafeBrowsingUIManager> { |
| 44 public: | 44 public: |
| 45 // Passed a boolean indicating whether or not it is OK to proceed with | 45 // Passed a boolean indicating whether or not it is OK to proceed with |
| 46 // loading an URL. | 46 // loading an URL. |
| 47 typedef base::Callback<void(bool /*proceed*/)> UrlCheckCallback; | 47 typedef base::Callback<void(bool /*proceed*/)> UrlCheckCallback; |
| 48 | 48 |
| 49 // Structure used to pass parameters between the IO and UI thread when | 49 // Structure used to pass parameters between the IO and UI thread when |
| 50 // interacting with the blocking page. | 50 // interacting with the blocking page. |
| 51 struct UnsafeResource { | 51 struct UnsafeResource { |
| 52 UnsafeResource(); | 52 UnsafeResource(); |
| 53 UnsafeResource(const UnsafeResource& other); |
| 53 ~UnsafeResource(); | 54 ~UnsafeResource(); |
| 54 | 55 |
| 55 // Returns true if this UnsafeResource is a main frame load that was blocked | 56 // Returns true if this UnsafeResource is a main frame load that was blocked |
| 56 // while the navigation is still pending. Note that a main frame hit may not | 57 // while the navigation is still pending. Note that a main frame hit may not |
| 57 // be blocking, eg. client side detection happens after the load is | 58 // be blocking, eg. client side detection happens after the load is |
| 58 // committed. | 59 // committed. |
| 59 bool IsMainPageLoadBlocked() const; | 60 bool IsMainPageLoadBlocked() const; |
| 60 | 61 |
| 61 // Returns the NavigationEntry for this resource (for a main frame hit) or | 62 // Returns the NavigationEntry for this resource (for a main frame hit) or |
| 62 // for the page which contains this resource (for a subresource hit). | 63 // for the page which contains this resource (for a subresource hit). |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 scoped_refptr<SafeBrowsingService> sb_service_; | 175 scoped_refptr<SafeBrowsingService> sb_service_; |
| 175 | 176 |
| 176 base::ObserverList<Observer> observer_list_; | 177 base::ObserverList<Observer> observer_list_; |
| 177 | 178 |
| 178 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingUIManager); | 179 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingUIManager); |
| 179 }; | 180 }; |
| 180 | 181 |
| 181 } // namespace safe_browsing | 182 } // namespace safe_browsing |
| 182 | 183 |
| 183 #endif // CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ | 184 #endif // CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ |
| OLD | NEW |