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

Side by Side Diff: chrome/browser/views/sync/sync_setup_wizard.h

Issue 160598: Add files to browser/sync. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_VIEWS_SYNC_SYNC_SETUP_WIZARD_H_
6 #define CHROME_BROWSER_VIEWS_SYNC_SYNC_SETUP_WIZARD_H_
7
8 #include "base/basictypes.h"
9
10 class SyncSetupFlowContainer;
11
12 class ProfileSyncService;
13
14 class SyncSetupWizard {
15 public:
16 enum State {
17 GAIA_LOGIN = 0,
18 GAIA_SUCCESS,
19 MERGE_AND_SYNC,
20 DONE
21 };
22
23 explicit SyncSetupWizard(ProfileSyncService* service);
24 ~SyncSetupWizard();
25
26 // Advances the wizard to the specified state if possible, or opens a
27 // new dialog starting at |advance_state|. If the wizard has never ran
28 // through to completion, it will always attempt to do so. Otherwise, e.g
29 // for a transient auth failure, it will just run as far as is necessary
30 // based on |advance_state| (so for auth failure, up to GAIA_SUCCESS).
31 void Step(State advance_state);
32
33 // Whether or not a dialog is currently showing. Useful to determine
34 // if various buttons in the UI should be enabled or disabled.
35 bool IsVisible() const;
36
37 private:
38 // If we just need to pop open an individual dialog, say to collect
39 // gaia credentials in the event of a steady-state auth failure, this is
40 // a "discrete" run (as in not a continuous wizard flow). This returns
41 // the end state to pass to Run for a given |start_state|.
42 static State GetEndStateForDiscreteRun(State start_state);
43
44 ProfileSyncService* service_;
45 SyncSetupFlowContainer* flow_container_;
46
47 DISALLOW_COPY_AND_ASSIGN(SyncSetupWizard);
48 };
49
50 #endif // CHROME_BROWSER_VIEWS_SYNC_SYNC_SETUP_WIZARD_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/sync/sync_setup_flow.cc ('k') | chrome/browser/views/sync/sync_setup_wizard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698