| OLD | NEW |
| 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" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 IDR_MD_SUPERVISED_USER_LEARN_MORE_JS); | 89 IDR_MD_SUPERVISED_USER_LEARN_MORE_JS); |
| 90 source->AddResourcePath("user_manager.js", IDR_MD_USER_MANAGER_JS); | 90 source->AddResourcePath("user_manager.js", IDR_MD_USER_MANAGER_JS); |
| 91 source->AddResourcePath("user_manager_dialog.html", | 91 source->AddResourcePath("user_manager_dialog.html", |
| 92 IDR_MD_USER_MANAGER_DIALOG_HTML); | 92 IDR_MD_USER_MANAGER_DIALOG_HTML); |
| 93 source->AddResourcePath("user_manager_dialog.js", | 93 source->AddResourcePath("user_manager_dialog.js", |
| 94 IDR_MD_USER_MANAGER_DIALOG_JS); | 94 IDR_MD_USER_MANAGER_DIALOG_JS); |
| 95 source->AddResourcePath("user_manager_pages.html", | 95 source->AddResourcePath("user_manager_pages.html", |
| 96 IDR_MD_USER_MANAGER_PAGES_HTML); | 96 IDR_MD_USER_MANAGER_PAGES_HTML); |
| 97 source->AddResourcePath("user_manager_pages.js", | 97 source->AddResourcePath("user_manager_pages.js", |
| 98 IDR_MD_USER_MANAGER_PAGES_JS); | 98 IDR_MD_USER_MANAGER_PAGES_JS); |
| 99 source->AddResourcePath("user_manager_styles.html", | |
| 100 IDR_MD_USER_MANAGER_STYLES_HTML); | |
| 101 source->AddResourcePath("user_manager_tutorial.html", | 99 source->AddResourcePath("user_manager_tutorial.html", |
| 102 IDR_MD_USER_MANAGER_TUTORIAL_HTML); | 100 IDR_MD_USER_MANAGER_TUTORIAL_HTML); |
| 103 source->AddResourcePath("user_manager_tutorial.js", | 101 source->AddResourcePath("user_manager_tutorial.js", |
| 104 IDR_MD_USER_MANAGER_TUTORIAL_JS); | 102 IDR_MD_USER_MANAGER_TUTORIAL_JS); |
| 105 | 103 |
| 106 source->SetDefaultResource(IDR_MD_USER_MANAGER_HTML); | 104 source->SetDefaultResource(IDR_MD_USER_MANAGER_HTML); |
| 107 | 105 |
| 108 return source; | 106 return source; |
| 109 } | 107 } |
| 110 | 108 |
| 111 void MDUserManagerUI::GetLocalizedStrings( | 109 void MDUserManagerUI::GetLocalizedStrings( |
| 112 base::DictionaryValue* localized_strings) { | 110 base::DictionaryValue* localized_strings) { |
| 113 user_manager_screen_handler_->GetLocalizedValues(localized_strings); | 111 user_manager_screen_handler_->GetLocalizedValues(localized_strings); |
| 114 signin_create_profile_handler_->GetLocalizedValues(localized_strings); | 112 signin_create_profile_handler_->GetLocalizedValues(localized_strings); |
| 115 #if defined(ENABLE_SUPERVISED_USERS) | 113 #if defined(ENABLE_SUPERVISED_USERS) |
| 116 signin_supervised_user_import_handler_->GetLocalizedValues(localized_strings); | 114 signin_supervised_user_import_handler_->GetLocalizedValues(localized_strings); |
| 117 #endif | 115 #endif |
| 118 const std::string& app_locale = g_browser_process->GetApplicationLocale(); | 116 const std::string& app_locale = g_browser_process->GetApplicationLocale(); |
| 119 webui::SetLoadTimeDataDefaults(app_locale, localized_strings); | 117 webui::SetLoadTimeDataDefaults(app_locale, localized_strings); |
| 120 | 118 |
| 121 #if defined(GOOGLE_CHROME_BUILD) | 119 #if defined(GOOGLE_CHROME_BUILD) |
| 122 localized_strings->SetString("buildType", "chrome"); | 120 localized_strings->SetString("buildType", "chrome"); |
| 123 #else | 121 #else |
| 124 localized_strings->SetString("buildType", "chromium"); | 122 localized_strings->SetString("buildType", "chromium"); |
| 125 #endif | 123 #endif |
| 126 } | 124 } |
| OLD | NEW |