| 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/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/time.h" | 9 #include "base/time.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/policy/browser_policy_connector.h" | 12 #include "chrome/browser/policy/browser_policy_connector.h" |
| 13 #include "chrome/browser/policy/cloud_policy_cache_base.h" | 13 #include "chrome/browser/policy/cloud_policy_cache_base.h" |
| 14 #include "chrome/browser/policy/cloud_policy_data_store.h" | 14 #include "chrome/browser/policy/cloud_policy_data_store.h" |
| 15 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" | 17 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" |
| 18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 19 #include "chrome/common/time_format.h" | 19 #include "chrome/common/time_format.h" |
| 20 #include "chrome/common/url_constants.h" | 20 #include "chrome/common/url_constants.h" |
| 21 #include "content/browser/webui/web_ui.h" |
| 21 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
| 22 #include "grit/browser_resources.h" | 23 #include "grit/browser_resources.h" |
| 23 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
| 24 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
| 25 | 26 |
| 26 #if defined(OS_CHROMEOS) | 27 #if defined(OS_CHROMEOS) |
| 27 #include "chrome/browser/chromeos/login/user_manager.h" | 28 #include "chrome/browser/chromeos/login/user_manager.h" |
| 28 #endif | 29 #endif |
| 29 | 30 |
| 30 using content::WebContents; | 31 using content::WebContents; |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 PolicyUI::PolicyUI(WebContents* contents) : ChromeWebUI(contents) { | 236 PolicyUI::PolicyUI(WebContents* contents) : ChromeWebUI(contents) { |
| 236 AddMessageHandler(new PolicyUIHandler); | 237 AddMessageHandler(new PolicyUIHandler); |
| 237 | 238 |
| 238 // Set up the chrome://policy/ source. | 239 // Set up the chrome://policy/ source. |
| 239 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); | 240 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); |
| 240 profile->GetChromeURLDataManager()->AddDataSource(CreatePolicyUIHTMLSource()); | 241 profile->GetChromeURLDataManager()->AddDataSource(CreatePolicyUIHTMLSource()); |
| 241 } | 242 } |
| 242 | 243 |
| 243 PolicyUI::~PolicyUI() { | 244 PolicyUI::~PolicyUI() { |
| 244 } | 245 } |
| OLD | NEW |