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

Unified Diff: components/safe_browsing_db/v4_update_protocol_manager.cc

Issue 2356443002: Set client_id and client_version in requests sent to SafeBrowsing (Closed)
Patch Set: Created 4 years, 3 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_update_protocol_manager.cc
diff --git a/components/safe_browsing_db/v4_update_protocol_manager.cc b/components/safe_browsing_db/v4_update_protocol_manager.cc
index 69458fc860e667aab5574f442fe91f4cc9b4caca..a75adb07d3a6dd592f24a6cc8b71dbdef7f98641 100644
--- a/components/safe_browsing_db/v4_update_protocol_manager.cc
+++ b/components/safe_browsing_db/v4_update_protocol_manager.cc
@@ -194,7 +194,8 @@ void V4UpdateProtocolManager::ScheduleNextUpdateAfterInterval(
// static
std::string V4UpdateProtocolManager::GetBase64SerializedUpdateRequestProto(
- const StoreStateMap& store_state_map) {
+ const StoreStateMap& store_state_map,
+ const V4ProtocolConfig& config) {
DCHECK(!store_state_map.empty());
// Build the request. Client info and client states are not added to the
// request protocol buffer. Client info is passed as params in the url.
@@ -217,6 +218,9 @@ std::string V4UpdateProtocolManager::GetBase64SerializedUpdateRequestProto(
RICE);
}
+ V4ProtocolManagerUtil::SetClientInfoFromConfig(request.mutable_client(),
+ config);
+
// Serialize and Base64 encode.
std::string req_data, req_base64;
request.SerializeToString(&req_data);
@@ -278,7 +282,7 @@ void V4UpdateProtocolManager::IssueUpdateRequest() {
}
std::string req_base64 =
- GetBase64SerializedUpdateRequestProto(*store_state_map_.get());
+ GetBase64SerializedUpdateRequestProto(*store_state_map_.get(), config_);
GURL update_url;
net::HttpRequestHeaders headers;
GetUpdateUrlAndHeaders(req_base64, &update_url, &headers);

Powered by Google App Engine
This is Rietveld 408576698