diff options
author | bryner@chromium.org <bryner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-19 00:40:43 +0000 |
---|---|---|
committer | bryner@chromium.org <bryner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-19 00:40:43 +0000 |
commit | 18f87e93de9847f12de18516e0dcc50913416dc1 (patch) | |
tree | d63eccee165858a89b7f963f04eb6a255301cd7c /chrome/browser/safe_browsing | |
parent | 243a8eeb4a5b7421cf2cc66ed77e8480a41bfc43 (diff) | |
download | chromium_src-18f87e93de9847f12de18516e0dcc50913416dc1.zip chromium_src-18f87e93de9847f12de18516e0dcc50913416dc1.tar.gz chromium_src-18f87e93de9847f12de18516e0dcc50913416dc1.tar.bz2 |
Roll out v1 of the client-side phishing detection model, to replace v0.
BUG=82984
TEST=none
Review URL: http://codereview.chromium.org/7017032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r-- | chrome/browser/safe_browsing/client_side_detection_service.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc index 1d7b844..70ec7bf 100644 --- a/chrome/browser/safe_browsing/client_side_detection_service.cc +++ b/chrome/browser/safe_browsing/client_side_detection_service.cc @@ -41,8 +41,14 @@ const base::TimeDelta ClientSideDetectionService::kPositiveCacheInterval = const char ClientSideDetectionService::kClientReportPhishingUrl[] = "https://sb-ssl.google.com/safebrowsing/clientreport/phishing"; +// Note: when updatng the model version, don't forget to change the filename +// in chrome/common/chrome_constants.cc as well, or else existing users won't +// download the new model. +// +// TODO(bryner): add version metadata so that clients can download new models +// without needing a new model filename. const char ClientSideDetectionService::kClientModelUrl[] = - "https://ssl.gstatic.com/safebrowsing/csd/client_model_v0.pb"; + "https://ssl.gstatic.com/safebrowsing/csd/client_model_v1.pb"; struct ClientSideDetectionService::ClientReportInfo { scoped_ptr<ClientReportPhishingRequestCallback> callback; @@ -99,6 +105,14 @@ ClientSideDetectionService* ClientSideDetectionService::Create( delete cb; return NULL; } + + // Delete the previous-version model file. + // TODO(bryner): Remove this for M14. + base::FileUtilProxy::Delete( + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), + model_path.DirName().AppendASCII("Safe Browsing Phishing Model"), + false /* not recursive */, + NULL /* not interested in result */); return service.release(); } |