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

Side by Side Diff: remoting/test/host_info.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
« no previous file with comments | « remoting/protocol/http_ice_config_request.cc ('k') | remoting/test/host_list_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "remoting/test/host_info.h" 5 #include "remoting/test/host_info.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace remoting { 9 namespace remoting {
10 namespace test { 10 namespace test {
11 11
12 HostInfo::HostInfo() {} 12 HostInfo::HostInfo() {}
13 HostInfo::HostInfo(const HostInfo& other) = default; 13 HostInfo::HostInfo(const HostInfo& other) = default;
14 14
15 HostInfo::~HostInfo() {} 15 HostInfo::~HostInfo() {}
16 16
17 bool HostInfo::ParseHostInfo(const base::DictionaryValue& host_info) { 17 bool HostInfo::ParseHostInfo(const base::DictionaryValue& host_info) {
18 const base::ListValue* list_value = nullptr; 18 const base::ListValue* list_value = nullptr;
19 19
20 // Add TokenUrlPatterns to HostInfo. 20 // Add TokenUrlPatterns to HostInfo.
21 if (host_info.GetList("tokenUrlPatterns", &list_value)) { 21 if (host_info.GetList("tokenUrlPatterns", &list_value)) {
22 if (!list_value->empty()) { 22 if (!list_value->empty()) {
23 for (const auto& item : *list_value) { 23 for (const auto& item : *list_value) {
24 std::string token_url_pattern; 24 std::string token_url_pattern;
25 if (!item.GetAsString(&token_url_pattern)) { 25 if (!item->GetAsString(&token_url_pattern)) {
26 return false; 26 return false;
27 } 27 }
28 token_url_patterns.push_back(token_url_pattern); 28 token_url_patterns.push_back(token_url_pattern);
29 } 29 }
30 } 30 }
31 } 31 }
32 32
33 std::string response_status; 33 std::string response_status;
34 host_info.GetString("status", &response_status); 34 host_info.GetString("status", &response_status);
35 if (response_status == "ONLINE") { 35 if (response_status == "ONLINE") {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 connection_setup_info.host_jid = host_jid; 83 connection_setup_info.host_jid = host_jid;
84 connection_setup_info.host_name = host_name; 84 connection_setup_info.host_name = host_name;
85 connection_setup_info.pin = pin; 85 connection_setup_info.pin = pin;
86 connection_setup_info.public_key = public_key; 86 connection_setup_info.public_key = public_key;
87 connection_setup_info.user_name = user_name; 87 connection_setup_info.user_name = user_name;
88 return connection_setup_info; 88 return connection_setup_info;
89 } 89 }
90 90
91 } // namespace test 91 } // namespace test
92 } // namespace remoting 92 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/http_ice_config_request.cc ('k') | remoting/test/host_list_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698