| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 // Check for an actionable UPGRADE_CLIENT error. | 458 // Check for an actionable UPGRADE_CLIENT error. |
| 459 ProfileSyncService::Status status; | 459 ProfileSyncService::Status status; |
| 460 service->QueryDetailedSyncStatus(&status); | 460 service->QueryDetailedSyncStatus(&status); |
| 461 if (status.sync_protocol_error.action == syncer::UPGRADE_CLIENT) { | 461 if (status.sync_protocol_error.action == syncer::UPGRADE_CLIENT) { |
| 462 *content_string_id = IDS_SYNC_ERROR_USER_MENU_UPGRADE_MESSAGE; | 462 *content_string_id = IDS_SYNC_ERROR_USER_MENU_UPGRADE_MESSAGE; |
| 463 *button_string_id = IDS_SYNC_ERROR_USER_MENU_UPGRADE_BUTTON; | 463 *button_string_id = IDS_SYNC_ERROR_USER_MENU_UPGRADE_BUTTON; |
| 464 return UPGRADE_CLIENT_ERROR; | 464 return UPGRADE_CLIENT_ERROR; |
| 465 } | 465 } |
| 466 | 466 |
| 467 // Check for a sync passphrase error. | 467 // Check for a sync passphrase error. |
| 468 SyncErrorController* sync_error_controller = | 468 syncer::SyncErrorController* sync_error_controller = |
| 469 service->sync_error_controller(); | 469 service->sync_error_controller(); |
| 470 if (sync_error_controller && sync_error_controller->HasError()) { | 470 if (sync_error_controller && sync_error_controller->HasError()) { |
| 471 *content_string_id = IDS_SYNC_ERROR_USER_MENU_PASSPHRASE_MESSAGE; | 471 *content_string_id = IDS_SYNC_ERROR_USER_MENU_PASSPHRASE_MESSAGE; |
| 472 *button_string_id = IDS_SYNC_ERROR_USER_MENU_PASSPHRASE_BUTTON; | 472 *button_string_id = IDS_SYNC_ERROR_USER_MENU_PASSPHRASE_BUTTON; |
| 473 return PASSPHRASE_ERROR; | 473 return PASSPHRASE_ERROR; |
| 474 } | 474 } |
| 475 } | 475 } |
| 476 | 476 |
| 477 // There is no error. | 477 // There is no error. |
| 478 return NO_SYNC_ERROR; | 478 return NO_SYNC_ERROR; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 489 base::string16 ConstructTime(int64_t time_in_int) { | 489 base::string16 ConstructTime(int64_t time_in_int) { |
| 490 base::Time time = base::Time::FromInternalValue(time_in_int); | 490 base::Time time = base::Time::FromInternalValue(time_in_int); |
| 491 | 491 |
| 492 // If time is null the format function returns a time in 1969. | 492 // If time is null the format function returns a time in 1969. |
| 493 if (time.is_null()) | 493 if (time.is_null()) |
| 494 return base::string16(); | 494 return base::string16(); |
| 495 return base::TimeFormatFriendlyDateAndTime(time); | 495 return base::TimeFormatFriendlyDateAndTime(time); |
| 496 } | 496 } |
| 497 | 497 |
| 498 } // namespace sync_ui_util | 498 } // namespace sync_ui_util |
| OLD | NEW |