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

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

Issue 7017032: Roll out v1 of the client-side phishing detection model, to replace v0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Delete the old version of the model Created 9 years, 7 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
« no previous file with comments | « no previous file | chrome/common/chrome_constants.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/client_side_detection_service.cc
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc
index 1d7b844c4bf87a37ce0f6e8d6c4ec587438dc1e6..70ec7bfef0511535a7227592da63ce878d4d0170 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();
}
« no previous file with comments | « no previous file | chrome/common/chrome_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698