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

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: Made nested classes private 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
« no previous file with comments | « no previous file | chrome/browser/signin/avatar_signin_error_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
sky 2016/07/27 21:42:54 nit: no '(c)', see style guide.
Jane 2016/07/29 13:53:46 Done.
+// 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);
+ ~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_
« no previous file with comments | « no previous file | chrome/browser/signin/avatar_signin_error_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698