| 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 #pragma once | 9 #pragma once |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/string16.h" | 12 #include "base/string16.h" |
| 13 #include "content/common/page_transition_types.h" | 13 #include "content/common/page_transition_types.h" |
| 14 #include "content/public/renderer/render_process_observer.h" |
| 14 #include "content/public/renderer/render_view_observer.h" | 15 #include "content/public/renderer/render_view_observer.h" |
| 15 #include "content/renderer/render_process_observer.h" | |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 | 17 |
| 18 namespace safe_browsing { | 18 namespace safe_browsing { |
| 19 class ClientPhishingRequest; | 19 class ClientPhishingRequest; |
| 20 class PhishingClassifier; | 20 class PhishingClassifier; |
| 21 class Scorer; | 21 class Scorer; |
| 22 | 22 |
| 23 class PhishingClassifierFilter : public RenderProcessObserver { | 23 class PhishingClassifierFilter : public content::RenderProcessObserver { |
| 24 public: | 24 public: |
| 25 static PhishingClassifierFilter* Create(); | 25 static PhishingClassifierFilter* Create(); |
| 26 virtual ~PhishingClassifierFilter(); | 26 virtual ~PhishingClassifierFilter(); |
| 27 | 27 |
| 28 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; | 28 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 PhishingClassifierFilter(); | 31 PhishingClassifierFilter(); |
| 32 void OnSetPhishingModel(const std::string& model); | 32 void OnSetPhishingModel(const std::string& model); |
| 33 | 33 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 // Set to true if the classifier is currently running. | 138 // Set to true if the classifier is currently running. |
| 139 bool is_classifying_; | 139 bool is_classifying_; |
| 140 | 140 |
| 141 DISALLOW_COPY_AND_ASSIGN(PhishingClassifierDelegate); | 141 DISALLOW_COPY_AND_ASSIGN(PhishingClassifierDelegate); |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 } // namespace safe_browsing | 144 } // namespace safe_browsing |
| 145 | 145 |
| 146 #endif // CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ | 146 #endif // CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ |
| OLD | NEW |