Chromium Code Reviews| Index: chrome/browser/ui/webui/options/manage_profile_handler.cc |
| diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc |
| index 40cef2fa0f798afdc4a808df4137620d96006d7d..8bf1d98c37325945a53a5be69b194ba51bb1dbcb 100644 |
| --- a/chrome/browser/ui/webui/options/manage_profile_handler.cc |
| +++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc |
| @@ -35,6 +35,7 @@ |
| #include "content/public/browser/browser_thread.h" |
| #include "content/public/browser/notification_service.h" |
| #include "content/public/browser/web_ui.h" |
| +#include "google_apis/gaia/gaia_auth_util.h" |
| #include "grit/generated_resources.h" |
| #include "grit/google_chrome_strings.h" |
| #include "ui/base/l10n/l10n_util.h" |
| @@ -105,10 +106,6 @@ void ManageProfileHandler::GetLocalizedValues( |
| IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_TITLE }, |
| { "disconnectManagedProfileOK", |
| IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_OK_BUTTON_LABEL }, |
| - { "disconnectManagedProfileText", |
| - IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_TEXT }, |
| - { "disconnectManagedProfileLearnMore", |
| - IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_LEARN_MORE }, |
| { "createProfileTitle", IDS_PROFILES_CREATE_TITLE }, |
| { "createProfileInstructions", IDS_PROFILES_CREATE_INSTRUCTIONS }, |
| { "createProfileConfirm", IDS_PROFILES_CREATE_CONFIRM }, |
| @@ -130,8 +127,24 @@ void ManageProfileHandler::GetLocalizedValues( |
| localized_strings->SetBoolean("profileShortcutsEnabled", |
| ProfileShortcutManager::IsFeatureEnabled()); |
| - localized_strings->SetString("enterpriseManagedAccountHelpURL", |
| - chrome::kEnterpriseManagedAccountHelpURL); |
| + localized_strings->SetString( |
| + "disconnectManagedProfileText", |
| + l10n_util::GetStringFUTF16( |
| + IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_TEXT, |
| + base::UTF8ToUTF16(chrome::kSyncGoogleDashboardURL))); |
| + |
| + Profile* profile = Profile::FromWebUI(web_ui()); |
| + std::string domain_name = "unknown"; |
|
Andrew T Wilson (Slow)
2014/04/24 15:46:17
Either leave this blank (no default domain name) o
kaliamoorthi
2014/04/24 21:42:15
I have removed the default.
|
| + if (profile && !profile->GetProfileName().empty()) |
|
Andrew T Wilson (Slow)
2014/04/24 15:46:17
Is "profile->GetProfileName()" really what you wan
kaliamoorthi
2014/04/24 21:42:15
Done.
|
| + domain_name = gaia::ExtractDomainName(profile->GetProfileName()); |
| + |
| + // If there is no one logged in or if the profile name is empty then the |
| + // domain name is unknown. This happens in browser tests. |
| + localized_strings->SetString( |
| + "disconnectManagedProfileDomainInformation", |
| + l10n_util::GetStringFUTF16( |
| + IDS_PROFILES_DISCONNECT_MANAGED_PROFILE_DOMAIN_INFORMATION, |
| + base::ASCIIToUTF16("<b>" + domain_name + "</b>"))); |
|
Andrew T Wilson (Slow)
2014/04/24 15:46:17
I'm OK with this, but I wonder if instead the <b>
Patrick Dubroy
2014/04/24 16:20:11
I don't think it should be part of the localized s
kaliamoorthi
2014/04/24 21:42:15
I chose Patrick's solution for this one. The reaso
kaliamoorthi
2014/04/24 21:42:15
Done.
|
| } |
| void ManageProfileHandler::InitializeHandler() { |