OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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/signin/signin_dice_internals_ui.h" |
| 6 |
| 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/webui/signin/signin_dice_internals_handler.h" |
| 9 #include "chrome/common/url_constants.h" |
| 10 #include "chrome/grit/browser_resources.h" |
| 11 #include "components/grit/components_resources.h" |
| 12 #include "content/public/browser/web_ui.h" |
| 13 #include "content/public/browser/web_ui_data_source.h" |
| 14 |
| 15 SigninDiceInternalsUI::SigninDiceInternalsUI(content::WebUI* web_ui) |
| 16 : WebUIController(web_ui) { |
| 17 Profile* profile = Profile::FromWebUI(web_ui); |
| 18 DCHECK(!profile->IsOffTheRecord()); |
| 19 |
| 20 content::WebUIDataSource* source = content::WebUIDataSource::Create( |
| 21 chrome::kChromeUISigninDiceInternalsHost); |
| 22 source->AddResourcePath("signin_dice_internals.js", |
| 23 IDR_SIGNIN_DICE_INTERNALS_JS); |
| 24 source->SetDefaultResource(IDR_SIGNIN_DICE_INTERNALS_HTML); |
| 25 content::WebUIDataSource::Add(profile, source); |
| 26 |
| 27 web_ui->AddMessageHandler( |
| 28 base::MakeUnique<SigninDiceInternalsHandler>(profile)); |
| 29 } |
| 30 |
| 31 SigninDiceInternalsUI::~SigninDiceInternalsUI() {} |
OLD | NEW |