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

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: Reduce duplication in comments 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..65e1f1b73ee81761fd7dcca611831b84b80f98f1 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -58,6 +58,20 @@ const FilePath::CharType kCookiesFile[] = FILE_PATH_LITERAL(" Cookies");
const char* const kSbDefaultURLPrefix =
"https://safebrowsing.google.com/safebrowsing";
+// The backup URL prefix used when there are issues establishing a connection
+// with the server at the primary URL.
+const char* const kSbBackupConnectErrorURLPrefix =
+ "https://alt1-safebrowsing.google.com/safebrowsing";
+
+// The backup URL prefix used when there are HTTP-specific issues with the
+// server at the primary URL.
+const char* const kSbBackupHttpErrorURLPrefix =
+ "https://alt2-safebrowsing.google.com/safebrowsing";
+
+// The backup URL prefix used when there are local network specific issues.
+const char* const kSbBackupNetworkErrorURLPrefix =
+ "https://alt3-safebrowsing.google.com/safebrowsing";
noelutz 2013/01/15 01:46:49 Just curious. In the CL description you mention th
noelutz 2013/01/15 18:04:07 Still curious about that ;).
cbentzel 2013/01/22 20:04:30 Sorry - it may be reasonable to do a raw IP only.
+
FilePath CookieFilePath() {
return FilePath(
SafeBrowsingService::GetBaseFilename().value() + kCookiesFile);
@@ -341,6 +355,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