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

Unified Diff: components/error_page/renderer/net_error_helper_core.cc

Issue 2613223002: Remove ScopedVector from base::JSONValueConverter (Closed)
Patch Set: 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
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 13cb441b68719209c6fa29d25ae5aa99e3aadcd4..0c3bd437eeb529e7a8962ded35de440be5fa7c72 100644
--- a/components/error_page/renderer/net_error_helper_core.cc
+++ b/components/error_page/renderer/net_error_helper_core.cc
@@ -20,7 +20,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 +102,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,7 +301,7 @@ 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 =
+ for (std::vector<std::unique_ptr<NavigationCorrection>>::const_iterator it =
Avi (use Gerrit) 2017/01/09 17:18:29 for (auto it = ...)?
leonhsl(Using Gerrit) 2017/01/10 04:39:36 Done.
response.corrections.begin();
it != response.corrections.end(); ++it) {
// Doesn't seem like a good idea to show these.

Powered by Google App Engine
This is Rietveld 408576698