| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This class is used by the RenderView to interact with a PhishingClassifier. | 5 // This class is used by the RenderView to interact with a PhishingClassifier. |
| 6 | 6 |
| 7 #ifndef CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ | 7 #ifndef CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ |
| 8 #define CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ | 8 #define CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // finished loading. | 55 // finished loading. |
| 56 void PageCaptured(base::string16* page_text, bool preliminary_capture); | 56 void PageCaptured(base::string16* page_text, bool preliminary_capture); |
| 57 | 57 |
| 58 // RenderFrameObserver implementation, public for testing. | 58 // RenderFrameObserver implementation, public for testing. |
| 59 | 59 |
| 60 // Called by the RenderFrame when a page has started loading in the given | 60 // Called by the RenderFrame when a page has started loading in the given |
| 61 // WebFrame. Typically, this will cause any pending classification to be | 61 // WebFrame. Typically, this will cause any pending classification to be |
| 62 // cancelled. However, if the navigation is within the same page, we | 62 // cancelled. However, if the navigation is within the same page, we |
| 63 // continue running the current classification. | 63 // continue running the current classification. |
| 64 void DidCommitProvisionalLoad(bool is_new_navigation, | 64 void DidCommitProvisionalLoad(bool is_new_navigation, |
| 65 bool is_same_page_navigation) override; | 65 bool is_same_document_navigation) override; |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 friend class PhishingClassifierDelegateTest; | 68 friend class PhishingClassifierDelegateTest; |
| 69 | 69 |
| 70 PhishingClassifierDelegate(content::RenderFrame* render_frame, | 70 PhishingClassifierDelegate(content::RenderFrame* render_frame, |
| 71 PhishingClassifier* classifier); | 71 PhishingClassifier* classifier); |
| 72 | 72 |
| 73 enum CancelClassificationReason { | 73 enum CancelClassificationReason { |
| 74 NAVIGATE_AWAY, | 74 NAVIGATE_AWAY, |
| 75 NAVIGATE_WITHIN_PAGE, | 75 NAVIGATE_WITHIN_PAGE, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 // Set to true if the classifier is currently running. | 137 // Set to true if the classifier is currently running. |
| 138 bool is_classifying_; | 138 bool is_classifying_; |
| 139 | 139 |
| 140 DISALLOW_COPY_AND_ASSIGN(PhishingClassifierDelegate); | 140 DISALLOW_COPY_AND_ASSIGN(PhishingClassifierDelegate); |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 } // namespace safe_browsing | 143 } // namespace safe_browsing |
| 144 | 144 |
| 145 #endif // CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ | 145 #endif // CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ |
| OLD | NEW |