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

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

Issue 959343003: Enable new sync URL to link to Chrome Away (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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 | « no previous file | chrome/common/url_constants.h » ('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
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index 8b1a59f5195e251cfe440555a903f6d756ff2c14..bfaa336e9cba71edd6036decdf2b556fffa18933 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -6,6 +6,7 @@
#include "base/i18n/number_formatting.h"
#include "base/i18n/time_formatting.h"
+#include "base/metrics/field_trial.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -43,6 +44,12 @@ namespace sync_ui_util {
namespace {
+bool IsChromeDashboardEnabled() {
+ const std::string group_name =
+ base::FieldTrialList::FindFullName("ChromeDashboard");
+ return group_name == "Enabled";
+}
+
// 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.
@@ -88,6 +95,12 @@ base::string16 GetSyncedStateStatusLabel(ProfileSyncService* service,
IDS_SYNC_ACCOUNT_SYNCING_TO_USER,
user_name);
case WITH_HTML:
+ if (IsChromeDashboardEnabled()) {
+ return l10n_util::GetStringFUTF16(
+ IDS_SYNC_ACCOUNT_SYNCING_TO_USER_WITH_MANAGE_LINK_NEW,
+ user_name,
+ base::ASCIIToUTF16(chrome::kSyncChromeDashboardURL));
+ }
return l10n_util::GetStringFUTF16(
IDS_SYNC_ACCOUNT_SYNCING_TO_USER_WITH_MANAGE_LINK,
user_name,
« no previous file with comments | « no previous file | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698