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

Unified Diff: components/safe_browsing_db/v4_protocol_manager_util.cc

Issue 1848973004: Makes V4UpdateProtocolManager auto-schedule update fetching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v4_01_
Patch Set: git fetch && git pull && gclient sync Created 4 years, 9 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: components/safe_browsing_db/v4_protocol_manager_util.cc
diff --git a/components/safe_browsing_db/v4_protocol_manager_util.cc b/components/safe_browsing_db/v4_protocol_manager_util.cc
index 2dddc161e563115576fe844dd36e1e4dd36dfdde..fbbad5bcc29bb40c4fdfb9655049790c599c954f 100644
--- a/components/safe_browsing_db/v4_protocol_manager_util.cc
+++ b/components/safe_browsing_db/v4_protocol_manager_util.cc
@@ -37,6 +37,10 @@ size_t UpdateListIdentifier::hash() const {
return base::HashInts(interim, third);
}
+V4ProtocolConfig::V4ProtocolConfig() : disable_auto_update(false) {}
+
+V4ProtocolConfig::~V4ProtocolConfig() {}
+
// static
// Backoff interval is MIN(((2^(n-1))*15 minutes) * (RAND + 1), 24 hours) where
// n is the number of consecutive errors.
@@ -72,9 +76,9 @@ void V4ProtocolManagerUtil::RecordHttpResponseOrErrorCode(
// static
// The API hash call uses the pver4 Safe Browsing server.
-GURL V4ProtocolManagerUtil::GetRequestUrl(
- const std::string& request_base64, const std::string& method_name,
- const V4ProtocolConfig& config) {
+GURL V4ProtocolManagerUtil::GetRequestUrl(const std::string& request_base64,
+ const std::string& method_name,
+ const V4ProtocolConfig& config) {
std::string url =
ComposeUrl(kSbV4UrlPrefix, method_name, request_base64,
config.client_name, config.version, config.key_param);
@@ -82,13 +86,12 @@ GURL V4ProtocolManagerUtil::GetRequestUrl(
}
// static
-std::string V4ProtocolManagerUtil::ComposeUrl(
- const std::string& prefix,
- const std::string& method,
- const std::string& request_base64,
- const std::string& client_id,
- const std::string& version,
- const std::string& key_param) {
+std::string V4ProtocolManagerUtil::ComposeUrl(const std::string& prefix,
+ const std::string& method,
+ const std::string& request_base64,
+ const std::string& client_id,
+ const std::string& version,
+ const std::string& key_param) {
DCHECK(!prefix.empty() && !method.empty() && !client_id.empty() &&
!version.empty());
std::string url =
« no previous file with comments | « components/safe_browsing_db/v4_protocol_manager_util.h ('k') | components/safe_browsing_db/v4_update_protocol_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698