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

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

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (Closed)
Patch Set: Rebase. Created 4 years, 2 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
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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 // Check for an actionable UPGRADE_CLIENT error. 457 // Check for an actionable UPGRADE_CLIENT error.
458 ProfileSyncService::Status status; 458 ProfileSyncService::Status status;
459 service->QueryDetailedSyncStatus(&status); 459 service->QueryDetailedSyncStatus(&status);
460 if (status.sync_protocol_error.action == syncer::UPGRADE_CLIENT) { 460 if (status.sync_protocol_error.action == syncer::UPGRADE_CLIENT) {
461 *content_string_id = IDS_SYNC_ERROR_USER_MENU_UPGRADE_MESSAGE; 461 *content_string_id = IDS_SYNC_ERROR_USER_MENU_UPGRADE_MESSAGE;
462 *button_string_id = IDS_SYNC_ERROR_USER_MENU_UPGRADE_BUTTON; 462 *button_string_id = IDS_SYNC_ERROR_USER_MENU_UPGRADE_BUTTON;
463 return UPGRADE_CLIENT_ERROR; 463 return UPGRADE_CLIENT_ERROR;
464 } 464 }
465 465
466 // Check for a sync passphrase error. 466 // Check for a sync passphrase error.
467 SyncErrorController* sync_error_controller = 467 syncer::SyncErrorController* sync_error_controller =
468 service->sync_error_controller(); 468 service->sync_error_controller();
469 if (sync_error_controller && sync_error_controller->HasError()) { 469 if (sync_error_controller && sync_error_controller->HasError()) {
470 *content_string_id = IDS_SYNC_ERROR_USER_MENU_PASSPHRASE_MESSAGE; 470 *content_string_id = IDS_SYNC_ERROR_USER_MENU_PASSPHRASE_MESSAGE;
471 *button_string_id = IDS_SYNC_ERROR_USER_MENU_PASSPHRASE_BUTTON; 471 *button_string_id = IDS_SYNC_ERROR_USER_MENU_PASSPHRASE_BUTTON;
472 return PASSPHRASE_ERROR; 472 return PASSPHRASE_ERROR;
473 } 473 }
474 } 474 }
475 475
476 // There is no error. 476 // There is no error.
477 return NO_SYNC_ERROR; 477 return NO_SYNC_ERROR;
(...skipping 10 matching lines...) Expand all
488 base::string16 ConstructTime(int64_t time_in_int) { 488 base::string16 ConstructTime(int64_t time_in_int) {
489 base::Time time = base::Time::FromInternalValue(time_in_int); 489 base::Time time = base::Time::FromInternalValue(time_in_int);
490 490
491 // If time is null the format function returns a time in 1969. 491 // If time is null the format function returns a time in 1969.
492 if (time.is_null()) 492 if (time.is_null())
493 return base::string16(); 493 return base::string16();
494 return base::TimeFormatFriendlyDateAndTime(time); 494 return base::TimeFormatFriendlyDateAndTime(time);
495 } 495 }
496 496
497 } // namespace sync_ui_util 497 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_startup_tracker.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