| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // Classes for managing the SafeBrowsing interstitial pages. | 5 // Classes for managing the SafeBrowsing interstitial pages. |
| 6 // | 6 // |
| 7 // When a user is about to visit a page the SafeBrowsing system has deemed to | 7 // When a user is about to visit a page the SafeBrowsing system has deemed to |
| 8 // be malicious, either as malware or a phishing page, we show an interstitial | 8 // be malicious, either as malware or a phishing page, we show an interstitial |
| 9 // page with some options (go back, continue) to give the user a chance to avoid | 9 // page with some options (go back, continue) to give the user a chance to avoid |
| 10 // the harmful page. | 10 // the harmful page. |
| 11 // | 11 // |
| 12 // The SafeBrowsingBlockingPage is created by the SafeBrowsingService on the IO | 12 // The SafeBrowsingBlockingPage is created by the SafeBrowsingService on the IO |
| 13 // thread when we've determined that a page is malicious. The operation of the | 13 // thread when we've determined that a page is malicious. The operation of the |
| 14 // blocking page occurs on the UI thread, where it waits for the user to make a | 14 // blocking page occurs on the UI thread, where it waits for the user to make a |
| 15 // decision about what to do: either go back or continue on. | 15 // decision about what to do: either go back or continue on. |
| 16 // | 16 // |
| 17 // The blocking page forwards the result of the user's choice back to the | 17 // The blocking page forwards the result of the user's choice back to the |
| 18 // SafeBrowsingService so that we can cancel the request for the new page, or | 18 // SafeBrowsingService so that we can cancel the request for the new page, or |
| 19 // or allow it to continue. | 19 // or allow it to continue. |
| 20 | 20 |
| 21 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H__ | 21 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
| 22 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H__ | 22 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
| 23 | 23 |
| 24 #include "base/logging.h" | 24 #include "base/logging.h" |
| 25 #include "chrome/browser/interstitial_page_delegate.h" | 25 #include "chrome/browser/interstitial_page_delegate.h" |
| 26 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 26 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 27 #include "chrome/common/notification_service.h" | 27 #include "chrome/common/notification_service.h" |
| 28 #include "googleurl/src/gurl.h" | 28 #include "googleurl/src/gurl.h" |
| 29 | 29 |
| 30 class MessageLoop; | 30 class MessageLoop; |
| 31 class TabContents; | 31 class TabContents; |
| 32 class NavigationController; | 32 class NavigationController; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // Whether the flagged resource is the main page (or a sub-resource is false). | 100 // Whether the flagged resource is the main page (or a sub-resource is false). |
| 101 bool is_main_frame_; | 101 bool is_main_frame_; |
| 102 | 102 |
| 103 // Whether we have created a temporary navigation entry as part of showing | 103 // Whether we have created a temporary navigation entry as part of showing |
| 104 // the blocking page. | 104 // the blocking page. |
| 105 bool created_temporary_entry_; | 105 bool created_temporary_entry_; |
| 106 | 106 |
| 107 DISALLOW_EVIL_CONSTRUCTORS(SafeBrowsingBlockingPage); | 107 DISALLOW_EVIL_CONSTRUCTORS(SafeBrowsingBlockingPage); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H__ | 110 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
| OLD | NEW |