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 #ifndef CHROME_BROWSER_SYNC_SYNC_UI_UTIL_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SYNC_UI_UTIL_H_ |
6 #define CHROME_BROWSER_SYNC_SYNC_UI_UTIL_H_ | 6 #define CHROME_BROWSER_SYNC_SYNC_UI_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 // and use const ProfileSyncService& service where possible. | 32 // and use const ProfileSyncService& service where possible. |
33 | 33 |
34 string16 GetLoginMessageForEncryption(); | 34 string16 GetLoginMessageForEncryption(); |
35 | 35 |
36 // Create status and link labels for the current status labels and link text | 36 // Create status and link labels for the current status labels and link text |
37 // by querying |service|. | 37 // by querying |service|. |
38 MessageType GetStatusLabels(ProfileSyncService* service, | 38 MessageType GetStatusLabels(ProfileSyncService* service, |
39 string16* status_label, | 39 string16* status_label, |
40 string16* link_label); | 40 string16* link_label); |
41 | 41 |
| 42 // Same as above but for use specifically on the New Tab Page. |
| 43 MessageType GetStatusLabelsForNewTabPage(ProfileSyncService* service, |
| 44 string16* status_label, |
| 45 string16* link_label); |
| 46 |
42 MessageType GetStatus(ProfileSyncService* service); | 47 MessageType GetStatus(ProfileSyncService* service); |
43 | 48 |
44 // Determines whether or not the sync error button should be visible. | 49 // Determines whether or not the sync error button should be visible. |
45 bool ShouldShowSyncErrorButton(ProfileSyncService* service); | 50 bool ShouldShowSyncErrorButton(ProfileSyncService* service); |
46 | 51 |
47 // Returns a string with the synchronization status. | 52 // Returns a string with the synchronization status. |
48 string16 GetSyncMenuLabel(ProfileSyncService* service); | 53 string16 GetSyncMenuLabel(ProfileSyncService* service); |
49 | 54 |
50 // Open the appropriate sync dialog for the given profile (which can be | 55 // Open the appropriate sync dialog for the given profile (which can be |
51 // incognito). |code| should be one of the START_FROM_* codes. | 56 // incognito). |code| should be one of the START_FROM_* codes. |
52 void OpenSyncMyBookmarksDialog( | 57 void OpenSyncMyBookmarksDialog( |
53 Profile* profile, ProfileSyncService::SyncEventCodes code); | 58 Profile* profile, ProfileSyncService::SyncEventCodes code); |
54 | 59 |
55 void AddBoolSyncDetail(ListValue* details, | 60 void AddBoolSyncDetail(ListValue* details, |
56 const std::string& stat_name, | 61 const std::string& stat_name, |
57 bool stat_value); | 62 bool stat_value); |
58 | 63 |
59 // |service| can be NULL. | 64 // |service| can be NULL. |
60 void ConstructAboutInformation(ProfileSyncService* service, | 65 void ConstructAboutInformation(ProfileSyncService* service, |
61 DictionaryValue* strings); | 66 DictionaryValue* strings); |
62 | 67 |
63 void AddIntSyncDetail(ListValue* details, | 68 void AddIntSyncDetail(ListValue* details, |
64 const std::string& stat_name, | 69 const std::string& stat_name, |
65 int64 stat_value); | 70 int64 stat_value); |
66 } // namespace sync_ui_util | 71 } // namespace sync_ui_util |
67 #endif // CHROME_BROWSER_SYNC_SYNC_UI_UTIL_H_ | 72 #endif // CHROME_BROWSER_SYNC_SYNC_UI_UTIL_H_ |
OLD | NEW |