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

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

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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 "chromeos/network/shill_property_handler.h" 5 #include "chromeos/network/shill_property_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 delete iter->second; 313 delete iter->second;
314 } 314 }
315 observer_map.swap(new_observed); 315 observer_map.swap(new_observed);
316 } 316 }
317 317
318 void ShillPropertyHandler::UpdateAvailableTechnologies( 318 void ShillPropertyHandler::UpdateAvailableTechnologies(
319 const base::ListValue& technologies) { 319 const base::ListValue& technologies) {
320 available_technologies_.clear(); 320 available_technologies_.clear();
321 network_event_log::AddEntry( 321 network_event_log::AddEntry(
322 kLogModule, "AvailableTechnologiesChanged", 322 kLogModule, "AvailableTechnologiesChanged",
323 StringPrintf("Size: %"PRIuS, technologies.GetSize())); 323 base::StringPrintf("Size: %"PRIuS, technologies.GetSize()));
324 for (base::ListValue::const_iterator iter = technologies.begin(); 324 for (base::ListValue::const_iterator iter = technologies.begin();
325 iter != technologies.end(); ++iter) { 325 iter != technologies.end(); ++iter) {
326 std::string technology; 326 std::string technology;
327 (*iter)->GetAsString(&technology); 327 (*iter)->GetAsString(&technology);
328 DCHECK(!technology.empty()); 328 DCHECK(!technology.empty());
329 available_technologies_.insert(technology); 329 available_technologies_.insert(technology);
330 } 330 }
331 } 331 }
332 332
333 void ShillPropertyHandler::UpdateEnabledTechnologies( 333 void ShillPropertyHandler::UpdateEnabledTechnologies(
334 const base::ListValue& technologies) { 334 const base::ListValue& technologies) {
335 enabled_technologies_.clear(); 335 enabled_technologies_.clear();
336 network_event_log::AddEntry( 336 network_event_log::AddEntry(
337 kLogModule, "EnabledTechnologiesChanged", 337 kLogModule, "EnabledTechnologiesChanged",
338 StringPrintf("Size: %"PRIuS, technologies.GetSize())); 338 base::StringPrintf("Size: %"PRIuS, technologies.GetSize()));
339 for (base::ListValue::const_iterator iter = technologies.begin(); 339 for (base::ListValue::const_iterator iter = technologies.begin();
340 iter != technologies.end(); ++iter) { 340 iter != technologies.end(); ++iter) {
341 std::string technology; 341 std::string technology;
342 (*iter)->GetAsString(&technology); 342 (*iter)->GetAsString(&technology);
343 DCHECK(!technology.empty()); 343 DCHECK(!technology.empty());
344 enabled_technologies_.insert(technology); 344 enabled_technologies_.insert(technology);
345 } 345 }
346 } 346 }
347 347
348 void ShillPropertyHandler::UpdateUninitializedTechnologies( 348 void ShillPropertyHandler::UpdateUninitializedTechnologies(
349 const base::ListValue& technologies) { 349 const base::ListValue& technologies) {
350 uninitialized_technologies_.clear(); 350 uninitialized_technologies_.clear();
351 network_event_log::AddEntry( 351 network_event_log::AddEntry(
352 kLogModule, "UninitializedTechnologiesChanged", 352 kLogModule, "UninitializedTechnologiesChanged",
353 StringPrintf("Size: %"PRIuS, technologies.GetSize())); 353 base::StringPrintf("Size: %"PRIuS, technologies.GetSize()));
354 for (base::ListValue::const_iterator iter = technologies.begin(); 354 for (base::ListValue::const_iterator iter = technologies.begin();
355 iter != technologies.end(); ++iter) { 355 iter != technologies.end(); ++iter) {
356 std::string technology; 356 std::string technology;
357 (*iter)->GetAsString(&technology); 357 (*iter)->GetAsString(&technology);
358 DCHECK(!technology.empty()); 358 DCHECK(!technology.empty());
359 uninitialized_technologies_.insert(technology); 359 uninitialized_technologies_.insert(technology);
360 } 360 }
361 } 361 }
362 362
363 void ShillPropertyHandler::GetPropertiesCallback( 363 void ShillPropertyHandler::GetPropertiesCallback(
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 429
430 void ShillPropertyHandler::NetworkDevicePropertyChangedCallback( 430 void ShillPropertyHandler::NetworkDevicePropertyChangedCallback(
431 const std::string& path, 431 const std::string& path,
432 const std::string& key, 432 const std::string& key,
433 const base::Value& value) { 433 const base::Value& value) {
434 listener_->UpdateDeviceProperty(path, key, value); 434 listener_->UpdateDeviceProperty(path, key, value);
435 } 435 }
436 436
437 } // namespace internal 437 } // namespace internal
438 } // namespace chromeos 438 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698