| 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // ensuring that it stays valid until TabContentsDestroyed is called. | 39 // ensuring that it stays valid until TabContentsDestroyed is called. |
| 40 static ClientSideDetectionHost* Create(TabContents* tab); | 40 static ClientSideDetectionHost* Create(TabContents* tab); |
| 41 virtual ~ClientSideDetectionHost(); | 41 virtual ~ClientSideDetectionHost(); |
| 42 | 42 |
| 43 // From TabContentsObserver. | 43 // From TabContentsObserver. |
| 44 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 44 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 45 | 45 |
| 46 // From TabContentsObserver. If we navigate away we cancel all pending | 46 // From TabContentsObserver. If we navigate away we cancel all pending |
| 47 // callbacks that could show an interstitial, and check to see whether | 47 // callbacks that could show an interstitial, and check to see whether |
| 48 // we should classify the new URL. | 48 // we should classify the new URL. |
| 49 virtual void DidNavigateMainFramePostCommit( | 49 virtual void DidNavigateMainFrame( |
| 50 const content::LoadCommittedDetails& details, | 50 const content::LoadCommittedDetails& details, |
| 51 const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; | 51 const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; |
| 52 | 52 |
| 53 // Called when the SafeBrowsingService found a hit with one of the | 53 // Called when the SafeBrowsingService found a hit with one of the |
| 54 // SafeBrowsing lists. This method is called on the UI thread. | 54 // SafeBrowsing lists. This method is called on the UI thread. |
| 55 virtual void OnSafeBrowsingHit( | 55 virtual void OnSafeBrowsingHit( |
| 56 const SafeBrowsingService::UnsafeResource& resource) OVERRIDE; | 56 const SafeBrowsingService::UnsafeResource& resource) OVERRIDE; |
| 57 | 57 |
| 58 protected: | 58 protected: |
| 59 // From TabContentsObserver. Called when the TabContents is being destroyed. | 59 // From TabContentsObserver. Called when the TabContents is being destroyed. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // as well as the UnsafeResource. | 127 // as well as the UnsafeResource. |
| 128 int unsafe_unique_page_id_; | 128 int unsafe_unique_page_id_; |
| 129 scoped_ptr<SafeBrowsingService::UnsafeResource> unsafe_resource_; | 129 scoped_ptr<SafeBrowsingService::UnsafeResource> unsafe_resource_; |
| 130 | 130 |
| 131 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost); | 131 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost); |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace safe_browsing | 134 } // namespace safe_browsing |
| 135 | 135 |
| 136 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ | 136 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ |
| OLD | NEW |