Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: chrome/browser/safe_browsing/client_side_detection_host.cc

Issue 7172018: Revert 89178 - Create a browser feature extractor that runs after the renderer has (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/client_side_detection_host.cc
===================================================================
--- chrome/browser/safe_browsing/client_side_detection_host.cc (revision 89204)
+++ chrome/browser/safe_browsing/client_side_detection_host.cc (working copy)
@@ -13,7 +13,6 @@
#include "base/task.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/safe_browsing/browser_feature_extractor.h"
#include "chrome/browser/safe_browsing/client_side_detection_service.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/common/chrome_switches.h"
@@ -265,7 +264,6 @@
ClientSideDetectionHost::ClientSideDetectionHost(TabContents* tab)
: TabContentsObserver(tab),
csd_service_(g_browser_process->safe_browsing_detection_service()),
- feature_extractor_(new BrowserFeatureExtractor(tab)),
cb_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
DCHECK(tab);
// Note: csd_service_ and sb_service_ might be NULL.
@@ -342,12 +340,12 @@
// There shouldn't be any pending requests because we revoke them everytime
// we navigate away.
DCHECK(!cb_factory_.HasPendingCallbacks());
-
- // Start browser-side feature extraction. Once we're done it will send
- // the client verdict request.
- feature_extractor_->ExtractFeatures(
- verdict.release(),
- NewCallback(this, &ClientSideDetectionHost::FeatureExtractionDone));
+ VLOG(2) << "Start sending client phishing request for URL: "
+ << verdict->url();
+ csd_service_->SendClientReportPhishingRequest(
+ verdict.release(), // The service takes ownership of the verdict.
+ cb_factory_.NewCallback(
+ &ClientSideDetectionHost::MaybeShowPhishingWarning));
}
}
@@ -379,22 +377,6 @@
}
}
-void ClientSideDetectionHost::FeatureExtractionDone(
- bool success,
- ClientPhishingRequest* request) {
- if (!request) {
- DLOG(FATAL) << "Invalid request object in FeatureExtractionDone";
- return;
- }
- VLOG(2) << "Feature extraction done (success:" << success << ") for URL: "
- << request->url() << ". Start sending client phishing request.";
- // Send ping no matter what - even if the browser feature extraction failed.
- csd_service_->SendClientReportPhishingRequest(
- request, // The service takes ownership of the request object.
- cb_factory_.NewCallback(
- &ClientSideDetectionHost::MaybeShowPhishingWarning));
-}
-
void ClientSideDetectionHost::set_client_side_detection_service(
ClientSideDetectionService* service) {
csd_service_ = service;

Powered by Google App Engine
This is Rietveld 408576698