| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #if defined(BROWSER_SYNC) | 5 #if defined(BROWSER_SYNC) |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_SYNC_SYNC_STATUS_UI_HELPER_H_ | 7 #ifndef CHROME_BROWSER_SYNC_SYNC_STATUS_UI_HELPER_H_ |
| 8 #define CHROME_BROWSER_SYNC_SYNC_STATUS_UI_HELPER_H_ | 8 #define CHROME_BROWSER_SYNC_SYNC_STATUS_UI_HELPER_H_ |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 | 11 |
| 12 class ProfileSyncService; | 12 class ProfileSyncService; |
| 13 | 13 |
| 14 // Utility to gather current sync status information from the sync service and | 14 // Utility to gather current sync status information from the sync service and |
| 15 // constructs messages suitable for showing in UI. | 15 // constructs messages suitable for showing in UI. |
| 16 class SyncStatusUIHelper { | 16 class SyncStatusUIHelper { |
| 17 public: | 17 public: |
| 18 enum MessageType { | 18 enum MessageType { |
| 19 PRE_SYNCED, // User has not set up sync. | 19 PRE_SYNCED, // User has not set up sync. |
| 20 SYNCED, // We are synced and authenticated to a gmail account. | 20 SYNCED, // We are synced and authenticated to a gmail account. |
| 21 SYNC_ERROR, // A sync error (such as invalid credentials) has occurred. | 21 SYNC_ERROR, // A sync error (such as invalid credentials) has occurred. |
| 22 }; | 22 }; |
| 23 | 23 |
| 24 // Create status and link labels for the current status labels and link text | 24 // Create status and link labels for the current status labels and link text |
| 25 // by querying |service|. | 25 // by querying |service|. |
| 26 static MessageType GetLabels(ProfileSyncService* service, | 26 static MessageType GetLabels(ProfileSyncService* service, |
| 27 std::wstring* status_label, | 27 string16* status_label, |
| 28 std::wstring* link_label); | 28 string16* link_label); |
| 29 private: | 29 private: |
| 30 DISALLOW_IMPLICIT_CONSTRUCTORS(SyncStatusUIHelper); | 30 DISALLOW_IMPLICIT_CONSTRUCTORS(SyncStatusUIHelper); |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 #endif // CHROME_BROWSER_SYNC_SYNC_STATUS_UI_HELPER_H_ | 33 #endif // CHROME_BROWSER_SYNC_SYNC_STATUS_UI_HELPER_H_ |
| 34 #endif // defined(BROWSER_SYNC) | 34 #endif // defined(BROWSER_SYNC) |
| OLD | NEW |