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

Unified Diff: components/error_page/renderer/net_error_helper_core.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 | « components/drive/service/fake_drive_service.cc ('k') | google_apis/drive/drive_api_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/error_page/renderer/net_error_helper_core.cc
diff --git a/components/error_page/renderer/net_error_helper_core.cc b/components/error_page/renderer/net_error_helper_core.cc
index 3451b7e160c8b9e8be3cae95391476d912167396..f040f97f3d8c333786c0f223b1b471f5f3766c92 100644
--- a/components/error_page/renderer/net_error_helper_core.cc
+++ b/components/error_page/renderer/net_error_helper_core.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
+#include <memory>
#include <set>
#include <string>
#include <utility>
@@ -20,7 +21,6 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/sparse_histogram.h"
#include "base/strings/string16.h"
@@ -103,7 +103,7 @@ struct NavigationCorrection {
struct NavigationCorrectionResponse {
std::string event_id;
std::string fingerprint;
- ScopedVector<NavigationCorrection> corrections;
+ std::vector<std::unique_ptr<NavigationCorrection>> corrections;
static void RegisterJSONConverter(
base::JSONValueConverter<NavigationCorrectionResponse>* converter) {
@@ -302,9 +302,8 @@ std::unique_ptr<ErrorPageParams> CreateErrorPageParams(
std::unique_ptr<ErrorPageParams> params(new ErrorPageParams());
params->override_suggestions.reset(new base::ListValue());
std::unique_ptr<base::ListValue> parsed_corrections(new base::ListValue());
- for (ScopedVector<NavigationCorrection>::const_iterator it =
- response.corrections.begin();
- it != response.corrections.end(); ++it) {
+ for (auto it = response.corrections.begin(); it != response.corrections.end();
+ ++it) {
// Doesn't seem like a good idea to show these.
if ((*it)->is_porn || (*it)->is_soft_porn)
continue;
« no previous file with comments | « components/drive/service/fake_drive_service.cc ('k') | google_apis/drive/drive_api_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698