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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |