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

Unified Diff: chrome/browser/sync/sync_ui_util.cc

Issue 8613001: Revert 110905 - Adding parameter to GetStatusLabels to indicate if links are acceptable, as some ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/sync_ui_util.h ('k') | chrome/browser/sync/sync_ui_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sync_ui_util.cc
===================================================================
--- chrome/browser/sync/sync_ui_util.cc (revision 110908)
+++ chrome/browser/sync/sync_ui_util.cc (working copy)
@@ -132,28 +132,16 @@
// Returns the message that should be displayed when the user is authenticated
// and can connect to the sync server. If the user hasn't yet authenticated, an
// empty string is returned.
-string16 GetSyncedStateStatusLabel(ProfileSyncService* service,
- StatusLabelStyle style) {
+string16 GetSyncedStateStatusLabel(ProfileSyncService* service) {
string16 label;
string16 user_name(service->GetAuthenticatedUsername());
if (user_name.empty())
return label;
- // Message may also carry additional advice with an HTML link, if acceptable.
- switch (style) {
- case PLAIN_TEXT:
- return l10n_util::GetStringFUTF16(
- IDS_SYNC_ACCOUNT_SYNCING_TO_USER,
- user_name);
- case WITH_HTML:
- return l10n_util::GetStringFUTF16(
- IDS_SYNC_ACCOUNT_SYNCING_TO_USER_WITH_MANAGE_LINK,
- user_name,
- ASCIIToUTF16(chrome::kSyncGoogleDashboardURL));
- default:
- NOTREACHED();
- return NULL;
- }
+ return l10n_util::GetStringFUTF16(
+ IDS_SYNC_ACCOUNT_SYNCING_TO_USER,
+ user_name,
+ ASCIIToUTF16(chrome::kSyncGoogleDashboardURL));
}
void GetStatusForActionableError(
@@ -187,7 +175,6 @@
// status_label and link_label must either be both NULL or both non-NULL.
MessageType GetStatusInfo(ProfileSyncService* service,
- StatusLabelStyle style,
string16* status_label,
string16* link_label) {
DCHECK_EQ(status_label == NULL, link_label == NULL);
@@ -250,7 +237,7 @@
// current synced status. Return SYNC_PROMO so that
// the configure link will still be shown.
if (status_label && link_label) {
- status_label->assign(GetSyncedStateStatusLabel(service, style));
+ status_label->assign(GetSyncedStateStatusLabel(service));
link_label->assign(
l10n_util::GetStringUTF16(IDS_SYNC_PASSWORD_SYNC_ATTENTION));
}
@@ -260,7 +247,7 @@
// There is no error. Display "Last synced..." message.
if (status_label)
- status_label->assign(GetSyncedStateStatusLabel(service, style));
+ status_label->assign(GetSyncedStateStatusLabel(service));
return SYNCED;
} else {
// Either show auth error information with a link to re-login, auth in prog,
@@ -342,18 +329,17 @@
}
// Fallback to default.
- return GetStatusInfo(service, WITH_HTML, status_label, link_label);
+ return GetStatusInfo(service, status_label, link_label);
}
} // namespace
MessageType GetStatusLabels(ProfileSyncService* service,
- StatusLabelStyle style,
string16* status_label,
string16* link_label) {
DCHECK(status_label);
DCHECK(link_label);
- return sync_ui_util::GetStatusInfo(service, style, status_label, link_label);
+ return sync_ui_util::GetStatusInfo(service, status_label, link_label);
}
MessageType GetStatusLabelsForNewTabPage(ProfileSyncService* service,
@@ -404,7 +390,7 @@
}
MessageType GetStatus(ProfileSyncService* service) {
- return sync_ui_util::GetStatusInfo(service, WITH_HTML, NULL, NULL);
+ return sync_ui_util::GetStatusInfo(service, NULL, NULL);
}
string16 GetSyncMenuLabel(ProfileSyncService* service) {
« no previous file with comments | « chrome/browser/sync/sync_ui_util.h ('k') | chrome/browser/sync/sync_ui_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698