| Index: chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| index c1a007f96bd88c352c32a60631d396d6e684ff00..1629e736d4b2ca175655599d543944430bc6685f 100644
|
| --- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| +++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| @@ -29,6 +29,7 @@
|
| #include "chrome/common/url_constants.h"
|
| #include "content/browser/tab_contents/tab_contents.h"
|
| #include "content/public/browser/notification_details.h"
|
| +#include "content/public/browser/notification_service.h"
|
| #include "grit/chromium_strings.h"
|
| #include "grit/generated_resources.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| @@ -125,6 +126,12 @@ void NTPLoginHandler::RecordInHistogram(int type) {
|
| void NTPLoginHandler::HandleLoginMessageSeen(const ListValue* args) {
|
| Profile::FromWebUI(web_ui_)->GetPrefs()->SetBoolean(
|
| prefs::kSyncPromoShowNTPBubble, false);
|
| +
|
| + content::NotificationService* service =
|
| + content::NotificationService::current();
|
| + service->Notify(chrome::NTP4_SYNC_PROMO_SHOW_NTP_BUBBLE_CHANGED,
|
| + content::Source<NTPLoginHandler>(this),
|
| + content::NotificationService::NoDetails());
|
| }
|
|
|
| void NTPLoginHandler::HandleShowAdvancedLoginUI(const ListValue* args) {
|
| @@ -178,6 +185,10 @@ bool NTPLoginHandler::ShouldShow(Profile* profile) {
|
| // static
|
| void NTPLoginHandler::GetLocalizedValues(Profile* profile,
|
| DictionaryValue* values) {
|
| + // Always set the URL to prevent i18n missing value errors.
|
| + values->SetString("login_status_url",
|
| + google_util::StringAppendGoogleLocaleParam(chrome::kSyncLearnMoreURL));
|
| +
|
| PrefService* prefs = profile->GetPrefs();
|
| if (prefs->GetString(prefs::kGoogleServicesUsername).empty() ||
|
| !prefs->GetBoolean(prefs::kSyncPromoShowNTPBubble)) {
|
| @@ -187,8 +198,6 @@ void NTPLoginHandler::GetLocalizedValues(Profile* profile,
|
| values->SetString("login_status_message",
|
| l10n_util::GetStringFUTF16(IDS_SYNC_PROMO_NTP_BUBBLE_MESSAGE,
|
| l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)));
|
| - values->SetString("login_status_url",
|
| - google_util::StringAppendGoogleLocaleParam(chrome::kSyncLearnMoreURL));
|
| values->SetString("login_status_learn_more",
|
| l10n_util::GetStringUTF16(IDS_LEARN_MORE));
|
| values->SetString("login_status_advanced",
|
|
|