Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / chrome / browser / ui / webui / signin / profile_signin_confirmation_ui.cc
blobbaa4b218b1eaf9afb1123e2538549163362a6d5d
1 // Copyright (c) 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.
5 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h"
7 #include "base/values.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/url_constants.h"
10 #include "chrome/grit/chromium_strings.h"
11 #include "chrome/grit/generated_resources.h"
12 #include "content/public/browser/web_contents.h"
13 #include "content/public/browser/web_ui.h"
14 #include "content/public/browser/web_ui_data_source.h"
15 #include "grit/browser_resources.h"
17 ProfileSigninConfirmationUI::ProfileSigninConfirmationUI(content::WebUI* web_ui)
18 : ConstrainedWebDialogUI(web_ui) {
19 content::WebUIDataSource* html_source = content::WebUIDataSource::Create(
20 chrome::kChromeUIProfileSigninConfirmationHost);
22 html_source->AddLocalizedString(
23 "createProfileButtonText",
24 IDS_ENTERPRISE_SIGNIN_CREATE_NEW_PROFILE);
25 html_source->AddLocalizedString(
26 "continueButtonText",
27 IDS_ENTERPRISE_SIGNIN_CONTINUE);
28 html_source->AddLocalizedString("okButtonText", IDS_OK);
29 html_source->AddLocalizedString(
30 "cancelButtonText",
31 IDS_ENTERPRISE_SIGNIN_CANCEL);
32 html_source->AddLocalizedString(
33 "learnMoreText",
34 IDS_ENTERPRISE_SIGNIN_PROFILE_LINK_LEARN_MORE);
35 html_source->AddLocalizedString(
36 "dialogTitle",
37 IDS_ENTERPRISE_SIGNIN_TITLE);
38 html_source->AddLocalizedString(
39 "dialogMessage",
40 IDS_ENTERPRISE_SIGNIN_EXPLANATION);
41 html_source->AddLocalizedString(
42 "dialogPrompt",
43 IDS_ENTERPRISE_SIGNIN_CREATE_NEW_PROFILE_MESSAGE);
45 html_source->SetJsonPath("strings.js");
47 html_source->AddResourcePath("profile_signin_confirmation.js",
48 IDR_PROFILE_SIGNIN_CONFIRMATION_JS);
49 html_source->AddResourcePath("profile_signin_confirmation.css",
50 IDR_PROFILE_SIGNIN_CONFIRMATION_CSS);
51 html_source->SetDefaultResource(IDR_PROFILE_SIGNIN_CONFIRMATION_HTML);
53 Profile* profile = Profile::FromWebUI(web_ui);
54 content::WebUIDataSource::Add(profile, html_source);
57 ProfileSigninConfirmationUI::~ProfileSigninConfirmationUI() {