| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class Browser; | 22 class Browser; |
| 23 | 23 |
| 24 namespace browser_sync { | 24 namespace browser_sync { |
| 25 class ProfileSyncService; | 25 class ProfileSyncService; |
| 26 } // namespace browser_sync | 26 } // namespace browser_sync |
| 27 | 27 |
| 28 namespace content { | 28 namespace content { |
| 29 class WebContents; | 29 class WebContents; |
| 30 } // namespace content | 30 } // namespace content |
| 31 | 31 |
| 32 namespace syncer { | 32 namespace sync_driver { |
| 33 class SyncSetupInProgressHandle; | 33 class SyncSetupInProgressHandle; |
| 34 } // namespace syncer | 34 } // namespace sync_driver |
| 35 | 35 |
| 36 // Waits for successful sign-in notification from the signin manager and then | 36 // Waits for successful sign-in notification from the signin manager and then |
| 37 // starts the sync machine. Instances of this class delete themselves once | 37 // starts the sync machine. Instances of this class delete themselves once |
| 38 // the job is done. | 38 // the job is done. |
| 39 class OneClickSigninSyncStarter : public SigninTracker::Observer, | 39 class OneClickSigninSyncStarter : public SigninTracker::Observer, |
| 40 public chrome::BrowserListObserver, | 40 public chrome::BrowserListObserver, |
| 41 public content::WebContentsObserver, | 41 public content::WebContentsObserver, |
| 42 public LoginUIService::Observer { | 42 public LoginUIService::Observer { |
| 43 public: | 43 public: |
| 44 enum StartSyncMode { | 44 enum StartSyncMode { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // a new profile for an enterprise user or not. | 239 // a new profile for an enterprise user or not. |
| 240 std::string dm_token_; | 240 std::string dm_token_; |
| 241 std::string client_id_; | 241 std::string client_id_; |
| 242 | 242 |
| 243 // This only cares about the first AccountAddedToCookie event. Since | 243 // This only cares about the first AccountAddedToCookie event. Since |
| 244 // SigninTracker always expects an observer, this object will just disregard | 244 // SigninTracker always expects an observer, this object will just disregard |
| 245 // following AccountAddedToCookie calls triggered by account reconciliation. | 245 // following AccountAddedToCookie calls triggered by account reconciliation. |
| 246 bool first_account_added_to_cookie_; | 246 bool first_account_added_to_cookie_; |
| 247 | 247 |
| 248 // Prevents Sync from running until configuration is complete. | 248 // Prevents Sync from running until configuration is complete. |
| 249 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; | 249 std::unique_ptr<sync_driver::SyncSetupInProgressHandle> sync_blocker_; |
| 250 | 250 |
| 251 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_; | 251 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_; |
| 252 | 252 |
| 253 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); | 253 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 | 256 |
| 257 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ | 257 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
| OLD | NEW |