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

Side by Side Diff: chrome/browser/ui/webui/signin/md_user_manager_ui.cc

Issue 2507873003: Allow adding user and launching guest mode when all profiles are lock while force sign in is enable… (Closed)
Patch Set: tommycli's comments Created 4 years, 1 month 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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/signin/md_user_manager_ui.h" 5 #include "chrome/browser/ui/webui/signin/md_user_manager_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/profiles/profile_shortcut_manager.h" 12 #include "chrome/browser/profiles/profile_shortcut_manager.h"
13 #include "chrome/browser/ui/webui/signin/signin_create_profile_handler.h" 13 #include "chrome/browser/ui/webui/signin/signin_create_profile_handler.h"
14 #include "chrome/browser/ui/webui/signin/signin_utils.h"
14 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h" 15 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h"
15 #include "chrome/browser/ui/webui/theme_source.h" 16 #include "chrome/browser/ui/webui/theme_source.h"
16 #include "chrome/common/features.h" 17 #include "chrome/common/features.h"
17 #include "chrome/common/url_constants.h" 18 #include "chrome/common/url_constants.h"
18 #include "chrome/grit/browser_resources.h" 19 #include "chrome/grit/browser_resources.h"
19 #include "chrome/grit/settings_resources.h" 20 #include "chrome/grit/settings_resources.h"
20 #include "content/public/browser/web_ui.h" 21 #include "content/public/browser/web_ui.h"
21 #include "content/public/browser/web_ui_data_source.h" 22 #include "content/public/browser/web_ui_data_source.h"
22 #include "ui/base/resource/resource_bundle.h" 23 #include "ui/base/resource/resource_bundle.h"
23 #include "ui/base/webui/web_ui_util.h" 24 #include "ui/base/webui/web_ui_util.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 57
57 MDUserManagerUI::~MDUserManagerUI() {} 58 MDUserManagerUI::~MDUserManagerUI() {}
58 59
59 content::WebUIDataSource* MDUserManagerUI::CreateUIDataSource( 60 content::WebUIDataSource* MDUserManagerUI::CreateUIDataSource(
60 const base::DictionaryValue& localized_strings) { 61 const base::DictionaryValue& localized_strings) {
61 content::WebUIDataSource* source = 62 content::WebUIDataSource* source =
62 content::WebUIDataSource::Create(chrome::kChromeUIMdUserManagerHost); 63 content::WebUIDataSource::Create(chrome::kChromeUIMdUserManagerHost);
63 source->AddLocalizedStrings(localized_strings); 64 source->AddLocalizedStrings(localized_strings);
64 source->AddBoolean("profileShortcutsEnabled", 65 source->AddBoolean("profileShortcutsEnabled",
65 ProfileShortcutManager::IsFeatureEnabled()); 66 ProfileShortcutManager::IsFeatureEnabled());
67 source->AddBoolean("isForceSigninEnabled", signin::IsForceSigninEnabled());
66 68
67 source->SetJsonPath("strings.js"); 69 source->SetJsonPath("strings.js");
68 70
69 source->AddResourcePath("control_bar.html", IDR_MD_CONTROL_BAR_HTML); 71 source->AddResourcePath("control_bar.html", IDR_MD_CONTROL_BAR_HTML);
70 source->AddResourcePath("control_bar.js", IDR_MD_CONTROL_BAR_JS); 72 source->AddResourcePath("control_bar.js", IDR_MD_CONTROL_BAR_JS);
71 source->AddResourcePath("create_profile.html", IDR_MD_CREATE_PROFILE_HTML); 73 source->AddResourcePath("create_profile.html", IDR_MD_CREATE_PROFILE_HTML);
72 source->AddResourcePath("create_profile.js", IDR_MD_CREATE_PROFILE_JS); 74 source->AddResourcePath("create_profile.js", IDR_MD_CREATE_PROFILE_JS);
73 source->AddResourcePath("error_dialog.html", IDR_MD_ERROR_DIALOG_HTML); 75 source->AddResourcePath("error_dialog.html", IDR_MD_ERROR_DIALOG_HTML);
74 source->AddResourcePath("error_dialog.js", IDR_MD_ERROR_DIALOG_JS); 76 source->AddResourcePath("error_dialog.js", IDR_MD_ERROR_DIALOG_JS);
75 source->AddResourcePath("icons.html", IDR_MD_USER_MANAGER_ICONS_HTML); 77 source->AddResourcePath("icons.html", IDR_MD_USER_MANAGER_ICONS_HTML);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 #endif 122 #endif
121 const std::string& app_locale = g_browser_process->GetApplicationLocale(); 123 const std::string& app_locale = g_browser_process->GetApplicationLocale();
122 webui::SetLoadTimeDataDefaults(app_locale, localized_strings); 124 webui::SetLoadTimeDataDefaults(app_locale, localized_strings);
123 125
124 #if defined(GOOGLE_CHROME_BUILD) 126 #if defined(GOOGLE_CHROME_BUILD)
125 localized_strings->SetString("buildType", "chrome"); 127 localized_strings->SetString("buildType", "chrome");
126 #else 128 #else
127 localized_strings->SetString("buildType", "chromium"); 129 localized_strings->SetString("buildType", "chromium");
128 #endif 130 #endif
129 } 131 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_user_manager/control_bar.js ('k') | chrome/test/data/webui/md_user_manager/control_bar_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698