OLD | NEW |
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 { #label, data_reduction_proxy::BYPASS_ACTION_TYPE_##label } \ | 47 { #label, data_reduction_proxy::BYPASS_ACTION_TYPE_##label } \ |
48 , | 48 , |
49 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_bypas
s_action_list.h" | 49 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_bypas
s_action_list.h" |
50 #undef BYPASS_ACTION_TYPE | 50 #undef BYPASS_ACTION_TYPE |
51 }; | 51 }; |
52 | 52 |
53 std::string JoinListValueStrings(base::ListValue* list_value) { | 53 std::string JoinListValueStrings(base::ListValue* list_value) { |
54 std::vector<std::string> values; | 54 std::vector<std::string> values; |
55 for (const auto& value : *list_value) { | 55 for (const auto& value : *list_value) { |
56 std::string value_string; | 56 std::string value_string; |
57 if (!value->GetAsString(&value_string)) | 57 if (!value.GetAsString(&value_string)) |
58 return std::string(); | 58 return std::string(); |
59 | 59 |
60 values.push_back(std::move(value_string)); | 60 values.push_back(std::move(value_string)); |
61 } | 61 } |
62 | 62 |
63 return base::JoinString(values, ";"); | 63 return base::JoinString(values, ";"); |
64 } | 64 } |
65 | 65 |
66 } // namespace | 66 } // namespace |
67 | 67 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 last_bypass->SetString("url", clean_url.spec()); | 267 last_bypass->SetString("url", clean_url.spec()); |
268 } | 268 } |
269 } | 269 } |
270 | 270 |
271 std::string json; | 271 std::string json; |
272 base::JSONWriter::Write(*last_bypass.get(), &json); | 272 base::JSONWriter::Write(*last_bypass.get(), &json); |
273 return json; | 273 return json; |
274 } | 274 } |
275 | 275 |
276 } // namespace data_reduction_proxy | 276 } // namespace data_reduction_proxy |
OLD | NEW |