| Index: chrome/browser/sync/avatar_sync_error_controller.h
|
| diff --git a/chrome/browser/sync/avatar_sync_error_controller.h b/chrome/browser/sync/avatar_sync_error_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..10e14d8a0e4fec220c686ca4daa19b84dc6911cf
|
| --- /dev/null
|
| +++ b/chrome/browser/sync/avatar_sync_error_controller.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_CONTROLLER_H_
|
| +#define CHROME_BROWSER_SYNC_AVATAR_SYNC_ERROR_CONTROLLER_H_
|
| +
|
| +#include "components/sync_driver/sync_error_controller.h"
|
| +
|
| +class Profile;
|
| +
|
| +// Keeps track of the sync errors that should be exposed to the user in the
|
| +// avatar button.
|
| +class AvatarSyncErrorController : public SyncErrorController::Observer {
|
| + public:
|
| + explicit AvatarSyncErrorController(Profile* profile);
|
| + ~AvatarSyncErrorController() override;
|
| +
|
| + // SyncErrorController::Observer:
|
| + void OnErrorChanged() override;
|
| +
|
| + bool has_error() { return has_error_; }
|
| +
|
| + private:
|
| + SyncErrorController* GetSyncErrorControllerIfNeeded(Profile* profile);
|
| +
|
| + Profile* profile_;
|
| + bool has_error_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AvatarSyncErrorController);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_SYNC_AVATAR_SYNC_ERROR_CONTROLLER_H_
|
|
|