Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: chrome/browser/signin/avatar_signin_error_controller.h

Issue 2179283002: Refactored signin/sync error controllers for the avatar button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enum name change Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698