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_UI_WEBUI_SYNC_PROMO_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_UI_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/ui/webui/chrome_web_ui.h" | 9 #include "chrome/browser/ui/webui/chrome_web_ui.h" |
10 | 10 |
| 11 class Profile; |
| 12 |
11 // The Web UI handler for chrome://syncpromo. | 13 // The Web UI handler for chrome://syncpromo. |
12 class SyncPromoUI : public ChromeWebUI { | 14 class SyncPromoUI : public ChromeWebUI { |
13 public: | 15 public: |
14 // Constructs a SyncPromoUI. |contents| is the TabContents that this WebUI is | 16 // Constructs a SyncPromoUI. |contents| is the TabContents that this WebUI is |
15 // associated with. |contents| may not be NULL. | 17 // associated with. |contents| may not be NULL. |
16 explicit SyncPromoUI(TabContents* contents); | 18 explicit SyncPromoUI(TabContents* contents); |
17 | 19 |
18 // Returns true if the sync promo should be visible. | 20 // Returns true if the sync promo should be visible. |
19 static bool ShouldShowSyncPromo(); | 21 static bool ShouldShowSyncPromo(); |
20 | 22 |
| 23 // Returns true if we should show the sync promo at startup. |
| 24 static bool ShouldShowSyncPromoAtStartup(Profile* profile, |
| 25 bool is_new_profile); |
| 26 // Called when the sync promo has been shown so that we can keep track |
| 27 // of the number of times we've displayed it. |
| 28 static void DidShowSyncPromoAtStartup(Profile* profile); |
| 29 |
21 private: | 30 private: |
22 DISALLOW_COPY_AND_ASSIGN(SyncPromoUI); | 31 DISALLOW_COPY_AND_ASSIGN(SyncPromoUI); |
23 }; | 32 }; |
24 | 33 |
25 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_UI_H_ | 34 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_UI_H_ |
OLD | NEW |