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