Commit f142aaa8 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

sync_ui_util cleanup: remove unused GetStatusLabelsForNewTabPage

Bug: none
Change-Id: I04b69bd24759246e5fa2c3a253bc535dc46a3036
Reviewed-on: https://chromium-review.googlesource.com/873634Reviewed-by: default avatarPavel Yatsuk <pavely@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530455}
parent 6f393137
......@@ -345,46 +345,6 @@ MessageType GetStatusInfo(Profile* profile,
return result_type;
}
// Returns the status info for use on the new tab page, where we want slightly
// different information than in the settings panel.
MessageType GetStatusInfoForNewTabPage(Profile* profile,
ProfileSyncService* service,
const SigninManagerBase& signin,
base::string16* status_label,
base::string16* link_label) {
DCHECK(status_label);
DCHECK(link_label);
if (service->IsFirstSetupComplete() && service->IsPassphraseRequired()) {
if (service->passphrase_required_reason() == syncer::REASON_ENCRYPTION) {
// First machine migrating to passwords. Show as a promotion.
if (status_label && link_label) {
status_label->assign(
l10n_util::GetStringFUTF16(
IDS_SYNC_NTP_PASSWORD_PROMO,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
link_label->assign(
l10n_util::GetStringUTF16(IDS_SYNC_NTP_PASSWORD_ENABLE));
}
return SYNC_PROMO;
} else {
// NOT first machine.
// Show a link and present as an error ("needs attention").
if (status_label && link_label) {
status_label->assign(base::string16());
link_label->assign(
l10n_util::GetStringUTF16(IDS_SYNC_CONFIGURE_ENCRYPTION));
}
return SYNC_ERROR;
}
}
// Fallback to default.
ActionType action_type = NO_ACTION;
return GetStatusInfo(profile, service, signin, WITH_HTML, status_label,
link_label, &action_type);
}
} // namespace
MessageType GetStatusLabels(Profile* profile,
......@@ -400,17 +360,6 @@ MessageType GetStatusLabels(Profile* profile,
status_label, link_label, action_type);
}
MessageType GetStatusLabelsForNewTabPage(Profile* profile,
ProfileSyncService* service,
const SigninManagerBase& signin,
base::string16* status_label,
base::string16* link_label) {
DCHECK(status_label);
DCHECK(link_label);
return sync_ui_util::GetStatusInfoForNewTabPage(profile, service, signin,
status_label, link_label);
}
#if !defined(OS_CHROMEOS)
AvatarSyncErrorType GetMessagesForAvatarSyncError(
Profile* profile,
......
......@@ -68,15 +68,6 @@ MessageType GetStatusLabels(Profile* profile,
base::string16* link_label,
ActionType* action_type);
// Same as above but for use specifically on the New Tab Page.
// |status_label| may contain an HTML-formatted link.
MessageType GetStatusLabelsForNewTabPage(
Profile* profile,
browser_sync::ProfileSyncService* service,
const SigninManagerBase& signin,
base::string16* status_label,
base::string16* link_label);
#if !defined(OS_CHROMEOS)
// Gets the error message and button label for the sync errors that should be
// exposed to the user through the titlebar avatar button.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment