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

Side by Side Diff: chromeos/network/policy_applicator.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
« no previous file with comments | « chromeos/network/network_state_handler.cc ('k') | chromeos/network/shill_property_handler.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/policy_applicator.h" 5 #include "chromeos/network/policy_applicator.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 : handler_(handler), profile_(profile), weak_ptr_factory_(this) { 53 : handler_(handler), profile_(profile), weak_ptr_factory_(this) {
54 global_network_config_.MergeDictionary(&global_network_config); 54 global_network_config_.MergeDictionary(&global_network_config);
55 remaining_policies_.swap(*modified_policies); 55 remaining_policies_.swap(*modified_policies);
56 for (GuidToPolicyMap::const_iterator it = all_policies.begin(); 56 for (GuidToPolicyMap::const_iterator it = all_policies.begin();
57 it != all_policies.end(); ++it) { 57 it != all_policies.end(); ++it) {
58 all_policies_.insert(std::make_pair(it->first, it->second->DeepCopy())); 58 all_policies_.insert(std::make_pair(it->first, it->second->DeepCopy()));
59 } 59 }
60 } 60 }
61 61
62 PolicyApplicator::~PolicyApplicator() { 62 PolicyApplicator::~PolicyApplicator() {
63 STLDeleteValues(&all_policies_); 63 base::STLDeleteValues(&all_policies_);
64 VLOG(1) << "Destroying PolicyApplicator for " << profile_.userhash; 64 VLOG(1) << "Destroying PolicyApplicator for " << profile_.userhash;
65 } 65 }
66 66
67 void PolicyApplicator::Run() { 67 void PolicyApplicator::Run() {
68 DBusThreadManager::Get()->GetShillProfileClient()->GetProperties( 68 DBusThreadManager::Get()->GetShillProfileClient()->GetProperties(
69 dbus::ObjectPath(profile_.path), 69 dbus::ObjectPath(profile_.path),
70 base::Bind(&PolicyApplicator::GetProfilePropertiesCallback, 70 base::Bind(&PolicyApplicator::GetProfilePropertiesCallback,
71 weak_ptr_factory_.GetWeakPtr()), 71 weak_ptr_factory_.GetWeakPtr()),
72 base::Bind(&PolicyApplicator::GetProfilePropertiesError, 72 base::Bind(&PolicyApplicator::GetProfilePropertiesError,
73 weak_ptr_factory_.GetWeakPtr())); 73 weak_ptr_factory_.GetWeakPtr()));
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 } 335 }
336 remaining_policies_.clear(); 336 remaining_policies_.clear();
337 } 337 }
338 338
339 void PolicyApplicator::NotifyConfigurationHandlerAndFinish() { 339 void PolicyApplicator::NotifyConfigurationHandlerAndFinish() {
340 weak_ptr_factory_.InvalidateWeakPtrs(); 340 weak_ptr_factory_.InvalidateWeakPtrs();
341 handler_->OnPoliciesApplied(profile_); 341 handler_->OnPoliciesApplied(profile_);
342 } 342 }
343 343
344 } // namespace chromeos 344 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state_handler.cc ('k') | chromeos/network/shill_property_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698