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

Side by Side Diff: chrome/browser/chromeos/net/onc_utils.cc

Issue 370623002: Remove most of NetworkUIData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed yet-another unused function. Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/net/onc_utils.h" 5 #include "chrome/browser/chromeos/net/onc_utils.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Remove irrelevant fields. 213 // Remove irrelevant fields.
214 onc::Normalizer normalizer(true /* remove recommended fields */); 214 onc::Normalizer normalizer(true /* remove recommended fields */);
215 scoped_ptr<base::DictionaryValue> normalized_network = 215 scoped_ptr<base::DictionaryValue> normalized_network =
216 normalizer.NormalizeObject(&onc::kNetworkConfigurationSignature, 216 normalizer.NormalizeObject(&onc::kNetworkConfigurationSignature,
217 *network); 217 *network);
218 218
219 scoped_ptr<base::DictionaryValue> shill_dict = 219 scoped_ptr<base::DictionaryValue> shill_dict =
220 onc::TranslateONCObjectToShill(&onc::kNetworkConfigurationSignature, 220 onc::TranslateONCObjectToShill(&onc::kNetworkConfigurationSignature,
221 *normalized_network); 221 *normalized_network);
222 222
223 scoped_ptr<NetworkUIData> ui_data = NetworkUIData::CreateFromONC( 223 scoped_ptr<NetworkUIData> ui_data(
224 ::onc::ONC_SOURCE_USER_IMPORT, *normalized_network); 224 NetworkUIData::CreateFromONC(::onc::ONC_SOURCE_USER_IMPORT));
225 base::DictionaryValue ui_data_dict; 225 base::DictionaryValue ui_data_dict;
226 ui_data->FillDictionary(&ui_data_dict); 226 ui_data->FillDictionary(&ui_data_dict);
227 std::string ui_data_json; 227 std::string ui_data_json;
228 base::JSONWriter::Write(&ui_data_dict, &ui_data_json); 228 base::JSONWriter::Write(&ui_data_dict, &ui_data_json);
229 shill_dict->SetStringWithoutPathExpansion(shill::kUIDataProperty, 229 shill_dict->SetStringWithoutPathExpansion(shill::kUIDataProperty,
230 ui_data_json); 230 ui_data_json);
231 231
232 shill_dict->SetStringWithoutPathExpansion(shill::kProfileProperty, 232 shill_dict->SetStringWithoutPathExpansion(shill::kProfileProperty,
233 profile->path); 233 profile->path);
234 234
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 const PrefService* local_state_prefs, 447 const PrefService* local_state_prefs,
448 const NetworkState& network) { 448 const NetworkState& network) {
449 ::onc::ONCSource ignored_onc_source; 449 ::onc::ONCSource ignored_onc_source;
450 const base::DictionaryValue* policy = onc::GetPolicyForNetwork( 450 const base::DictionaryValue* policy = onc::GetPolicyForNetwork(
451 profile_prefs, local_state_prefs, network, &ignored_onc_source); 451 profile_prefs, local_state_prefs, network, &ignored_onc_source);
452 return policy != NULL; 452 return policy != NULL;
453 } 453 }
454 454
455 } // namespace onc 455 } // namespace onc
456 } // namespace chromeos 456 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/enrollment_dialog_view.cc ('k') | chromeos/network/certificate_pattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698