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

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

Issue 2229383003: chromeos: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
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_configuration_handler.h" 5 #include "chromeos/network/network_configuration_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 "Config.CreateConfiguration Failed", "", error_callback)); 328 "Config.CreateConfiguration Failed", "", error_callback));
329 } 329 }
330 330
331 void NetworkConfigurationHandler::RemoveConfiguration( 331 void NetworkConfigurationHandler::RemoveConfiguration(
332 const std::string& service_path, 332 const std::string& service_path,
333 NetworkConfigurationObserver::Source source, 333 NetworkConfigurationObserver::Source source,
334 const base::Closure& callback, 334 const base::Closure& callback,
335 const network_handler::ErrorCallback& error_callback) { 335 const network_handler::ErrorCallback& error_callback) {
336 // Service.Remove is not reliable. Instead, request the profile entries 336 // Service.Remove is not reliable. Instead, request the profile entries
337 // for the service and remove each entry. 337 // for the service and remove each entry.
338 if (ContainsKey(profile_entry_deleters_, service_path)) { 338 if (base::ContainsKey(profile_entry_deleters_, service_path)) {
339 InvokeErrorCallback(service_path, error_callback, 339 InvokeErrorCallback(service_path, error_callback,
340 "RemoveConfigurationInProgress"); 340 "RemoveConfigurationInProgress");
341 return; 341 return;
342 } 342 }
343 343
344 std::string guid; 344 std::string guid;
345 const NetworkState* network_state = 345 const NetworkState* network_state =
346 network_state_handler_->GetNetworkState(service_path); 346 network_state_handler_->GetNetworkState(service_path);
347 if (network_state) 347 if (network_state)
348 guid = network_state->guid(); 348 guid = network_state->guid();
(...skipping 22 matching lines...) Expand all
371 error_callback)); 371 error_callback));
372 } 372 }
373 373
374 // NetworkConfigurationHandler Private methods 374 // NetworkConfigurationHandler Private methods
375 375
376 NetworkConfigurationHandler::NetworkConfigurationHandler() 376 NetworkConfigurationHandler::NetworkConfigurationHandler()
377 : network_state_handler_(NULL) { 377 : network_state_handler_(NULL) {
378 } 378 }
379 379
380 NetworkConfigurationHandler::~NetworkConfigurationHandler() { 380 NetworkConfigurationHandler::~NetworkConfigurationHandler() {
381 STLDeleteContainerPairSecondPointers(profile_entry_deleters_.begin(), 381 base::STLDeleteContainerPairSecondPointers(profile_entry_deleters_.begin(),
382 profile_entry_deleters_.end()); 382 profile_entry_deleters_.end());
383 } 383 }
384 384
385 void NetworkConfigurationHandler::Init( 385 void NetworkConfigurationHandler::Init(
386 NetworkStateHandler* network_state_handler, 386 NetworkStateHandler* network_state_handler,
387 NetworkDeviceHandler* network_device_handler) { 387 NetworkDeviceHandler* network_device_handler) {
388 network_state_handler_ = network_state_handler; 388 network_state_handler_ = network_state_handler;
389 network_device_handler_ = network_device_handler; 389 network_device_handler_ = network_device_handler;
390 } 390 }
391 391
392 void NetworkConfigurationHandler::RunCreateNetworkCallback( 392 void NetworkConfigurationHandler::RunCreateNetworkCallback(
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 // static 562 // static
563 NetworkConfigurationHandler* NetworkConfigurationHandler::InitializeForTest( 563 NetworkConfigurationHandler* NetworkConfigurationHandler::InitializeForTest(
564 NetworkStateHandler* network_state_handler, 564 NetworkStateHandler* network_state_handler,
565 NetworkDeviceHandler* network_device_handler) { 565 NetworkDeviceHandler* network_device_handler) {
566 NetworkConfigurationHandler* handler = new NetworkConfigurationHandler(); 566 NetworkConfigurationHandler* handler = new NetworkConfigurationHandler();
567 handler->Init(network_state_handler, network_device_handler); 567 handler->Init(network_state_handler, network_device_handler);
568 return handler; 568 return handler;
569 } 569 }
570 570
571 } // namespace chromeos 571 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698