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

Side by Side Diff: chrome/browser/ui/webui/sync_promo/sync_promo_ui.h

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 7 years, 12 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SYNC_PROMO_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_UI_H_
7 7
8 #include "content/public/browser/web_ui_controller.h" 8 #include "content/public/browser/web_ui_controller.h"
9 9
10 class Profile; 10 class Profile;
11 class PrefService; 11 class PrefServiceSyncable;
12 12
13 // The Web UI handler for chrome://signin. 13 // The Web UI handler for chrome://signin.
14 class SyncPromoUI : public content::WebUIController { 14 class SyncPromoUI : public content::WebUIController {
15 public: 15 public:
16 enum Source { 16 enum Source {
17 SOURCE_START_PAGE = 0, // This must be first. 17 SOURCE_START_PAGE = 0, // This must be first.
18 SOURCE_NTP_LINK, 18 SOURCE_NTP_LINK,
19 SOURCE_MENU, 19 SOURCE_MENU,
20 SOURCE_SETTINGS, 20 SOURCE_SETTINGS,
21 SOURCE_UNKNOWN, // This must be last. 21 SOURCE_UNKNOWN, // This must be last.
(...skipping 17 matching lines...) Expand all
39 // Returns true if a user has seen the sync promo at startup previously. 39 // Returns true if a user has seen the sync promo at startup previously.
40 static bool HasShownPromoAtStartup(Profile* profile); 40 static bool HasShownPromoAtStartup(Profile* profile);
41 41
42 // Returns true if the user has previously skipped the sync promo. 42 // Returns true if the user has previously skipped the sync promo.
43 static bool HasUserSkippedSyncPromo(Profile* profile); 43 static bool HasUserSkippedSyncPromo(Profile* profile);
44 44
45 // Registers the fact that the user has skipped the sync promo. 45 // Registers the fact that the user has skipped the sync promo.
46 static void SetUserSkippedSyncPromo(Profile* profile); 46 static void SetUserSkippedSyncPromo(Profile* profile);
47 47
48 // Registers the preferences the Sync Promo UI needs. 48 // Registers the preferences the Sync Promo UI needs.
49 static void RegisterUserPrefs(PrefService* prefs); 49 static void RegisterUserPrefs(PrefServiceSyncable* prefs);
50 50
51 // Returns the sync promo URL wth the given arguments in the query. 51 // Returns the sync promo URL wth the given arguments in the query.
52 // |next_page| is the URL to navigate to when the user completes or skips the 52 // |next_page| is the URL to navigate to when the user completes or skips the
53 // promo. If an empty URL is given then the promo will navigate to the NTP. 53 // promo. If an empty URL is given then the promo will navigate to the NTP.
54 // |source| identifies from where the sync promo is being called, and is used 54 // |source| identifies from where the sync promo is being called, and is used
55 // to record sync promo UMA stats in the context of the source. 55 // to record sync promo UMA stats in the context of the source.
56 // |auto_close| whether to close the sync promo automatically when done. 56 // |auto_close| whether to close the sync promo automatically when done.
57 static GURL GetSyncPromoURL( 57 static GURL GetSyncPromoURL(
58 const GURL& next_page, Source source, bool auto_close); 58 const GURL& next_page, Source source, bool auto_close);
59 59
(...skipping 10 matching lines...) Expand all
70 // Returns true if chrome should use the web-based sign in flow, false if 70 // Returns true if chrome should use the web-based sign in flow, false if
71 // chrome should use the ClientLogin flow. This function will return true 71 // chrome should use the ClientLogin flow. This function will return true
72 // only for platforms where |ENABLE_ONE_CLICK_SIGNIN| is defined. 72 // only for platforms where |ENABLE_ONE_CLICK_SIGNIN| is defined.
73 static bool UseWebBasedSigninFlow(); 73 static bool UseWebBasedSigninFlow();
74 74
75 private: 75 private:
76 DISALLOW_COPY_AND_ASSIGN(SyncPromoUI); 76 DISALLOW_COPY_AND_ASSIGN(SyncPromoUI);
77 }; 77 };
78 78
79 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_UI_H_ 79 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_PROMO_SYNC_PROMO_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc ('k') | chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698