| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SYNC_SYNC_PROMO_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_SYNC_SYNC_PROMO_UI_H_ |
| 6 #define CHROME_BROWSER_UI_SYNC_SYNC_PROMO_UI_H_ | 6 #define CHROME_BROWSER_UI_SYNC_SYNC_PROMO_UI_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // Please keep this in sync with enums in sync_promo_trial.cc. | 22 // Please keep this in sync with enums in sync_promo_trial.cc. |
| 23 enum Source { | 23 enum Source { |
| 24 SOURCE_START_PAGE = 0, // This must be first. | 24 SOURCE_START_PAGE = 0, // This must be first. |
| 25 SOURCE_NTP_LINK, | 25 SOURCE_NTP_LINK, |
| 26 SOURCE_MENU, | 26 SOURCE_MENU, |
| 27 SOURCE_SETTINGS, | 27 SOURCE_SETTINGS, |
| 28 SOURCE_EXTENSION_INSTALL_BUBBLE, | 28 SOURCE_EXTENSION_INSTALL_BUBBLE, |
| 29 SOURCE_WEBSTORE_INSTALL, | 29 SOURCE_WEBSTORE_INSTALL, |
| 30 SOURCE_APP_LAUNCHER, | 30 SOURCE_APP_LAUNCHER, |
| 31 SOURCE_APPS_PAGE_LINK, | 31 SOURCE_APPS_PAGE_LINK, |
| 32 SOURCE_BOOKMARK_BUBBLE, |
| 32 SOURCE_UNKNOWN, // This must be last. | 33 SOURCE_UNKNOWN, // This must be last. |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 // Returns true if the sync promo should be visible. | 36 // Returns true if the sync promo should be visible. |
| 36 // |profile| is the profile of the tab the promo would be shown on. | 37 // |profile| is the profile of the tab the promo would be shown on. |
| 37 static bool ShouldShowSyncPromo(Profile* profile); | 38 static bool ShouldShowSyncPromo(Profile* profile); |
| 38 | 39 |
| 39 // Returns true if we should show the sync promo at startup. | 40 // Returns true if we should show the sync promo at startup. |
| 40 static bool ShouldShowSyncPromoAtStartup(Profile* profile, | 41 static bool ShouldShowSyncPromoAtStartup(Profile* profile, |
| 41 bool is_new_profile); | 42 bool is_new_profile); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 static bool IsContinueUrlForWebBasedSigninFlow(const GURL& url); | 82 static bool IsContinueUrlForWebBasedSigninFlow(const GURL& url); |
| 82 | 83 |
| 83 // Forces UseWebBasedSigninFlow() to return true when set; used in tests only. | 84 // Forces UseWebBasedSigninFlow() to return true when set; used in tests only. |
| 84 static void ForceWebBasedSigninFlowForTesting(bool force); | 85 static void ForceWebBasedSigninFlowForTesting(bool force); |
| 85 | 86 |
| 86 private: | 87 private: |
| 87 DISALLOW_COPY_AND_ASSIGN(SyncPromoUI); | 88 DISALLOW_COPY_AND_ASSIGN(SyncPromoUI); |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 #endif // CHROME_BROWSER_UI_SYNC_SYNC_PROMO_UI_H_ | 91 #endif // CHROME_BROWSER_UI_SYNC_SYNC_PROMO_UI_H_ |
| OLD | NEW |