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

Side by Side Diff: chrome/browser/sync/sync_ui_util.cc

Issue 12310009: Merge 182705 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/string_util.h" 10 #include "base/string_util.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 StatusLabelStyle style, 119 StatusLabelStyle style,
120 string16* status_label, 120 string16* status_label,
121 string16* link_label) { 121 string16* link_label) {
122 DCHECK_EQ(status_label == NULL, link_label == NULL); 122 DCHECK_EQ(status_label == NULL, link_label == NULL);
123 123
124 MessageType result_type(SYNCED); 124 MessageType result_type(SYNCED);
125 125
126 if (signin.GetAuthenticatedUsername().empty()) 126 if (signin.GetAuthenticatedUsername().empty())
127 return PRE_SYNCED; 127 return PRE_SYNCED;
128 128
129 if (!service || service->IsManaged() || service->HasSyncSetupCompleted()) { 129 if (!service || service->IsManaged() || service->HasSyncSetupCompleted() ||
130 service->IsStartSuppressed()) {
130 // The order or priority is going to be: 1. Unrecoverable errors. 131 // The order or priority is going to be: 1. Unrecoverable errors.
131 // 2. Auth errors. 3. Protocol errors. 4. Passphrase errors. 132 // 2. Auth errors. 3. Protocol errors. 4. Passphrase errors.
132 133
133 if (service && service->HasUnrecoverableError()) { 134 if (service && service->HasUnrecoverableError()) {
134 if (status_label) { 135 if (status_label) {
135 status_label->assign(l10n_util::GetStringFUTF16( 136 status_label->assign(l10n_util::GetStringFUTF16(
136 IDS_SYNC_STATUS_UNRECOVERABLE_ERROR, 137 IDS_SYNC_STATUS_UNRECOVERABLE_ERROR,
137 l10n_util::GetStringUTF16(IDS_SYNC_UNRECOVERABLE_ERROR_HELP_URL))); 138 l10n_util::GetStringUTF16(IDS_SYNC_UNRECOVERABLE_ERROR_HELP_URL)));
138 } 139 }
139 return SYNC_ERROR; 140 return SYNC_ERROR;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 string16 ConstructTime(int64 time_in_int) { 338 string16 ConstructTime(int64 time_in_int) {
338 base::Time time = base::Time::FromInternalValue(time_in_int); 339 base::Time time = base::Time::FromInternalValue(time_in_int);
339 340
340 // If time is null the format function returns a time in 1969. 341 // If time is null the format function returns a time in 1969.
341 if (time.is_null()) 342 if (time.is_null())
342 return string16(); 343 return string16();
343 return base::TimeFormatFriendlyDateAndTime(time); 344 return base::TimeFormatFriendlyDateAndTime(time);
344 } 345 }
345 346
346 } // namespace sync_ui_util 347 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698