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

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

Issue 11784038: Add backup URL support for SafeBrowsing data requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bad response case Created 7 years, 11 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/safe_browsing_service.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index b957300e6a2278adcc248be6119ebcfb90716bcc..80dd087fe6e052eaa2a328064da2cc101ec983c7 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -58,6 +58,21 @@ const FilePath::CharType kCookiesFile[] = FILE_PATH_LITERAL(" Cookies");
const char* const kSbDefaultURLPrefix =
"https://safebrowsing.google.com/safebrowsing";
+// The backup URL prefix where browser fetches chunk updates, hashes,
+// and reports safe browsing hits and malware details.
mattm 2013/01/12 02:24:49 Instead of duplicating the same comment for each o
cbentzel 2013/01/14 11:33:35 Done.
+const char* const kSbBackupConnectErrorURLPrefix =
+ "https://alt1-safebrowsing.google.com/safebrowsing";
+
+// The backup URL prefix where browser fetches chunk updates, hashes,
+// and reports safe browsing hits and malware details.
+const char* const kSbBackupHttpErrorURLPrefix =
+ "https://alt2-safebrowsing.google.com/safebrowsing";
+
+// The backup URL prefix where browser fetches chunk updates, hashes,
+// and reports safe browsing hits and malware details.
+const char* const kSbBackupNetworkErrorURLPrefix =
+ "https://alt3-safebrowsing.google.com/safebrowsing";
+
FilePath CookieFilePath() {
return FilePath(
SafeBrowsingService::GetBaseFilename().value() + kCookiesFile);
@@ -341,6 +356,9 @@ void SafeBrowsingService::StartOnIOThread() {
cmdline->HasSwitch(switches::kSbURLPrefix) ?
cmdline->GetSwitchValueASCII(switches::kSbURLPrefix) :
kSbDefaultURLPrefix;
+ config.backup_connect_error_url_prefix = kSbBackupConnectErrorURLPrefix;
+ config.backup_http_error_url_prefix = kSbBackupHttpErrorURLPrefix;
+ config.backup_network_error_url_prefix = kSbBackupNetworkErrorURLPrefix;
#if defined(FULL_SAFE_BROWSING)
DCHECK(database_manager_);

Powered by Google App Engine
This is Rietveld 408576698