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

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: Small return case refactor 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
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a2fc083d3b9fbb645bb9766df63eab523153d66b..fdb291cc951501ec3e7507296f684ebf817d74c4 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -59,6 +59,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";
+
FilePath CookieFilePath() {
return FilePath(
SafeBrowsingService::GetBaseFilename().value() + kCookiesFile);
@@ -345,6 +359,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_);
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698