Chromium Code Reviews| 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 46dcf335f92fa38b501b15eb5266e6493a9b1470..d0153c74750cb2235ba6b763e2f2b0a659eceec2 100644 |
| --- a/components/safe_browsing_db/v4_update_protocol_manager.cc |
| +++ b/components/safe_browsing_db/v4_update_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/rand_util.h" |
| @@ -192,7 +192,7 @@ void V4UpdateProtocolManager::ScheduleNextUpdateAfterInterval( |
| } |
| // static |
|
Nathan Parker
2016/06/22 17:24:05
nit: I feel like the longer name doesn't add much
vakh (use Gerrit instead)
2016/06/22 20:57:02
Done.
|
| -std::string V4UpdateProtocolManager::GetBase64SerializedUpdateRequestProto( |
| +std::string V4UpdateProtocolManager::GetWebBase64SerializedUpdateRequestProto( |
| const StoreStateMap* store_state_map) { |
| // 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. |
| @@ -214,8 +214,8 @@ std::string V4UpdateProtocolManager::GetBase64SerializedUpdateRequestProto( |
| // Serialize and Base64 encode. |
| std::string req_data, req_base64; |
| request.SerializeToString(&req_data); |
| - base::Base64Encode(req_data, &req_base64); |
| - |
| + base::Base64UrlEncode(req_data, base::Base64UrlEncodePolicy::INCLUDE_PADDING, |
|
Nathan Parker
2016/06/22 17:24:05
Does this affect any test? Should it?
vakh (use Gerrit instead)
2016/06/22 20:57:03
Done.
Added a test for the '-' and for the '_' cas
|
| + &req_base64); |
| return req_base64; |
| } |
| @@ -270,7 +270,7 @@ void V4UpdateProtocolManager::IssueUpdateRequest() { |
| } |
| std::string req_base64 = |
| - GetBase64SerializedUpdateRequestProto(store_state_map_.get()); |
| + GetWebBase64SerializedUpdateRequestProto(store_state_map_.get()); |
| GURL update_url; |
| net::HttpRequestHeaders headers; |
| GetUpdateUrlAndHeaders(req_base64, &update_url, &headers); |