Update V8 to version 4.7.21.
[chromium-blink-merge.git] / chrome / browser / signin / signin_error_notifier_ash.h
blobc371fb336c5750cae10b663fba25ac6a4dc00953
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_ERROR_NOTIFIER_ASH_H_
6 #define CHROME_BROWSER_SIGNIN_SIGNIN_ERROR_NOTIFIER_ASH_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "base/strings/string16.h"
13 #include "components/keyed_service/core/keyed_service.h"
14 #include "components/signin/core/browser/signin_error_controller.h"
16 class Profile;
18 // Shows signin-related errors as notifications in Ash.
19 class SigninErrorNotifier : public SigninErrorController::Observer,
20 public KeyedService {
21 public:
22 SigninErrorNotifier(SigninErrorController* controller, Profile* profile);
23 ~SigninErrorNotifier() override;
25 // KeyedService:
26 void Shutdown() override;
28 // SigninErrorController::Observer:
29 void OnErrorChanged() override;
31 private:
32 base::string16 GetMessageBody() const;
34 // The error controller to query for error details.
35 SigninErrorController* error_controller_;
37 // The Profile this service belongs to.
38 Profile* profile_;
40 // Used to keep track of the message center notification.
41 std::string notification_id_;
43 DISALLOW_COPY_AND_ASSIGN(SigninErrorNotifier);
46 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_ERROR_NOTIFIER_ASH_H_