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/sync_internals_ui.h" | 5 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/webui/sync_internals_message_handler.h" | 8 #include "chrome/browser/ui/webui/sync_internals_message_handler.h" |
9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
10 #include "components/sync_driver/about_sync_util.h" | 10 #include "components/sync/driver/about_sync_util.h" |
11 #include "content/public/browser/web_ui.h" | 11 #include "content/public/browser/web_ui.h" |
12 #include "content/public/browser/web_ui_data_source.h" | 12 #include "content/public/browser/web_ui_data_source.h" |
13 #include "grit/components_resources.h" | 13 #include "grit/components_resources.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 content::WebUIDataSource* CreateSyncInternalsHTMLSource() { | 17 content::WebUIDataSource* CreateSyncInternalsHTMLSource() { |
18 content::WebUIDataSource* source = | 18 content::WebUIDataSource* source = |
19 content::WebUIDataSource::Create(chrome::kChromeUISyncInternalsHost); | 19 content::WebUIDataSource::Create(chrome::kChromeUISyncInternalsHost); |
20 | 20 |
(...skipping 27 matching lines...) Expand all Loading... |
48 SyncInternalsUI::SyncInternalsUI(content::WebUI* web_ui) | 48 SyncInternalsUI::SyncInternalsUI(content::WebUI* web_ui) |
49 : WebUIController(web_ui) { | 49 : WebUIController(web_ui) { |
50 Profile* profile = Profile::FromWebUI(web_ui); | 50 Profile* profile = Profile::FromWebUI(web_ui); |
51 content::WebUIDataSource::Add(profile, CreateSyncInternalsHTMLSource()); | 51 content::WebUIDataSource::Add(profile, CreateSyncInternalsHTMLSource()); |
52 | 52 |
53 web_ui->AddMessageHandler(new SyncInternalsMessageHandler); | 53 web_ui->AddMessageHandler(new SyncInternalsMessageHandler); |
54 } | 54 } |
55 | 55 |
56 SyncInternalsUI::~SyncInternalsUI() {} | 56 SyncInternalsUI::~SyncInternalsUI() {} |
57 | 57 |
OLD | NEW |