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

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

Issue 2349623003: Add a Browser Task Scheduler Chrome Internals Page (Closed)
Patch Set: Created 4 years, 3 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
(Empty)
1 // Copyright 2016 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/task_scheduler_internals_ui.h"
6
7 #include "base/task_scheduler/task_scheduler.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/url_constants.h"
10 #include "chrome/grit/task_scheduler_internals_resources.h"
11 #include "content/public/browser/web_ui_data_source.h"
12
13 TaskSchedulerInternalsUI::TaskSchedulerInternalsUI(content::WebUI* web_ui)
14 : content::WebUIController(web_ui) {
15 content::WebUIDataSource* html_source =
16 content::WebUIDataSource::Create(
17 chrome::kChromeUITaskSchedulerInternalsHost);
18
19 html_source->AddString("status", base::TaskScheduler::GetInstance()
20 ? "Initialized"
gab 2016/09/19 20:46:19 s/Initialized/Instantiated/ ?
robliao 2016/09/21 00:31:54 Sure, works for me. Done.
21 : "Not Initialized");
22 html_source->SetJsonPath("strings.js");
23
24 html_source->SetDefaultResource(
25 IDR_TASK_SCHEDULER_INTERNALS_RESOURCES_INDEX_HTML);
26
27 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), html_source);
28 }
29
30 TaskSchedulerInternalsUI::~TaskSchedulerInternalsUI() = default;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698