Chromium Code Reviews| Index: chrome/browser/signin/avatar_signin_error_controller.h |
| diff --git a/chrome/browser/signin/avatar_signin_error_controller.h b/chrome/browser/signin/avatar_signin_error_controller.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d199bd2c16fde94bde617993f1b018f65d2c2cf7 |
| --- /dev/null |
| +++ b/chrome/browser/signin/avatar_signin_error_controller.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_SIGNIN_AVATAR_SIGNIN_ERROR_CONTROLLER_H_ |
| +#define CHROME_BROWSER_SIGNIN_AVATAR_SIGNIN_ERROR_CONTROLLER_H_ |
| + |
| +#include "components/signin/core/browser/signin_error_controller.h" |
| + |
| +class Profile; |
| + |
| +// Keeps track of auth errors, which should be exposed to the user in the avatar |
| +// button. |
| +class AvatarSigninErrorController : public SigninErrorController::Observer { |
| + public: |
| + explicit AvatarSigninErrorController(Profile* profile); |
|
sky
2016/07/27 18:17:30
This class and usage of it would be more natural i
Jane
2016/07/27 20:17:49
The rationale of not having NewAvatarButton direct
sky
2016/07/27 21:42:54
I missed that the two classes are implementing dif
Jane
2016/07/29 13:53:46
Yes, these two classes are for avatar button (linu
|
| + ~AvatarSigninErrorController() override; |
| + |
| + // SigninErrorController::Observer: |
| + void OnErrorChanged() override; |
| + |
| + bool has_error() { return has_error_; } |
| + |
| + private: |
| + Profile* profile_; |
| + bool has_error_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AvatarSigninErrorController); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_SIGNIN_AVATAR_SIGNIN_ERROR_CONTROLLER_H_ |