nearby: snapshot of cl/304428753

Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: I0023ac6e40456fc4a8169c3173bcbff3b5ccc476
This commit is contained in:
Alexey Polyudov
2020-04-04 12:54:05 -07:00
parent 204f76077d
commit d455926d89
87 changed files with 2869 additions and 631 deletions
+3 -4
View File
@@ -1,6 +1,5 @@
#include "platform/base64_utils.h"
#include "strings/escaping.h"
#include "absl/strings/escaping.h"
namespace location {
@@ -25,7 +24,7 @@ std::string Base64Utils::encode(const ByteArray& bytes) {
return base64_string;
}
std::string Base64Utils::encode(const std::string& input) {
std::string Base64Utils::encode(absl::string_view input) {
std::string base64_string;
absl::WebSafeBase64Escape(input, &base64_string);
@@ -33,7 +32,7 @@ std::string Base64Utils::encode(const std::string& input) {
}
template<>
Ptr<ByteArray> Base64Utils::decode(const std::string& base64_string) {
Ptr<ByteArray> Base64Utils::decode(absl::string_view base64_string) {
std::string decoded_string;
if (!absl::WebSafeBase64Unescape(base64_string, &decoded_string)) {
return Ptr<ByteArray>();
@@ -43,7 +42,7 @@ Ptr<ByteArray> Base64Utils::decode(const std::string& base64_string) {
}
template<>
ByteArray Base64Utils::decode(const std::string& base64_string) {
ByteArray Base64Utils::decode(absl::string_view base64_string) {
std::string decoded_string;
if (!absl::WebSafeBase64Unescape(base64_string, &decoded_string)) {
return ByteArray();