Chromium Code Reviews| Index: chrome/browser/ui/webui/sync_file_system_internals_ui.cc |
| diff --git a/chrome/browser/ui/webui/sync_file_system_internals_ui.cc b/chrome/browser/ui/webui/sync_file_system_internals_ui.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e73525b1367795612ba0f906ce9b7e38ba2e2919 |
| --- /dev/null |
| +++ b/chrome/browser/ui/webui/sync_file_system_internals_ui.cc |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/ui/webui/sync_file_system_internals_ui.h" |
| + |
| +#include <string> |
|
Lei Zhang
2013/04/23 18:26:48
not used
calvinlo
2013/04/24 07:53:23
Done.
|
| + |
| +#include "chrome/browser/profiles/profile.h" |
| +#include "chrome/common/url_constants.h" |
| +#include "content/public/browser/web_contents.h" |
|
Lei Zhang
2013/04/23 18:26:48
not used
calvinlo
2013/04/24 07:53:23
Done.
|
| +#include "content/public/browser/web_ui.h" |
| +#include "content/public/browser/web_ui_data_source.h" |
| +#include "grit/sync_file_system_internals_resources.h" |
| +#include "ui/base/l10n/l10n_util.h" |
|
Lei Zhang
2013/04/23 18:26:48
not used
calvinlo
2013/04/24 07:53:23
Done.
|
| +#include "ui/base/resource/resource_bundle.h" |
|
Lei Zhang
2013/04/23 18:26:48
not used
calvinlo
2013/04/24 07:53:23
Done.
|
| + |
| +using content::WebContents; |
|
Lei Zhang
2013/04/23 18:26:48
not used
calvinlo
2013/04/24 07:53:23
Done.
|
| + |
| +namespace { |
| + |
| +content::WebUIDataSource* CreateSyncFileSystemInternalsHTMLSource() { |
| + content::WebUIDataSource* source = |
| + content::WebUIDataSource::Create( |
| + chrome::kChromeUISyncFileSystemInternalsHost); |
| + source->SetDefaultResource(IDR_SYNC_FILE_SYSTEM_INTERNALS_MAIN_HTML); |
| + return source; |
| +} |
| + |
| +} // namespace |
| + |
| +SyncFileSystemInternalsUI::SyncFileSystemInternalsUI(content::WebUI* web_ui) |
| + : WebUIController(web_ui) { |
| + Profile* profile = Profile::FromWebUI(web_ui); |
| + content::WebUIDataSource::Add(profile, |
| + CreateSyncFileSystemInternalsHTMLSource()); |
| +} |