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

Side by Side Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event _store.h" 5 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event _store.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 { #label, data_reduction_proxy::BYPASS_ACTION_TYPE_##label } \ 48 { #label, data_reduction_proxy::BYPASS_ACTION_TYPE_##label } \
49 , 49 ,
50 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_bypas s_action_list.h" 50 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_bypas s_action_list.h"
51 #undef BYPASS_ACTION_TYPE 51 #undef BYPASS_ACTION_TYPE
52 }; 52 };
53 53
54 std::string JoinListValueStrings(base::ListValue* list_value) { 54 std::string JoinListValueStrings(base::ListValue* list_value) {
55 std::vector<base::StringPiece> values; 55 std::vector<base::StringPiece> values;
56 for (const auto& value : *list_value) { 56 for (const auto& value : *list_value) {
57 base::StringPiece value_string; 57 base::StringPiece value_string;
58 if (!value.GetAsString(&value_string)) 58 if (!value->GetAsString(&value_string))
59 return std::string(); 59 return std::string();
60 60
61 values.push_back(value_string); 61 values.push_back(value_string);
62 } 62 }
63 63
64 return base::JoinString(values, ";"); 64 return base::JoinString(values, ";");
65 } 65 }
66 66
67 } // namespace 67 } // namespace
68 68
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 last_bypass->SetString("url", clean_url.spec()); 268 last_bypass->SetString("url", clean_url.spec());
269 } 269 }
270 } 270 }
271 271
272 std::string json; 272 std::string json;
273 base::JSONWriter::Write(*last_bypass.get(), &json); 273 base::JSONWriter::Write(*last_bypass.get(), &json);
274 return json; 274 return json;
275 } 275 }
276 276
277 } // namespace data_reduction_proxy 277 } // namespace data_reduction_proxy
OLDNEW
« no previous file with comments | « components/bookmarks/browser/bookmark_expanded_state_tracker.cc ('k') | components/error_page/common/localized_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698