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

Unified Diff: chrome/browser/sync/avatar_sync_error.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: Prototype 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/sync/avatar_sync_error.h
diff --git a/chrome/browser/sync/avatar_sync_error.h b/chrome/browser/sync/avatar_sync_error.h
new file mode 100644
index 0000000000000000000000000000000000000000..495741e2b0978a5b70a743147f57edf5fa50a5b9
--- /dev/null
+++ b/chrome/browser/sync/avatar_sync_error.h
@@ -0,0 +1,33 @@
+// 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_SYNC_AVATAR_SYNC_ERROR_H_
+#define CHROME_BROWSER_SYNC_AVATAR_SYNC_ERROR_H_
+
+#include "components/sync_driver/sync_error_controller.h"
+
+class Profile;
+
+// Keep track of sync errors that are worth elevating to the user and expose
+// them to observers in the avatar button UI.
+class AvatarSyncError : public SyncErrorController::Observer {
Roger Tawa OOO till Jul 10th 2016/07/26 14:34:24 Rename to AvatarSyncErrorController might be bette
Jane 2016/07/26 17:31:17 Done.
+ public:
+ explicit AvatarSyncError(Profile* profile);
+ ~AvatarSyncError() override;
+
+ // SyncErrorController::Observer:
+ void OnErrorChanged() override;
+
+ bool HasSyncError() { return has_sync_error_; }
Roger Tawa OOO till Jul 10th 2016/07/26 14:34:24 According to style guide this method should be nam
Jane 2016/07/26 17:31:17 Done.
+
+ private:
+ SyncErrorController* GetSyncErrorControllerIfNeeded(Profile* profile);
+
+ Profile* profile_;
+ bool has_sync_error_;
+
+ DISALLOW_COPY_AND_ASSIGN(AvatarSyncError);
+};
+
+#endif // CHROME_BROWSER_SYNC_AVATAR_SYNC_ERROR_H_
« no previous file with comments | « no previous file | chrome/browser/sync/avatar_sync_error.cc » ('j') | chrome/browser/ui/views/profiles/new_avatar_button.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698