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/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // It can be empty. | 94 // It can be empty. |
95 OneClickSigninSyncStarter(Profile* profile, | 95 OneClickSigninSyncStarter(Profile* profile, |
96 Browser* browser, | 96 Browser* browser, |
97 const std::string& gaia_id, | 97 const std::string& gaia_id, |
98 const std::string& email, | 98 const std::string& email, |
99 const std::string& password, | 99 const std::string& password, |
100 const std::string& refresh_token, | 100 const std::string& refresh_token, |
101 StartSyncMode start_mode, | 101 StartSyncMode start_mode, |
102 content::WebContents* web_contents, | 102 content::WebContents* web_contents, |
103 ConfirmationRequired display_confirmation, | 103 ConfirmationRequired display_confirmation, |
| 104 const GURL& current_url, |
104 const GURL& continue_url, | 105 const GURL& continue_url, |
105 Callback callback); | 106 Callback callback); |
106 | 107 |
107 // chrome::BrowserListObserver override. | 108 // chrome::BrowserListObserver override. |
108 void OnBrowserRemoved(Browser* browser) override; | 109 void OnBrowserRemoved(Browser* browser) override; |
109 | 110 |
110 // If the |browser| argument is non-null, returns the pointer directly. | 111 // If the |browser| argument is non-null, returns the pointer directly. |
111 // Otherwise creates a new browser for the given profile on the given | 112 // Otherwise creates a new browser for the given profile on the given |
112 // desktop, adds an empty tab and makes sure the browser is visible. | 113 // desktop, adds an empty tab and makes sure the browser is visible. |
113 static Browser* EnsureBrowser(Browser* browser, | 114 static Browser* EnsureBrowser(Browser* browser, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 219 |
219 // Loads the |continue_url_| in the current tab. | 220 // Loads the |continue_url_| in the current tab. |
220 void LoadContinueUrl(); | 221 void LoadContinueUrl(); |
221 | 222 |
222 Profile* profile_; | 223 Profile* profile_; |
223 Browser* browser_; | 224 Browser* browser_; |
224 scoped_ptr<SigninTracker> signin_tracker_; | 225 scoped_ptr<SigninTracker> signin_tracker_; |
225 StartSyncMode start_mode_; | 226 StartSyncMode start_mode_; |
226 chrome::HostDesktopType desktop_type_; | 227 chrome::HostDesktopType desktop_type_; |
227 ConfirmationRequired confirmation_required_; | 228 ConfirmationRequired confirmation_required_; |
| 229 GURL current_url_; |
228 GURL continue_url_; | 230 GURL continue_url_; |
229 | 231 |
230 // Callback executed when sync setup succeeds or fails. | 232 // Callback executed when sync setup succeeds or fails. |
231 Callback sync_setup_completed_callback_; | 233 Callback sync_setup_completed_callback_; |
232 | 234 |
233 #if defined(ENABLE_CONFIGURATION_POLICY) | 235 #if defined(ENABLE_CONFIGURATION_POLICY) |
234 // Policy credentials we keep while determining whether to create | 236 // Policy credentials we keep while determining whether to create |
235 // a new profile for an enterprise user or not. | 237 // a new profile for an enterprise user or not. |
236 std::string dm_token_; | 238 std::string dm_token_; |
237 std::string client_id_; | 239 std::string client_id_; |
238 #endif | 240 #endif |
239 | 241 |
240 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_; | 242 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_; |
241 | 243 |
242 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); | 244 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); |
243 }; | 245 }; |
244 | 246 |
245 | 247 |
246 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ | 248 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
OLD | NEW |