Chromium Code Reviews| 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_ |