Chromium Code Reviews| Index: chrome/browser/safe_browsing/client_side_detection_host.cc |
| diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc |
| index 414c55bb7112c2b39932021ec703c876b85d1175..bf06a2dfe38ce06435609f599be78a9a33be32e4 100644 |
| --- a/chrome/browser/safe_browsing/client_side_detection_host.cc |
| +++ b/chrome/browser/safe_browsing/client_side_detection_host.cc |
| @@ -45,8 +45,6 @@ namespace safe_browsing { |
| const size_t ClientSideDetectionHost::kMaxUrlsPerIP = 20; |
| const size_t ClientSideDetectionHost::kMaxIPsPerBrowse = 200; |
| -const char kSafeBrowsingMatchKey[] = "safe_browsing_match"; |
| - |
| typedef base::Callback<void(bool)> ShouldClassifyUrlCallback; |
| // This class is instantiated each time a new toplevel URL loads, and |
| @@ -433,47 +431,13 @@ void ClientSideDetectionHost::OnSafeBrowsingHit( |
| } |
| void ClientSideDetectionHost::OnSafeBrowsingMatch( |
|
Nathan Parker
2015/12/03 17:21:20
Can this method be removed altogether (from the ob
mattm
2015/12/03 20:38:36
Yeah, it could be. I'll do that in a separate CL s
|
| - const SafeBrowsingUIManager::UnsafeResource& resource) { |
| - if (!web_contents() || !web_contents()->GetController().GetActiveEntry()) |
| - return; |
| - |
| - // Check that this notification is really for us. |
| - content::RenderViewHost* hit_rvh = content::RenderViewHost::FromID( |
| - resource.render_process_host_id, resource.render_view_id); |
| - if (!hit_rvh || |
| - web_contents() != content::WebContents::FromRenderViewHost(hit_rvh)) |
| - return; |
| - |
| - web_contents()->GetController().GetActiveEntry()->SetExtraData( |
| - kSafeBrowsingMatchKey, base::ASCIIToUTF16("1")); |
| -} |
| + const SafeBrowsingUIManager::UnsafeResource& resource) {} |
| scoped_refptr<SafeBrowsingDatabaseManager> |
| ClientSideDetectionHost::database_manager() { |
| return database_manager_; |
| } |
| -bool ClientSideDetectionHost::DidPageReceiveSafeBrowsingMatch() const { |
| - if (!web_contents() || !web_contents()->GetController().GetVisibleEntry()) |
| - return false; |
| - |
| - // If an interstitial page is showing, GetVisibleEntry will return the |
| - // transient NavigationEntry for the interstitial. The transient entry |
| - // will not have the flag set, so use the pending entry instead if there |
| - // is one. |
| - NavigationEntry* entry = web_contents()->GetController().GetPendingEntry(); |
| - if (!entry) { |
| - entry = web_contents()->GetController().GetVisibleEntry(); |
| - if (entry->GetPageType() == content::PAGE_TYPE_INTERSTITIAL) |
| - entry = web_contents()->GetController().GetLastCommittedEntry(); |
| - if (!entry) |
| - return false; |
| - } |
| - |
| - base::string16 value; |
| - return entry->GetExtraData(kSafeBrowsingMatchKey, &value); |
| -} |
| - |
| void ClientSideDetectionHost::WebContentsDestroyed() { |
| // Tell any pending classification request that it is being canceled. |
| if (classification_request_.get()) { |