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

Side by Side Diff: chromeos/network/network_util.cc

Issue 24348002: Migrate DBus service constants from flimflam namespace to shill namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased to ToT Created 7 years, 3 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 | « chromeos/network/network_state_unittest.cc ('k') | chromeos/network/network_util_unittest.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 (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 "chromeos/network/network_util.h" 5 #include "chromeos/network/network_util.h"
6 6
7 #include "base/strings/string_tokenizer.h" 7 #include "base/strings/string_tokenizer.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "third_party/cros_system_api/dbus/service_constants.h" 9 #include "third_party/cros_system_api/dbus/service_constants.h"
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 const ListValue& list, std::vector<CellularScanResult>* scan_results) { 97 const ListValue& list, std::vector<CellularScanResult>* scan_results) {
98 scan_results->clear(); 98 scan_results->clear();
99 scan_results->reserve(list.GetSize()); 99 scan_results->reserve(list.GetSize());
100 for (ListValue::const_iterator it = list.begin(); it != list.end(); ++it) { 100 for (ListValue::const_iterator it = list.begin(); it != list.end(); ++it) {
101 if (!(*it)->IsType(base::Value::TYPE_DICTIONARY)) 101 if (!(*it)->IsType(base::Value::TYPE_DICTIONARY))
102 return false; 102 return false;
103 CellularScanResult scan_result; 103 CellularScanResult scan_result;
104 const DictionaryValue* dict = static_cast<const DictionaryValue*>(*it); 104 const DictionaryValue* dict = static_cast<const DictionaryValue*>(*it);
105 // If the network id property is not present then this network cannot be 105 // If the network id property is not present then this network cannot be
106 // connected to so don't include it in the results. 106 // connected to so don't include it in the results.
107 if (!dict->GetStringWithoutPathExpansion(flimflam::kNetworkIdProperty, 107 if (!dict->GetStringWithoutPathExpansion(shill::kNetworkIdProperty,
108 &scan_result.network_id)) 108 &scan_result.network_id))
109 continue; 109 continue;
110 dict->GetStringWithoutPathExpansion(flimflam::kStatusProperty, 110 dict->GetStringWithoutPathExpansion(shill::kStatusProperty,
111 &scan_result.status); 111 &scan_result.status);
112 dict->GetStringWithoutPathExpansion(flimflam::kLongNameProperty, 112 dict->GetStringWithoutPathExpansion(shill::kLongNameProperty,
113 &scan_result.long_name); 113 &scan_result.long_name);
114 dict->GetStringWithoutPathExpansion(flimflam::kShortNameProperty, 114 dict->GetStringWithoutPathExpansion(shill::kShortNameProperty,
115 &scan_result.short_name); 115 &scan_result.short_name);
116 dict->GetStringWithoutPathExpansion(flimflam::kTechnologyProperty, 116 dict->GetStringWithoutPathExpansion(shill::kTechnologyProperty,
117 &scan_result.technology); 117 &scan_result.technology);
118 scan_results->push_back(scan_result); 118 scan_results->push_back(scan_result);
119 } 119 }
120 return true; 120 return true;
121 } 121 }
122 122
123 } // namespace network_util 123 } // namespace network_util
124 } // namespace chromeos 124 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state_unittest.cc ('k') | chromeos/network/network_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698