OLD | NEW |
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_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ | 5 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ | 6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 // Displays confirmation UI to the user if confirmation_required_ == | 110 // Displays confirmation UI to the user if confirmation_required_ == |
111 // CONFIRM_UNTRUSTED_SIGNIN, otherwise completes the pending signin process. | 111 // CONFIRM_UNTRUSTED_SIGNIN, otherwise completes the pending signin process. |
112 void ConfirmAndSignin(); | 112 void ConfirmAndSignin(); |
113 | 113 |
114 // Callback invoked once the user has responded to the signin confirmation UI. | 114 // Callback invoked once the user has responded to the signin confirmation UI. |
115 // If response == UNDO_SYNC, the signin is cancelled, otherwise the pending | 115 // If response == UNDO_SYNC, the signin is cancelled, otherwise the pending |
116 // signin is completed. | 116 // signin is completed. |
117 void UntrustedSigninConfirmed(StartSyncMode response); | 117 void UntrustedSigninConfirmed(StartSyncMode response); |
118 | 118 |
| 119 // GetProfileSyncService returns non-NULL pointer if sync is enabled. |
| 120 // There is a scenario when when ProfileSyncService discovers that sync is |
| 121 // disabled during setup. In this case GetProfileSyncService will return NULL, |
| 122 // but we still need to call PSS::SetSetupInProgress(false). For this purpose |
| 123 // call FinishProfileSyncServiceSetup() function. |
119 ProfileSyncService* GetProfileSyncService(); | 124 ProfileSyncService* GetProfileSyncService(); |
120 | 125 |
| 126 void FinishProfileSyncServiceSetup(); |
| 127 |
121 // Displays the sync configuration UI. | 128 // Displays the sync configuration UI. |
122 void ConfigureSync(); | 129 void ConfigureSync(); |
123 void ShowSyncSettingsPageOnSameTab(); | 130 void ShowSyncSettingsPageOnSameTab(); |
124 | 131 |
125 // Shows the post-signin confirmation bubble. If |custom_message| is empty, | 132 // Shows the post-signin confirmation bubble. If |custom_message| is empty, |
126 // the default "You are signed in" message is displayed. | 133 // the default "You are signed in" message is displayed. |
127 void DisplayFinalConfirmationBubble(const string16& custom_message); | 134 void DisplayFinalConfirmationBubble(const string16& custom_message); |
128 | 135 |
129 // Makes sure browser_ points to a valid browser (opens a new browser if | 136 // Makes sure browser_ points to a valid browser (opens a new browser if |
130 // necessary). Useful in the case where the user has created a new Profile as | 137 // necessary). Useful in the case where the user has created a new Profile as |
(...skipping 13 matching lines...) Expand all Loading... |
144 // CloudPolicyClient reference we keep while determining whether to create | 151 // CloudPolicyClient reference we keep while determining whether to create |
145 // a new profile for an enterprise user or not. | 152 // a new profile for an enterprise user or not. |
146 scoped_ptr<policy::CloudPolicyClient> policy_client_; | 153 scoped_ptr<policy::CloudPolicyClient> policy_client_; |
147 #endif | 154 #endif |
148 | 155 |
149 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); | 156 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); |
150 }; | 157 }; |
151 | 158 |
152 | 159 |
153 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ | 160 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
OLD | NEW |