Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/browser/sync/sync_ui_util.h

Issue 8383036: Adding parameter to GetStatusLabels to indicate if links are acceptable. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix following try test. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/sync/profile_sync_service_mock.h ('k') | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 namespace sync_ui_util { 25 namespace sync_ui_util {
26 26
27 enum MessageType { 27 enum MessageType {
28 PRE_SYNCED, // User has not set up sync. 28 PRE_SYNCED, // User has not set up sync.
29 SYNCED, // We are synced and authenticated to a gmail account. 29 SYNCED, // We are synced and authenticated to a gmail account.
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 enum StatusLabelStyle {
36 PLAIN_TEXT, // Label will be plain-text only.
37 WITH_HTML // Label may contain an HTML-formatted link.
38 };
39
35 // TODO(akalin): audit the use of ProfileSyncService* service below, 40 // TODO(akalin): audit the use of ProfileSyncService* service below,
36 // and use const ProfileSyncService& service where possible. 41 // and use const ProfileSyncService& service where possible.
37 42
38 // Create status and link labels for the current status labels and link text 43 // Create status and link labels for the current status labels and link text
39 // by querying |service|. 44 // by querying |service|.
40 // |status_label| may contain an HTML-formatted link. 45 // If |html_links| is true, |status_label| may contain an HTML-formatted link.
akalin 2011/11/02 23:36:28 update comment
jimblackler 2011/11/04 13:11:49 Done.
41 MessageType GetStatusLabels(ProfileSyncService* service, 46 MessageType GetStatusLabels(ProfileSyncService* service,
47 StatusLabelStyle style,
42 string16* status_label, 48 string16* status_label,
43 string16* link_label); 49 string16* link_label);
44 50
45 // Same as above but for use specifically on the New Tab Page. 51 // Same as above but for use specifically on the New Tab Page.
46 // |status_label| may contain an HTML-formatted link. 52 // |status_label| may contain an HTML-formatted link.
47 MessageType GetStatusLabelsForNewTabPage(ProfileSyncService* service, 53 MessageType GetStatusLabelsForNewTabPage(ProfileSyncService* service,
48 string16* status_label, 54 string16* status_label,
49 string16* link_label); 55 string16* link_label);
50 56
51 // Gets various labels for the sync global error based on the sync error state. 57 // Gets various labels for the sync global error based on the sync error state.
(...skipping 26 matching lines...) Expand all
78 84
79 void AddIntSyncDetail(base::ListValue* details, 85 void AddIntSyncDetail(base::ListValue* details,
80 const std::string& stat_name, 86 const std::string& stat_name,
81 int64 stat_value); 87 int64 stat_value);
82 88
83 void AddStringSyncDetails(ListValue* details, const std::string& stat_name, 89 void AddStringSyncDetails(ListValue* details, const std::string& stat_name,
84 const std::string& stat_value); 90 const std::string& stat_value);
85 91
86 } // namespace sync_ui_util 92 } // namespace sync_ui_util
87 #endif // CHROME_BROWSER_SYNC_SYNC_UI_UTIL_H_ 93 #endif // CHROME_BROWSER_SYNC_SYNC_UI_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_mock.h ('k') | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698