OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/signin/signin_error_notifier_ash.h" | 5 #include "chrome/browser/signin/signin_error_notifier_ash.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "ash/system/system_notifier.h" | 9 #include "ash/system/system_notifier.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 const char kProfileSigninNotificationId[] = "chrome://settings/signin/"; | 44 const char kProfileSigninNotificationId[] = "chrome://settings/signin/"; |
45 | 45 |
46 // A notification delegate for the sign-out button. | 46 // A notification delegate for the sign-out button. |
47 class SigninNotificationDelegate : public NotificationDelegate { | 47 class SigninNotificationDelegate : public NotificationDelegate { |
48 public: | 48 public: |
49 SigninNotificationDelegate(const std::string& id, | 49 SigninNotificationDelegate(const std::string& id, |
50 Profile* profile); | 50 Profile* profile); |
51 | 51 |
52 // NotificationDelegate: | 52 // NotificationDelegate: |
53 virtual void Display() override; | 53 void Display() override; |
54 virtual void Error() override; | 54 void Error() override; |
55 virtual void Close(bool by_user) override; | 55 void Close(bool by_user) override; |
56 virtual bool HasClickedListener() override; | 56 bool HasClickedListener() override; |
57 virtual void Click() override; | 57 void Click() override; |
58 virtual void ButtonClick(int button_index) override; | 58 void ButtonClick(int button_index) override; |
59 virtual std::string id() const override; | 59 std::string id() const override; |
60 | 60 |
61 protected: | 61 protected: |
62 virtual ~SigninNotificationDelegate(); | 62 ~SigninNotificationDelegate() override; |
63 | 63 |
64 private: | 64 private: |
65 void FixSignIn(); | 65 void FixSignIn(); |
66 | 66 |
67 // Unique id of the notification. | 67 // Unique id of the notification. |
68 const std::string id_; | 68 const std::string id_; |
69 | 69 |
70 Profile* profile_; | 70 Profile* profile_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(SigninNotificationDelegate); | 72 DISALLOW_COPY_AND_ASSIGN(SigninNotificationDelegate); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 return l10n_util::GetStringUTF16( | 233 return l10n_util::GetStringUTF16( |
234 IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_MESSAGE); | 234 IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_MESSAGE); |
235 break; | 235 break; |
236 | 236 |
237 // Generic message for "other" errors. | 237 // Generic message for "other" errors. |
238 default: | 238 default: |
239 return l10n_util::GetStringUTF16( | 239 return l10n_util::GetStringUTF16( |
240 IDS_SYNC_OTHER_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE); | 240 IDS_SYNC_OTHER_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE); |
241 } | 241 } |
242 } | 242 } |
OLD | NEW |