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

Unified Diff: components/safe_browsing_db/v4_get_hash_protocol_manager.cc

Issue 2090593003: Small: Use WebBase64/UrlBase64 encoding for requests sent to the server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@01_UpdateDbAndStores
Patch Set: git pull Created 4 years, 6 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 | « no previous file | components/safe_browsing_db/v4_update_protocol_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing_db/v4_get_hash_protocol_manager.cc
diff --git a/components/safe_browsing_db/v4_get_hash_protocol_manager.cc b/components/safe_browsing_db/v4_get_hash_protocol_manager.cc
index 90b9caef626bdd39a3f3d4c2347bd934406c40bd..4b5f911d3aea69310fb8be800b29b7dff126aac1 100644
--- a/components/safe_browsing_db/v4_get_hash_protocol_manager.cc
+++ b/components/safe_browsing_db/v4_get_hash_protocol_manager.cc
@@ -6,7 +6,7 @@
#include <utility>
-#include "base/base64.h"
+#include "base/base64url.h"
#include "base/macros.h"
#include "base/metrics/histogram_macros.h"
#include "base/timer/timer.h"
@@ -154,8 +154,8 @@ std::string V4GetHashProtocolManager::GetHashRequest(
// Serialize and Base64 encode.
std::string req_data, req_base64;
req.SerializeToString(&req_data);
- base::Base64Encode(req_data, &req_base64);
-
+ base::Base64UrlEncode(req_data, base::Base64UrlEncodePolicy::INCLUDE_PADDING,
+ &req_base64);
return req_base64;
}
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_update_protocol_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698