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

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

Issue 14084008: Boilerplate code to add chrome://syncfs-internals page for debugging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase with similarity=20 Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/sync_file_system_internals_ui.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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/predictors/predictors_ui.h" 5 #include "chrome/browser/ui/webui/sync_file_system_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/predictors/predictors_handler.h"
9 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_ui.h" 9 #include "content/public/browser/web_ui.h"
12 #include "content/public/browser/web_ui_data_source.h" 10 #include "content/public/browser/web_ui_data_source.h"
13 #include "grit/browser_resources.h" 11 #include "grit/sync_file_system_internals_resources.h"
14 12
15 namespace { 13 namespace {
16 14
17 content::WebUIDataSource* CreatePredictorsUIHTMLSource() { 15 content::WebUIDataSource* CreateSyncFileSystemInternalsHTMLSource() {
18 content::WebUIDataSource* source = 16 content::WebUIDataSource* source =
19 content::WebUIDataSource::Create(chrome::kChromeUIPredictorsHost); 17 content::WebUIDataSource::Create(
20 source->AddResourcePath("predictors.js", IDR_PREDICTORS_JS); 18 chrome::kChromeUISyncFileSystemInternalsHost);
21 source->SetDefaultResource(IDR_PREDICTORS_HTML); 19 source->SetDefaultResource(IDR_SYNC_FILE_SYSTEM_INTERNALS_MAIN_HTML);
22 return source; 20 return source;
23 } 21 }
24 22
25 } // namespace 23 } // namespace
26 24
27 PredictorsUI::PredictorsUI(content::WebUI* web_ui) : WebUIController(web_ui) { 25 SyncFileSystemInternalsUI::SyncFileSystemInternalsUI(content::WebUI* web_ui)
26 : WebUIController(web_ui) {
28 Profile* profile = Profile::FromWebUI(web_ui); 27 Profile* profile = Profile::FromWebUI(web_ui);
29 web_ui->AddMessageHandler(new PredictorsHandler(profile)); 28 content::WebUIDataSource::Add(profile,
30 content::WebUIDataSource::Add(profile, CreatePredictorsUIHTMLSource()); 29 CreateSyncFileSystemInternalsHTMLSource());
31 } 30 }
31
32 SyncFileSystemInternalsUI::~SyncFileSystemInternalsUI() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_file_system_internals_ui.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698