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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 // Called to create a new profile, which is then signed in with the | 89 // Called to create a new profile, which is then signed in with the |
90 // in-progress auth credentials currently stored in this object. | 90 // in-progress auth credentials currently stored in this object. |
91 void CreateNewSignedInProfile(); | 91 void CreateNewSignedInProfile(); |
92 | 92 |
93 // Helper function that loads policy with the passed CloudPolicyClient, then | 93 // Helper function that loads policy with the passed CloudPolicyClient, then |
94 // completes the signin process. | 94 // completes the signin process. |
95 void LoadPolicyWithCachedClient(); | 95 void LoadPolicyWithCachedClient(); |
96 | 96 |
97 // Callback invoked once a profile is created, so we can complete the | 97 // Callback invoked once a profile is created, so we can complete the |
98 // credentials transfer and load policy. | 98 // credentials transfer, load policy, and open the first window. |
99 void CompleteSigninForNewProfile(Profile* profile, | 99 void CompleteInitForNewProfile(chrome::HostDesktopType desktop_type, |
100 Profile::CreateStatus status); | 100 Profile* profile, |
| 101 Profile::CreateStatus status); |
101 | 102 |
102 // Cancels the in-progress signin for this profile. | 103 // Cancels the in-progress signin for this profile. |
103 void CancelSigninAndDelete(); | 104 void CancelSigninAndDelete(); |
104 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 105 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
105 | 106 |
106 // Callback invoked to check whether the user needs policy or if a | 107 // Callback invoked to check whether the user needs policy or if a |
107 // confirmation is required (in which case we have to prompt the user first). | 108 // confirmation is required (in which case we have to prompt the user first). |
108 void ConfirmSignin(const std::string& oauth_token); | 109 void ConfirmSignin(const std::string& oauth_token); |
109 | 110 |
110 // Displays confirmation UI to the user if confirmation_required_ == | 111 // Displays confirmation UI to the user if confirmation_required_ == |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // CloudPolicyClient reference we keep while determining whether to create | 145 // CloudPolicyClient reference we keep while determining whether to create |
145 // a new profile for an enterprise user or not. | 146 // a new profile for an enterprise user or not. |
146 scoped_ptr<policy::CloudPolicyClient> policy_client_; | 147 scoped_ptr<policy::CloudPolicyClient> policy_client_; |
147 #endif | 148 #endif |
148 | 149 |
149 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); | 150 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); |
150 }; | 151 }; |
151 | 152 |
152 | 153 |
153 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ | 154 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
OLD | NEW |