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

Side by Side Diff: chrome/browser/chromeos/cros/network_parser.cc

Issue 8734013: Resubmit CL. See 8429004. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/cros/network_parser.h" 5 #include "chrome/browser/chromeos/cros/network_parser.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" // for debug output only. 8 #include "base/json/json_writer.h" // for debug output only.
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return true; 122 return true;
123 } 123 }
124 124
125 bool NetworkParser::UpdateStatus(const std::string& key, 125 bool NetworkParser::UpdateStatus(const std::string& key,
126 const base::Value& value, 126 const base::Value& value,
127 Network* network, 127 Network* network,
128 PropertyIndex* index) { 128 PropertyIndex* index) {
129 PropertyIndex found_index = mapper().Get(key); 129 PropertyIndex found_index = mapper().Get(key);
130 if (index) 130 if (index)
131 *index = found_index; 131 *index = found_index;
132 network->UpdatePropertyMap(found_index, value);
132 if (!ParseValue(found_index, value, network)) { 133 if (!ParseValue(found_index, value, network)) {
133 VLOG(1) << "Unhandled key '" << key << "' in Network: " << network->name() 134 VLOG(1) << "Unhandled key '" << key << "' in Network: " << network->name()
134 << " ID: " << network->unique_id() 135 << " ID: " << network->unique_id()
135 << " Type: " << ConnectionTypeToString(network->type()); 136 << " Type: " << ConnectionTypeToString(network->type());
136 return false; 137 return false;
137 } 138 }
138 if (VLOG_IS_ON(2)) { 139 if (VLOG_IS_ON(2)) {
139 std::string value_json; 140 std::string value_json;
140 base::JSONWriter::Write(&value, true, &value_json); 141 base::JSONWriter::Write(&value, true, &value_json);
141 VLOG(2) << "Updated value on network: " 142 VLOG(2) << "Updated value on network: "
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 static_cast<base::DictionaryValue*>(ui_data.get())); 218 static_cast<base::DictionaryValue*>(ui_data.get()));
218 return true; 219 return true;
219 } 220 }
220 default: 221 default:
221 break; 222 break;
222 } 223 }
223 return false; 224 return false;
224 } 225 }
225 226
226 } // namespace chromeos 227 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_parser.h ('k') | chrome/browser/chromeos/cros/onc_network_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698