| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
| 6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/signin/signin_tracker.h" |
| 10 |
| 11 class Profile; |
| 12 |
| 13 // Waits for successful singin notification from the signin manager and then |
| 14 // starts the sync machine. Instances of this class delete themselves once |
| 15 // the job is done. |
| 16 class OneClickSigninSyncStarter : public SigninTracker::Observer { |
| 17 public: |
| 18 OneClickSigninSyncStarter(const std::string& email, |
| 19 const std::string& password, |
| 20 Profile* profile, |
| 21 bool use_default_settings); |
| 22 |
| 23 private: |
| 24 ~OneClickSigninSyncStarter(); |
| 25 |
| 26 // content::SigninTracker::Observer override. |
| 27 virtual void GaiaCredentialsValid() OVERRIDE; |
| 28 virtual void SigninFailed() OVERRIDE; |
| 29 virtual void SigninSuccess() OVERRIDE; |
| 30 |
| 31 Profile* profile_; |
| 32 SigninTracker signin_tracker_; |
| 33 bool use_default_settings_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); |
| 36 }; |
| 37 |
| 38 |
| 39 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
| OLD | NEW |