| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 19 matching lines...) Expand all Loading... |
| 30 SYNC_ERROR, // A sync error (such as invalid credentials) has occurred. | 30 SYNC_ERROR, // A sync error (such as invalid credentials) has occurred. |
| 31 SYNC_PROMO, // A situation has occurred which should be brought to the user's | 31 SYNC_PROMO, // A situation has occurred which should be brought to the user's |
| 32 // attention, but not as an error. | 32 // attention, but not as an error. |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 // TODO(akalin): audit the use of ProfileSyncService* service below, | 35 // TODO(akalin): audit the use of ProfileSyncService* service below, |
| 36 // and use const ProfileSyncService& service where possible. | 36 // and use const ProfileSyncService& service where possible. |
| 37 | 37 |
| 38 // Create status and link labels for the current status labels and link text | 38 // Create status and link labels for the current status labels and link text |
| 39 // by querying |service|. | 39 // by querying |service|. |
| 40 // |status_label| may contain an HTML-formatted link. | 40 // If |html_links| is true, |status_label| may contain an HTML-formatted link. |
| 41 MessageType GetStatusLabels(ProfileSyncService* service, | 41 MessageType GetStatusLabels(ProfileSyncService* service, |
| 42 string16* status_label, | 42 string16* status_label, |
| 43 string16* link_label); | 43 string16* link_label, |
| 44 bool html_links); |
| 44 | 45 |
| 45 // Same as above but for use specifically on the New Tab Page. | 46 // Same as above but for use specifically on the New Tab Page. |
| 46 // |status_label| may contain an HTML-formatted link. | 47 // |status_label| may contain an HTML-formatted link. |
| 47 MessageType GetStatusLabelsForNewTabPage(ProfileSyncService* service, | 48 MessageType GetStatusLabelsForNewTabPage(ProfileSyncService* service, |
| 48 string16* status_label, | 49 string16* status_label, |
| 49 string16* link_label); | 50 string16* link_label); |
| 50 | 51 |
| 51 // Gets various labels for the sync global error based on the sync error state. | 52 // Gets various labels for the sync global error based on the sync error state. |
| 52 // |menu_item_label|, |bubble_message|, and |bubble_accept_label| must not be | 53 // |menu_item_label|, |bubble_message|, and |bubble_accept_label| must not be |
| 53 // NULL. | 54 // NULL. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 81 | 82 |
| 82 void AddIntSyncDetail(base::ListValue* details, | 83 void AddIntSyncDetail(base::ListValue* details, |
| 83 const std::string& stat_name, | 84 const std::string& stat_name, |
| 84 int64 stat_value); | 85 int64 stat_value); |
| 85 | 86 |
| 86 void AddStringSyncDetails(ListValue* details, const std::string& stat_name, | 87 void AddStringSyncDetails(ListValue* details, const std::string& stat_name, |
| 87 const std::string& stat_value); | 88 const std::string& stat_value); |
| 88 | 89 |
| 89 } // namespace sync_ui_util | 90 } // namespace sync_ui_util |
| 90 #endif // CHROME_BROWSER_SYNC_SYNC_UI_UTIL_H_ | 91 #endif // CHROME_BROWSER_SYNC_SYNC_UI_UTIL_H_ |
| OLD | NEW |