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

Unified Diff: net/cert/ct_log_response_parser.cc

Issue 2613223002: Remove ScopedVector from base::JSONValueConverter (Closed)
Patch Set: Rebase and address comments from mmenke@ Created 3 years, 11 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 | « google_apis/drive/drive_api_requests.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/ct_log_response_parser.cc
diff --git a/net/cert/ct_log_response_parser.cc b/net/cert/ct_log_response_parser.cc
index 5baf1b33534dc8abbf1f18950c985cbf6b75eeba..b6067d14f3846ec33d8c7404713ceb7ce93b0851 100644
--- a/net/cert/ct_log_response_parser.cc
+++ b/net/cert/ct_log_response_parser.cc
@@ -4,10 +4,11 @@
#include "net/cert/ct_log_response_parser.h"
+#include <memory>
+
#include "base/base64.h"
#include "base/json/json_value_converter.h"
#include "base/logging.h"
-#include "base/memory/scoped_vector.h"
#include "base/strings/string_piece.h"
#include "base/time/time.h"
#include "base/values.h"
@@ -105,7 +106,7 @@ bool IsJsonSTHStructurallyValid(const JsonSignedTreeHead& sth) {
// Structure for making JSON decoding easier. The string fields
// are base64-encoded so will require further decoding.
struct JsonConsistencyProof {
- ScopedVector<std::string> proof_nodes;
+ std::vector<std::unique_ptr<std::string>> proof_nodes;
static void RegisterJSONConverter(
base::JSONValueConverter<JsonConsistencyProof>* converter);
@@ -170,7 +171,7 @@ bool FillConsistencyProof(const base::Value& json_consistency_proof,
}
consistency_proof->reserve(parsed_proof.proof_nodes.size());
- for (std::string* proof_node : parsed_proof.proof_nodes) {
+ for (const auto& proof_node : parsed_proof.proof_nodes) {
consistency_proof->push_back(*proof_node);
}
« no previous file with comments | « google_apis/drive/drive_api_requests.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698