| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 policy::CloudPolicySubsystem* policy_subsystem, | 194 policy::CloudPolicySubsystem* policy_subsystem, |
| 195 policy::CloudPolicyCacheBase::PolicyLevel policy_level) { | 195 policy::CloudPolicyCacheBase::PolicyLevel policy_level) { |
| 196 DictionaryValue* dict = new DictionaryValue; | 196 DictionaryValue* dict = new DictionaryValue; |
| 197 policy::CloudPolicyCacheBase* policy_cache = | 197 policy::CloudPolicyCacheBase* policy_cache = |
| 198 policy_subsystem->GetCloudPolicyCacheBase(); | 198 policy_subsystem->GetCloudPolicyCacheBase(); |
| 199 if (policy_cache) { | 199 if (policy_cache) { |
| 200 const policy::PolicyMap* policy_map = policy_cache->policy(policy_level); | 200 const policy::PolicyMap* policy_map = policy_cache->policy(policy_level); |
| 201 if (policy_map) { | 201 if (policy_map) { |
| 202 policy::PolicyMap::const_iterator i; | 202 policy::PolicyMap::const_iterator i; |
| 203 for (i = policy_map->begin(); i != policy_map->end(); i++) | 203 for (i = policy_map->begin(); i != policy_map->end(); i++) |
| 204 dict->Set(policy::key::kMapPolicyString[i->first], | 204 dict->Set(policy::GetPolicyName(i->first), |
| 205 i->second->DeepCopy()); | 205 i->second->DeepCopy()); |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 return dict; | 208 return dict; |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace | 211 } // namespace |
| 212 | 212 |
| 213 void TestingAutomationProvider::GetLoginInfo(DictionaryValue* args, | 213 void TestingAutomationProvider::GetLoginInfo(DictionaryValue* args, |
| 214 IPC::Message* reply_message) { | 214 IPC::Message* reply_message) { |
| (...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 | 1194 |
| 1195 // Set up an observer (it will delete itself). | 1195 // Set up an observer (it will delete itself). |
| 1196 take_photo_dialog->AddObserver(new PhotoCaptureObserver( | 1196 take_photo_dialog->AddObserver(new PhotoCaptureObserver( |
| 1197 this, reply_message)); | 1197 this, reply_message)); |
| 1198 | 1198 |
| 1199 views::Widget* window = browser::CreateViewsWindow( | 1199 views::Widget* window = browser::CreateViewsWindow( |
| 1200 browser->window()->GetNativeHandle(), take_photo_dialog); | 1200 browser->window()->GetNativeHandle(), take_photo_dialog); |
| 1201 window->SetAlwaysOnTop(true); | 1201 window->SetAlwaysOnTop(true); |
| 1202 window->Show(); | 1202 window->Show(); |
| 1203 } | 1203 } |
| OLD | NEW |