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