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

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

Issue 7976018: [Sync Setup UI] Fix display of "Last Synced as..." in Personal Stuff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // NOT first machine. 166 // NOT first machine.
167 // Show a link ("needs attention"), but still indicate the 167 // Show a link ("needs attention"), but still indicate the
168 // current synced status. Return SYNC_PROMO so that 168 // current synced status. Return SYNC_PROMO so that
169 // the configure link will still be shown. 169 // the configure link will still be shown.
170 if (status_label && link_label) { 170 if (status_label && link_label) {
171 status_label->assign(GetSyncedStateStatusLabel(service)); 171 status_label->assign(GetSyncedStateStatusLabel(service));
172 link_label->assign( 172 link_label->assign(
173 l10n_util::GetStringUTF16(IDS_SYNC_PASSWORD_SYNC_ATTENTION)); 173 l10n_util::GetStringUTF16(IDS_SYNC_PASSWORD_SYNC_ATTENTION));
174 } 174 }
175 return SYNC_PROMO; 175 return SYNC_PROMO;
176 } else {
177 // First machine. Don't show promotion, just show everything
178 // normal.
179 if (status_label)
180 status_label->assign(GetSyncedStateStatusLabel(service));
181 return SYNCED;
182 } 176 }
183 } 177 }
178
lipalani1 2011/09/22 20:20:22 I dont think the comment is still valid.
179 // First machine, or there is no error. Don't show promotion, just show
180 // everything normal.
181 if (status_label)
182 status_label->assign(GetSyncedStateStatusLabel(service));
184 return SYNCED; 183 return SYNCED;
185 } else { 184 } else {
186 // Either show auth error information with a link to re-login, auth in prog, 185 // Either show auth error information with a link to re-login, auth in prog,
187 // or provide a link to continue with setup. 186 // or provide a link to continue with setup.
188 result_type = PRE_SYNCED; 187 result_type = PRE_SYNCED;
189 if (service->SetupInProgress()) { 188 if (service->SetupInProgress()) {
190 ProfileSyncService::Status status(service->QueryDetailedSyncStatus()); 189 ProfileSyncService::Status status(service->QueryDetailedSyncStatus());
191 const AuthError& auth_error = service->GetAuthError(); 190 const AuthError& auth_error = service->GetAuthError();
192 if (status_label) { 191 if (status_label) {
193 status_label->assign( 192 status_label->assign(
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 DictionaryValue* val = new DictionaryValue; 547 DictionaryValue* val = new DictionaryValue;
549 val->SetString("model_type", ModelTypeToString(it->first)); 548 val->SetString("model_type", ModelTypeToString(it->first));
550 val->SetString("group", ModelSafeGroupToString(it->second)); 549 val->SetString("group", ModelSafeGroupToString(it->second));
551 routing_info->Append(val); 550 routing_info->Append(val);
552 } 551 }
553 } 552 }
554 } 553 }
555 } 554 }
556 555
557 } // namespace sync_ui_util 556 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698