Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/sync/sync_ui_util.h" | 5 #include "chrome/browser/sync/sync_ui_util.h" |
| 6 | 6 |
| 7 #include "base/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.h" |
| 8 #include "base/i18n/time_formatting.h" | 8 #include "base/i18n/time_formatting.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 DCHECK(!user_name.empty()); | 82 DCHECK(!user_name.empty()); |
| 83 | 83 |
| 84 // Message may also carry additional advice with an HTML link, if acceptable. | 84 // Message may also carry additional advice with an HTML link, if acceptable. |
| 85 switch (style) { | 85 switch (style) { |
| 86 case PLAIN_TEXT: | 86 case PLAIN_TEXT: |
| 87 return l10n_util::GetStringFUTF16( | 87 return l10n_util::GetStringFUTF16( |
| 88 IDS_SYNC_ACCOUNT_SYNCING_TO_USER, | 88 IDS_SYNC_ACCOUNT_SYNCING_TO_USER, |
| 89 user_name); | 89 user_name); |
| 90 case WITH_HTML: | 90 case WITH_HTML: |
| 91 return l10n_util::GetStringFUTF16( | 91 return l10n_util::GetStringFUTF16( |
| 92 IDS_SYNC_ACCOUNT_SYNCING_TO_USER_WITH_MANAGE_LINK, | 92 IDS_SYNC_ACCOUNT_SYNCING_TO_USER_WITH_MANAGE_LINK_NEW, |
|
Nicolas Zea
2015/02/27 19:06:07
is the old string used anywhere?
Gang Wu
2015/03/05 20:40:30
update the CL, and yes, we need it
| |
| 93 user_name, | 93 user_name, |
| 94 base::ASCIIToUTF16(chrome::kSyncGoogleDashboardURL)); | 94 base::ASCIIToUTF16(chrome::kSyncChromeAwayFromChromeURL)); |
| 95 default: | 95 default: |
| 96 NOTREACHED(); | 96 NOTREACHED(); |
| 97 return NULL; | 97 return NULL; |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 | 100 |
| 101 void GetStatusForActionableError( | 101 void GetStatusForActionableError( |
| 102 const syncer::SyncProtocolError& error, | 102 const syncer::SyncProtocolError& error, |
| 103 base::string16* status_label) { | 103 base::string16* status_label) { |
| 104 DCHECK(status_label); | 104 DCHECK(status_label); |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 376 base::string16 ConstructTime(int64 time_in_int) { | 376 base::string16 ConstructTime(int64 time_in_int) { |
| 377 base::Time time = base::Time::FromInternalValue(time_in_int); | 377 base::Time time = base::Time::FromInternalValue(time_in_int); |
| 378 | 378 |
| 379 // If time is null the format function returns a time in 1969. | 379 // If time is null the format function returns a time in 1969. |
| 380 if (time.is_null()) | 380 if (time.is_null()) |
| 381 return base::string16(); | 381 return base::string16(); |
| 382 return base::TimeFormatFriendlyDateAndTime(time); | 382 return base::TimeFormatFriendlyDateAndTime(time); |
| 383 } | 383 } |
| 384 | 384 |
| 385 } // namespace sync_ui_util | 385 } // namespace sync_ui_util |
| OLD | NEW |