Chromium Code Reviews| OLD | NEW | 
|---|---|
| 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 "chrome/browser/ui/webui/policy_ui.h" | 5 #include "chrome/browser/ui/webui/policy_ui.h" | 
| 6 | 6 | 
| 7 #include "base/bind.h" | 7 #include "base/bind.h" | 
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" | 
| 9 #include "base/callback.h" | 9 #include "base/callback.h" | 
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" | 
| 11 #include "base/logging.h" | 11 #include "base/logging.h" | 
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" | 
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" | 
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" | 
| 15 #include "base/time.h" | 15 #include "base/time.h" | 
| 16 #include "base/values.h" | 16 #include "base/values.h" | 
| 17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" | 
| 18 #include "chrome/browser/extensions/extension_service.h" | 18 #include "chrome/browser/extensions/extension_service.h" | 
| 19 #include "chrome/browser/extensions/extension_system.h" | 19 #include "chrome/browser/extensions/extension_system.h" | 
| 20 #include "chrome/browser/policy/browser_policy_connector.h" | 20 #include "chrome/browser/policy/browser_policy_connector.h" | 
| 21 #include "chrome/browser/policy/cloud/cloud_policy_client.h" | 21 #include "chrome/browser/policy/cloud/cloud_policy_client.h" | 
| 22 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | 22 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | 
| 23 #include "chrome/browser/policy/cloud/cloud_policy_core.h" | 23 #include "chrome/browser/policy/cloud/cloud_policy_core.h" | 
| 24 #include "chrome/browser/policy/cloud/cloud_policy_refresh_scheduler.h" | 24 #include "chrome/browser/policy/cloud/cloud_policy_refresh_scheduler.h" | 
| 25 #include "chrome/browser/policy/cloud/cloud_policy_store.h" | 25 #include "chrome/browser/policy/cloud/cloud_policy_store.h" | 
| 26 #include "chrome/browser/policy/cloud/cloud_policy_validator.h" | 26 #include "chrome/browser/policy/cloud/cloud_policy_validator.h" | 
| 27 #include "chrome/browser/policy/cloud/message_util.h" | 27 #include "chrome/browser/policy/cloud/message_util.h" | 
| 28 #include "chrome/browser/policy/configuration_policy_handler_list.h" | 28 #include "chrome/browser/policy/configuration_policy_handler_list.h" | 
| 29 #include "chrome/browser/policy/policy_domain_descriptor.h" | |
| 29 #include "chrome/browser/policy/policy_error_map.h" | 30 #include "chrome/browser/policy/policy_error_map.h" | 
| 30 #include "chrome/browser/policy/policy_map.h" | 31 #include "chrome/browser/policy/policy_map.h" | 
| 32 #include "chrome/browser/policy/policy_schema.h" | |
| 31 #include "chrome/browser/policy/policy_service.h" | 33 #include "chrome/browser/policy/policy_service.h" | 
| 32 #include "chrome/browser/policy/policy_types.h" | 34 #include "chrome/browser/policy/policy_types.h" | 
| 33 #include "chrome/browser/policy/profile_policy_connector.h" | 35 #include "chrome/browser/policy/profile_policy_connector.h" | 
| 34 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 36 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 
| 35 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" | 37 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" | 
| 36 #include "chrome/browser/profiles/profile.h" | 38 #include "chrome/browser/profiles/profile.h" | 
| 37 #include "chrome/common/extensions/extension.h" | 39 #include "chrome/common/extensions/extension.h" | 
| 38 #include "chrome/common/extensions/extension_set.h" | 40 #include "chrome/common/extensions/extension_set.h" | 
| 39 #include "chrome/common/extensions/manifest.h" | 41 #include "chrome/common/extensions/manifest.h" | 
| 40 #include "chrome/common/time_format.h" | 42 #include "chrome/common/time_format.h" | 
| 41 #include "chrome/common/url_constants.h" | 43 #include "chrome/common/url_constants.h" | 
| 44 #include "content/public/browser/notification_observer.h" | |
| 45 #include "content/public/browser/notification_registrar.h" | |
| 42 #include "content/public/browser/web_ui.h" | 46 #include "content/public/browser/web_ui.h" | 
| 43 #include "content/public/browser/web_ui_data_source.h" | 47 #include "content/public/browser/web_ui_data_source.h" | 
| 44 #include "content/public/browser/web_ui_message_handler.h" | 48 #include "content/public/browser/web_ui_message_handler.h" | 
| 45 #include "google_apis/gaia/gaia_auth_util.h" | 49 #include "google_apis/gaia/gaia_auth_util.h" | 
| 46 #include "grit/browser_resources.h" | 50 #include "grit/browser_resources.h" | 
| 47 #include "grit/generated_resources.h" | 51 #include "grit/generated_resources.h" | 
| 48 #include "policy/policy_constants.h" | 52 #include "policy/policy_constants.h" | 
| 49 #include "ui/base/l10n/l10n_util.h" | 53 #include "ui/base/l10n/l10n_util.h" | 
| 50 | 54 | 
| 51 #if defined(OS_CHROMEOS) | 55 #if defined(OS_CHROMEOS) | 
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 256 | 260 | 
| 257 private: | 261 private: | 
| 258 const std::string user_id_; | 262 const std::string user_id_; | 
| 259 policy::DeviceLocalAccountPolicyService* service_; | 263 policy::DeviceLocalAccountPolicyService* service_; | 
| 260 | 264 | 
| 261 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyStatusProvider); | 265 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyStatusProvider); | 
| 262 }; | 266 }; | 
| 263 #endif | 267 #endif | 
| 264 | 268 | 
| 265 // The JavaScript message handler for the chrome://policy page. | 269 // The JavaScript message handler for the chrome://policy page. | 
| 266 class PolicyUIHandler : public content::WebUIMessageHandler, | 270 class PolicyUIHandler : public content::NotificationObserver, | 
| 271 public content::WebUIMessageHandler, | |
| 267 public policy::PolicyService::Observer { | 272 public policy::PolicyService::Observer { | 
| 268 public: | 273 public: | 
| 269 PolicyUIHandler(); | 274 PolicyUIHandler(); | 
| 270 virtual ~PolicyUIHandler(); | 275 virtual ~PolicyUIHandler(); | 
| 271 | 276 | 
| 277 // content::NotificationObserver implementation. | |
| 278 virtual void Observe(int type, | |
| 279 const content::NotificationSource& source, | |
| 280 const content::NotificationDetails& details) OVERRIDE; | |
| 281 | |
| 272 // content::WebUIMessageHandler implementation. | 282 // content::WebUIMessageHandler implementation. | 
| 273 virtual void RegisterMessages() OVERRIDE; | 283 virtual void RegisterMessages() OVERRIDE; | 
| 274 | 284 | 
| 275 // policy::PolicyService::Observer implementation. | 285 // policy::PolicyService::Observer implementation. | 
| 276 virtual void OnPolicyUpdated(const policy::PolicyNamespace& ns, | 286 virtual void OnPolicyUpdated(const policy::PolicyNamespace& ns, | 
| 277 const policy::PolicyMap& previous, | 287 const policy::PolicyMap& previous, | 
| 278 const policy::PolicyMap& current) OVERRIDE; | 288 const policy::PolicyMap& current) OVERRIDE; | 
| 279 | 289 | 
| 280 private: | 290 private: | 
| 281 // Send a dictionary containing the names of all known policies to the UI. | 291 // Send a dictionary containing the names of all known policies to the UI. | 
| (...skipping 27 matching lines...) Expand all Loading... | |
| 309 bool initialized_; | 319 bool initialized_; | 
| 310 std::string device_domain_; | 320 std::string device_domain_; | 
| 311 base::WeakPtrFactory<PolicyUIHandler> weak_factory_; | 321 base::WeakPtrFactory<PolicyUIHandler> weak_factory_; | 
| 312 | 322 | 
| 313 // Providers that supply status dictionaries for user and device policy, | 323 // Providers that supply status dictionaries for user and device policy, | 
| 314 // respectively. These are created on initialization time as appropriate for | 324 // respectively. These are created on initialization time as appropriate for | 
| 315 // the platform (Chrome OS / desktop) and type of policy that is in effect. | 325 // the platform (Chrome OS / desktop) and type of policy that is in effect. | 
| 316 scoped_ptr<CloudPolicyStatusProvider> user_status_provider_; | 326 scoped_ptr<CloudPolicyStatusProvider> user_status_provider_; | 
| 317 scoped_ptr<CloudPolicyStatusProvider> device_status_provider_; | 327 scoped_ptr<CloudPolicyStatusProvider> device_status_provider_; | 
| 318 | 328 | 
| 329 content::NotificationRegistrar registrar_; | |
| 330 | |
| 319 DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler); | 331 DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler); | 
| 320 }; | 332 }; | 
| 321 | 333 | 
| 322 CloudPolicyStatusProvider::CloudPolicyStatusProvider() { | 334 CloudPolicyStatusProvider::CloudPolicyStatusProvider() { | 
| 323 } | 335 } | 
| 324 | 336 | 
| 325 CloudPolicyStatusProvider::~CloudPolicyStatusProvider() { | 337 CloudPolicyStatusProvider::~CloudPolicyStatusProvider() { | 
| 326 } | 338 } | 
| 327 | 339 | 
| 328 void CloudPolicyStatusProvider::SetStatusChangeCallback( | 340 void CloudPolicyStatusProvider::SetStatusChangeCallback( | 
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 481 if (!device_status_provider_.get()) | 493 if (!device_status_provider_.get()) | 
| 482 device_status_provider_.reset(new CloudPolicyStatusProvider()); | 494 device_status_provider_.reset(new CloudPolicyStatusProvider()); | 
| 483 | 495 | 
| 484 base::Closure update_callback(base::Bind(&PolicyUIHandler::SendStatus, | 496 base::Closure update_callback(base::Bind(&PolicyUIHandler::SendStatus, | 
| 485 base::Unretained(this))); | 497 base::Unretained(this))); | 
| 486 user_status_provider_->SetStatusChangeCallback(update_callback); | 498 user_status_provider_->SetStatusChangeCallback(update_callback); | 
| 487 device_status_provider_->SetStatusChangeCallback(update_callback); | 499 device_status_provider_->SetStatusChangeCallback(update_callback); | 
| 488 GetPolicyService()->AddObserver(policy::POLICY_DOMAIN_CHROME, this); | 500 GetPolicyService()->AddObserver(policy::POLICY_DOMAIN_CHROME, this); | 
| 489 GetPolicyService()->AddObserver(policy::POLICY_DOMAIN_EXTENSIONS, this); | 501 GetPolicyService()->AddObserver(policy::POLICY_DOMAIN_EXTENSIONS, this); | 
| 490 | 502 | 
| 503 registrar_.Add(this, | |
| 504 chrome::NOTIFICATION_EXTENSION_LOADED, | |
| 505 content::NotificationService::AllSources()); | |
| 506 registrar_.Add(this, | |
| 507 chrome::NOTIFICATION_EXTENSION_UNLOADED, | |
| 508 content::NotificationService::AllSources()); | |
| 509 | |
| 491 web_ui()->RegisterMessageCallback( | 510 web_ui()->RegisterMessageCallback( | 
| 492 "initialized", | 511 "initialized", | 
| 493 base::Bind(&PolicyUIHandler::HandleInitialized, base::Unretained(this))); | 512 base::Bind(&PolicyUIHandler::HandleInitialized, base::Unretained(this))); | 
| 494 web_ui()->RegisterMessageCallback( | 513 web_ui()->RegisterMessageCallback( | 
| 495 "reloadPolicies", | 514 "reloadPolicies", | 
| 496 base::Bind(&PolicyUIHandler::HandleReloadPolicies, | 515 base::Bind(&PolicyUIHandler::HandleReloadPolicies, | 
| 497 base::Unretained(this))); | 516 base::Unretained(this))); | 
| 498 } | 517 } | 
| 499 | 518 | 
| 519 void PolicyUIHandler::Observe(int type, | |
| 520 const content::NotificationSource& source, | |
| 521 const content::NotificationDetails& details) { | |
| 522 DCHECK(type == chrome::NOTIFICATION_EXTENSION_LOADED || | |
| 523 type == chrome::NOTIFICATION_EXTENSION_UNLOADED); | |
| 524 SendPolicyNames(); | |
| 525 SendPolicyValues(); | |
| 526 } | |
| 527 | |
| 500 void PolicyUIHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, | 528 void PolicyUIHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, | 
| 501 const policy::PolicyMap& previous, | 529 const policy::PolicyMap& previous, | 
| 502 const policy::PolicyMap& current) { | 530 const policy::PolicyMap& current) { | 
| 503 SendPolicyValues(); | 531 SendPolicyValues(); | 
| 504 } | 532 } | 
| 505 | 533 | 
| 506 void PolicyUIHandler::SendPolicyNames() const { | 534 void PolicyUIHandler::SendPolicyNames() const { | 
| 507 base::DictionaryValue names; | 535 base::DictionaryValue names; | 
| 536 | |
| 537 // Add Chrome policy names. | |
| 538 base::DictionaryValue* chrome_policy_names = new base::DictionaryValue; | |
| 508 const policy::PolicyDefinitionList* list = | 539 const policy::PolicyDefinitionList* list = | 
| 509 policy::GetChromePolicyDefinitionList(); | 540 policy::GetChromePolicyDefinitionList(); | 
| 510 for (const policy::PolicyDefinitionList::Entry* entry = list->begin; | 541 for (const policy::PolicyDefinitionList::Entry* entry = list->begin; | 
| 511 entry != list->end; ++entry) { | 542 entry != list->end; ++entry) { | 
| 512 names.SetBoolean(entry->name, true); | 543 chrome_policy_names->SetBoolean(entry->name, true); | 
| 513 } | 544 } | 
| 545 names.Set("chromePolicyNames", chrome_policy_names); | |
| 546 | |
| 547 // Add extension policy names. | |
| 548 base::DictionaryValue* extension_policy_names = new base::DictionaryValue; | |
| 549 | |
| 550 // Get extensions. | |
| 
 
James Hawkins
2013/06/20 18:18:52
High-level: Some of your code comments are borderl
 
anitawoodruff
2013/06/21 10:16:16
I take your point; I initially added these comment
 
James Hawkins
2013/06/21 14:54:25
Up to you.
 
 | |
| 551 extensions::ExtensionSystem* extension_system = | |
| 552 extensions::ExtensionSystem::Get(Profile::FromWebUI(web_ui())); | |
| 553 const ExtensionSet* extensions = | |
| 554 extension_system->extension_service()->extensions(); | |
| 555 | |
| 556 // Get the policy schema map. | |
| 
 
James Hawkins
2013/06/20 18:18:52
Superfluous.
 
anitawoodruff
2013/06/21 10:16:16
Done.
 
 | |
| 557 scoped_refptr<const policy::PolicyDomainDescriptor> policy_domain_descriptor; | |
| 558 policy_domain_descriptor = GetPolicyService()-> | |
| 559 GetPolicyDomainDescriptor(policy::POLICY_DOMAIN_EXTENSIONS); | |
| 560 const policy::PolicyDomainDescriptor::SchemaMap& schema_map = | |
| 561 policy_domain_descriptor->components(); | |
| 562 | |
| 563 // Add extension names and policies to the map. | |
| 
 
James Hawkins
2013/06/20 18:18:52
Superfluous.
 
anitawoodruff
2013/06/21 10:16:16
Done.
 
 | |
| 564 for (ExtensionSet::const_iterator it = extensions->begin(); | |
| 565 it != extensions->end(); ++it) { | |
| 566 const extensions::Extension* extension = *it; | |
| 567 | |
| 568 // Skip this extension if it's a component extension. | |
| 
 
James Hawkins
2013/06/20 18:18:52
Superfluous.
 
anitawoodruff
2013/06/21 10:16:16
Done.
 
 | |
| 569 if (extension->location() == extensions::Manifest::COMPONENT) | |
| 570 continue; | |
| 571 | |
| 572 // Add extension name to map. | |
| 
 
James Hawkins
2013/06/20 18:18:52
Superfluous.
 
anitawoodruff
2013/06/21 10:16:16
Done.
 
 | |
| 573 base::DictionaryValue* extension_value = new base::DictionaryValue; | |
| 574 extension_value->SetString("name", extension->name()); | |
| 575 | |
| 576 // Get extension's policy schema. | |
| 
 
James Hawkins
2013/06/20 18:18:52
Superfluous.
 
anitawoodruff
2013/06/21 10:16:16
Done.
 
 | |
| 577 policy::PolicyDomainDescriptor::SchemaMap::const_iterator it = | |
| 578 schema_map.find(extension->id()); | |
| 579 base::DictionaryValue* policy_names = new base::DictionaryValue; | |
| 580 if (it != schema_map.end()) { | |
| 581 // Get policy names from the extension's policy schema. | |
| 582 // Store in a map, not an array, for faster lookup on JS side. | |
| 583 const policy::PolicySchemaMap* policies = it->second->GetProperties(); | |
| 584 policy::PolicySchemaMap::const_iterator it_policies; | |
| 585 for (it_policies = policies->begin(); it_policies != policies->end(); | |
| 586 it_policies++) { | |
| 587 policy_names->SetBoolean(it_policies->first, true); | |
| 588 } | |
| 589 } | |
| 590 extension_value->Set("policyNames", policy_names); | |
| 591 | |
| 592 // Add extension's entry to the map. | |
| 
 
James Hawkins
2013/06/20 18:18:52
Superfluous.
 
anitawoodruff
2013/06/21 10:16:16
Done.
 
 | |
| 593 extension_policy_names->Set(extension->id(), extension_value); | |
| 594 } | |
| 595 | |
| 596 names.Set("extensionPolicyNames", extension_policy_names); | |
| 514 web_ui()->CallJavascriptFunction("policy.Page.setPolicyNames", names); | 597 web_ui()->CallJavascriptFunction("policy.Page.setPolicyNames", names); | 
| 515 } | 598 } | 
| 516 | 599 | 
| 517 void PolicyUIHandler::SendPolicyValues() const { | 600 void PolicyUIHandler::SendPolicyValues() const { | 
| 518 base::DictionaryValue all_policies; | 601 base::DictionaryValue all_policies; | 
| 519 | 602 | 
| 520 // Add chrome policies. | 603 // Add chrome policies. | 
| 521 base::DictionaryValue* chrome_policies = new base::DictionaryValue; | 604 base::DictionaryValue* chrome_policies = new base::DictionaryValue; | 
| 522 GetChromePolicyValues(chrome_policies); | 605 GetChromePolicyValues(chrome_policies); | 
| 523 all_policies.Set("chromePolicies", chrome_policies); | 606 all_policies.Set("chromePolicies", chrome_policies); | 
| 524 | 607 | 
| 525 // Get extensions. | 608 // Get extensions. | 
| 526 extensions::ExtensionSystem* extension_system = | 609 extensions::ExtensionSystem* extension_system = | 
| 527 extensions::ExtensionSystem::Get(Profile::FromWebUI(web_ui())); | 610 extensions::ExtensionSystem::Get(Profile::FromWebUI(web_ui())); | 
| 528 const ExtensionSet* extensions = | 611 const ExtensionSet* extensions = | 
| 529 extension_system->extension_service()->extensions(); | 612 extension_system->extension_service()->extensions(); | 
| 530 | 613 | 
| 531 // Add policies for each extension. | 614 // Add policies for each extension. | 
| 532 base::DictionaryValue* extension_values = new base::DictionaryValue; | 615 base::DictionaryValue* extension_values = new base::DictionaryValue; | 
| 533 for (ExtensionSet::const_iterator it = extensions->begin(); | 616 for (ExtensionSet::const_iterator it = extensions->begin(); | 
| 534 it != extensions->end(); ++it) { | 617 it != extensions->end(); ++it) { | 
| 535 const extensions::Extension* extension = *it; | 618 const extensions::Extension* extension = *it; | 
| 536 | 619 | 
| 537 // Skip this extension if it's a component extension. | 620 // Skip this extension if it's a component extension. | 
| 538 if (extension->location() == extensions::Manifest::COMPONENT) | 621 if (extension->location() == extensions::Manifest::COMPONENT) | 
| 539 continue; | 622 continue; | 
| 540 | 623 | 
| 541 base::DictionaryValue* extension_value = new base::DictionaryValue; | 624 // Add policies values. | 
| 542 | 625 // Store in a map, not an array, for faster lookup on JS side. | 
| 543 // Add name. | |
| 544 extension_value->SetString("name", extension->name()); | |
| 545 | |
| 546 // Add policies. | |
| 547 base::DictionaryValue* extension_policies = new base::DictionaryValue; | 626 base::DictionaryValue* extension_policies = new base::DictionaryValue; | 
| 548 policy::PolicyNamespace policy_namespace = policy::PolicyNamespace( | 627 policy::PolicyNamespace policy_namespace = policy::PolicyNamespace( | 
| 549 policy::POLICY_DOMAIN_EXTENSIONS, extension->id()); | 628 policy::POLICY_DOMAIN_EXTENSIONS, extension->id()); | 
| 550 policy::PolicyErrorMap empty_error_map; | 629 policy::PolicyErrorMap empty_error_map; | 
| 551 GetPolicyValues(GetPolicyService()->GetPolicies(policy_namespace), | 630 GetPolicyValues(GetPolicyService()->GetPolicies(policy_namespace), | 
| 552 &empty_error_map, extension_policies); | 631 &empty_error_map, extension_policies); | 
| 553 extension_value->Set("policies", extension_policies); | |
| 554 | 632 | 
| 555 // Add entry to the dictionary. | 633 // Add entry to the dictionary. | 
| 556 extension_values->Set(extension->id(), extension_value); | 634 extension_values->Set(extension->id(), extension_policies); | 
| 557 } | 635 } | 
| 558 all_policies.Set("extensionPolicies", extension_values); | 636 all_policies.Set("extensionPolicies", extension_values); | 
| 559 | 637 | 
| 560 web_ui()->CallJavascriptFunction("policy.Page.setPolicyValues", all_policies); | 638 web_ui()->CallJavascriptFunction("policy.Page.setPolicyValues", all_policies); | 
| 561 } | 639 } | 
| 562 | 640 | 
| 563 void PolicyUIHandler::GetPolicyValues(const policy::PolicyMap& map, | 641 void PolicyUIHandler::GetPolicyValues(const policy::PolicyMap& map, | 
| 564 policy::PolicyErrorMap* errors, | 642 policy::PolicyErrorMap* errors, | 
| 565 base::DictionaryValue* values) const { | 643 base::DictionaryValue* values) const { | 
| 566 for (policy::PolicyMap::const_iterator entry = map.begin(); | 644 for (policy::PolicyMap::const_iterator entry = map.begin(); | 
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 647 } | 725 } | 
| 648 | 726 | 
| 649 PolicyUI::PolicyUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 727 PolicyUI::PolicyUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 
| 650 web_ui->AddMessageHandler(new PolicyUIHandler); | 728 web_ui->AddMessageHandler(new PolicyUIHandler); | 
| 651 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), | 729 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), | 
| 652 CreatePolicyUIHTMLSource()); | 730 CreatePolicyUIHTMLSource()); | 
| 653 } | 731 } | 
| 654 | 732 | 
| 655 PolicyUI::~PolicyUI() { | 733 PolicyUI::~PolicyUI() { | 
| 656 } | 734 } | 
| OLD | NEW |