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

Side by Side Diff: chrome/browser/ui/webui/policy_ui.cc

Issue 10196004: Changed ChromeURLDataManager to a ProfileKeyedService and made a Factory for it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Made ChromeURLDataManager's destructor virtual Created 8 years, 8 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
OLDNEW
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/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_url_data_manager.h"
17 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" 18 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
18 #include "chrome/common/pref_names.h" 19 #include "chrome/common/pref_names.h"
19 #include "chrome/common/time_format.h" 20 #include "chrome/common/time_format.h"
20 #include "chrome/common/url_constants.h" 21 #include "chrome/common/url_constants.h"
21 #include "content/public/browser/web_contents.h" 22 #include "content/public/browser/web_contents.h"
22 #include "content/public/browser/web_ui.h" 23 #include "content/public/browser/web_ui.h"
23 #include "grit/browser_resources.h" 24 #include "grit/browser_resources.h"
24 #include "grit/generated_resources.h" 25 #include "grit/generated_resources.h"
25 #include "ui/base/l10n/l10n_util.h" 26 #include "ui/base/l10n/l10n_util.h"
26 27
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // 233 //
233 // PolicyUI 234 // PolicyUI
234 // 235 //
235 //////////////////////////////////////////////////////////////////////////////// 236 ////////////////////////////////////////////////////////////////////////////////
236 237
237 PolicyUI::PolicyUI(content::WebUI* web_ui) : WebUIController(web_ui) { 238 PolicyUI::PolicyUI(content::WebUI* web_ui) : WebUIController(web_ui) {
238 web_ui->AddMessageHandler(new PolicyUIHandler); 239 web_ui->AddMessageHandler(new PolicyUIHandler);
239 240
240 // Set up the chrome://policy/ source. 241 // Set up the chrome://policy/ source.
241 Profile* profile = Profile::FromWebUI(web_ui); 242 Profile* profile = Profile::FromWebUI(web_ui);
242 profile->GetChromeURLDataManager()->AddDataSource(CreatePolicyUIHTMLSource()); 243 ChromeURLDataManager::AddDataSource(profile, CreatePolicyUIHTMLSource());
243 } 244 }
244 245
245 PolicyUI::~PolicyUI() { 246 PolicyUI::~PolicyUI() {
246 } 247 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/plugins_ui.cc ('k') | chrome/browser/ui/webui/print_preview/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698