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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // Returns true if a user has seen the sync promo at startup previously. | 47 // Returns true if a user has seen the sync promo at startup previously. |
48 static bool HasShownPromoAtStartup(Profile* profile); | 48 static bool HasShownPromoAtStartup(Profile* profile); |
49 | 49 |
50 // Returns true if the user has previously skipped the sync promo. | 50 // Returns true if the user has previously skipped the sync promo. |
51 static bool HasUserSkippedSyncPromo(Profile* profile); | 51 static bool HasUserSkippedSyncPromo(Profile* profile); |
52 | 52 |
53 // Registers the fact that the user has skipped the sync promo. | 53 // Registers the fact that the user has skipped the sync promo. |
54 static void SetUserSkippedSyncPromo(Profile* profile); | 54 static void SetUserSkippedSyncPromo(Profile* profile); |
55 | 55 |
56 // Registers the preferences the Sync Promo UI needs. | 56 // Registers the preferences the Sync Promo UI needs. |
57 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 57 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
58 | 58 |
59 // Gets the sync landing page URL. | 59 // Gets the sync landing page URL. |
60 static std::string GetSyncLandingURL(const char* option, int value); | 60 static std::string GetSyncLandingURL(const char* option, int value); |
61 | 61 |
62 // Returns the sync promo URL wth the given arguments in the query. | 62 // Returns the sync promo URL wth the given arguments in the query. |
63 // |source| identifies from where the sync promo is being called, and is used | 63 // |source| identifies from where the sync promo is being called, and is used |
64 // to record sync promo UMA stats in the context of the source. | 64 // to record sync promo UMA stats in the context of the source. |
65 // |auto_close| whether to close the sync promo automatically when done. | 65 // |auto_close| whether to close the sync promo automatically when done. |
66 static GURL GetSyncPromoURL(Source source, bool auto_close); | 66 static GURL GetSyncPromoURL(Source source, bool auto_close); |
67 | 67 |
(...skipping 10 matching lines...) Expand all Loading... |
78 static bool IsContinueUrlForWebBasedSigninFlow(const GURL& url); | 78 static bool IsContinueUrlForWebBasedSigninFlow(const GURL& url); |
79 | 79 |
80 // Forces UseWebBasedSigninFlow() to return true when set; used in tests only. | 80 // Forces UseWebBasedSigninFlow() to return true when set; used in tests only. |
81 static void ForceWebBasedSigninFlowForTesting(bool force); | 81 static void ForceWebBasedSigninFlowForTesting(bool force); |
82 | 82 |
83 private: | 83 private: |
84 DISALLOW_COPY_AND_ASSIGN(SyncPromoUI); | 84 DISALLOW_COPY_AND_ASSIGN(SyncPromoUI); |
85 }; | 85 }; |
86 | 86 |
87 #endif // CHROME_BROWSER_UI_SYNC_SYNC_PROMO_UI_H_ | 87 #endif // CHROME_BROWSER_UI_SYNC_SYNC_PROMO_UI_H_ |
OLD | NEW |