OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/webui/sync_file_system_internals_ui.h" |
| 6 |
| 7 #include <string> |
| 8 |
| 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/common/url_constants.h" |
| 11 #include "content/public/browser/web_contents.h" |
| 12 #include "content/public/browser/web_ui.h" |
| 13 #include "content/public/browser/web_ui_data_source.h" |
| 14 #include "grit/sync_file_system_internals_resources.h" |
| 15 #include "ui/base/l10n/l10n_util.h" |
| 16 #include "ui/base/resource/resource_bundle.h" |
| 17 |
| 18 using content::WebContents; |
| 19 |
| 20 namespace { |
| 21 |
| 22 content::WebUIDataSource* CreateSyncFileSystemInternalsHTMLSource() { |
| 23 content::WebUIDataSource* source = |
| 24 content::WebUIDataSource::Create( |
| 25 chrome::kChromeUISyncFileSystemInternalsHost); |
| 26 source->SetDefaultResource(IDR_SYNC_FILE_SYSTEM_INTERNALS_MAIN_HTML); |
| 27 return source; |
| 28 } |
| 29 |
| 30 } // namespace |
| 31 |
| 32 SyncFileSystemInternalsUI::SyncFileSystemInternalsUI(content::WebUI* web_ui) |
| 33 : WebUIController(web_ui) { |
| 34 Profile* profile = Profile::FromWebUI(web_ui); |
| 35 content::WebUIDataSource::Add(profile, |
| 36 CreateSyncFileSystemInternalsHTMLSource()); |
| 37 } |
OLD | NEW |