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

Side by Side Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

Issue 9111022: Removed ConfigurationPolicyType and extended PolicyMap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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) 2011 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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 policy::CloudPolicySubsystem* policy_subsystem, 188 policy::CloudPolicySubsystem* policy_subsystem,
189 policy::CloudPolicyCacheBase::PolicyLevel policy_level) { 189 policy::CloudPolicyCacheBase::PolicyLevel policy_level) {
190 DictionaryValue* dict = new DictionaryValue; 190 DictionaryValue* dict = new DictionaryValue;
191 policy::CloudPolicyCacheBase* policy_cache = 191 policy::CloudPolicyCacheBase* policy_cache =
192 policy_subsystem->GetCloudPolicyCacheBase(); 192 policy_subsystem->GetCloudPolicyCacheBase();
193 if (policy_cache) { 193 if (policy_cache) {
194 const policy::PolicyMap* policy_map = policy_cache->policy(policy_level); 194 const policy::PolicyMap* policy_map = policy_cache->policy(policy_level);
195 if (policy_map) { 195 if (policy_map) {
196 policy::PolicyMap::const_iterator i; 196 policy::PolicyMap::const_iterator i;
197 for (i = policy_map->begin(); i != policy_map->end(); i++) 197 for (i = policy_map->begin(); i != policy_map->end(); i++)
198 dict->Set(policy::GetPolicyName(i->first), 198 dict->Set(i->first), i->second->value->DeepCopy());
Mattias Nissler (ping if slow) 2012/01/16 18:23:33 I think this won't compile.
Joao da Silva 2012/01/17 13:09:29 Done.
199 i->second->DeepCopy());
200 } 199 }
201 } 200 }
202 return dict; 201 return dict;
203 } 202 }
204 203
205 // Last reported power status. 204 // Last reported power status.
206 chromeos::PowerSupplyStatus global_power_status; 205 chromeos::PowerSupplyStatus global_power_status;
207 206
208 } // namespace 207 } // namespace
209 208
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 1139 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
1141 AddObserver(power_manager_observer_); 1140 AddObserver(power_manager_observer_);
1142 } 1141 }
1143 1142
1144 void TestingAutomationProvider::RemoveChromeosObservers() { 1143 void TestingAutomationProvider::RemoveChromeosObservers() {
1145 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 1144 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
1146 RemoveObserver(power_manager_observer_); 1145 RemoveObserver(power_manager_observer_);
1147 delete power_manager_observer_; 1146 delete power_manager_observer_;
1148 power_manager_observer_ = NULL; 1147 power_manager_observer_ = NULL;
1149 } 1148 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698