Chromium Code Reviews| 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_CHROMEOS_LOGIN_LOGIN_UTILS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 // Before WebUI login (Up to R14) the caller owned the returned | 82 // Before WebUI login (Up to R14) the caller owned the returned |
| 83 // Authenticator instance and had to delete it when done. | 83 // Authenticator instance and had to delete it when done. |
| 84 // New instance was created on each new login attempt. | 84 // New instance was created on each new login attempt. |
| 85 // Starting with WebUI login (R15) single Authenticator instance is used for | 85 // Starting with WebUI login (R15) single Authenticator instance is used for |
| 86 // entire login process, even for multiple retries. Authenticator instance | 86 // entire login process, even for multiple retries. Authenticator instance |
| 87 // holds reference to login profile and is later used during fetching of | 87 // holds reference to login profile and is later used during fetching of |
| 88 // OAuth tokens. | 88 // OAuth tokens. |
| 89 // TODO(nkostylev): Cleanup after WebUI login migration is complete. | 89 // TODO(nkostylev): Cleanup after WebUI login migration is complete. |
| 90 virtual scoped_refptr<Authenticator> CreateAuthenticator( | 90 virtual scoped_refptr<Authenticator> CreateAuthenticator( |
| 91 LoginStatusConsumer* consumer) = 0; | 91 LoginStatusConsumer* consumer) = 0; |
| 92 | |
| 93 // Initiates process restart if needed. | |
| 94 // |early_restart| is true if this restart attempt happens before user keys | |
|
Nikita (slow)
2014/06/18 12:23:30
nit: Before user profile is fully initialized.
Alexander Alekseev
2014/06/18 15:06:55
Done.
| |
| 95 // are fully initialized. | |
| 96 // Might not return if restart is possible right now. | |
| 97 // Returns true if restart was scheduled. | |
| 98 // Returns false if no restart is needed, | |
| 99 virtual bool RestartToApplyPerSessionFlagsIfNeed(Profile* profile, | |
| 100 bool early_restart) = 0; | |
| 92 }; | 101 }; |
| 93 | 102 |
| 94 } // namespace chromeos | 103 } // namespace chromeos |
| 95 | 104 |
| 96 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ | 105 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_UTILS_H_ |
| OLD | NEW |