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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 virtual void Display() override; |
54 virtual void Error() override; | |
55 virtual void Close(bool by_user) override; | 54 virtual void Close(bool by_user) override; |
56 virtual bool HasClickedListener() override; | 55 virtual bool HasClickedListener() override; |
57 virtual void Click() override; | 56 virtual void Click() override; |
58 virtual void ButtonClick(int button_index) override; | 57 virtual void ButtonClick(int button_index) override; |
59 virtual std::string id() const override; | 58 virtual std::string id() const override; |
60 | 59 |
61 protected: | 60 protected: |
62 virtual ~SigninNotificationDelegate(); | 61 virtual ~SigninNotificationDelegate(); |
63 | 62 |
64 private: | 63 private: |
(...skipping 13 matching lines...) Expand all Loading... |
78 : id_(id), | 77 : id_(id), |
79 profile_(profile) { | 78 profile_(profile) { |
80 } | 79 } |
81 | 80 |
82 SigninNotificationDelegate::~SigninNotificationDelegate() { | 81 SigninNotificationDelegate::~SigninNotificationDelegate() { |
83 } | 82 } |
84 | 83 |
85 void SigninNotificationDelegate::Display() { | 84 void SigninNotificationDelegate::Display() { |
86 } | 85 } |
87 | 86 |
88 void SigninNotificationDelegate::Error() { | |
89 } | |
90 | |
91 void SigninNotificationDelegate::Close(bool by_user) { | 87 void SigninNotificationDelegate::Close(bool by_user) { |
92 } | 88 } |
93 | 89 |
94 bool SigninNotificationDelegate::HasClickedListener() { | 90 bool SigninNotificationDelegate::HasClickedListener() { |
95 return false; | 91 return false; |
96 } | 92 } |
97 | 93 |
98 void SigninNotificationDelegate::Click() { | 94 void SigninNotificationDelegate::Click() { |
99 FixSignIn(); | 95 FixSignIn(); |
100 } | 96 } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 return l10n_util::GetStringUTF16( | 229 return l10n_util::GetStringUTF16( |
234 IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_MESSAGE); | 230 IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_MESSAGE); |
235 break; | 231 break; |
236 | 232 |
237 // Generic message for "other" errors. | 233 // Generic message for "other" errors. |
238 default: | 234 default: |
239 return l10n_util::GetStringUTF16( | 235 return l10n_util::GetStringUTF16( |
240 IDS_SYNC_OTHER_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE); | 236 IDS_SYNC_OTHER_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE); |
241 } | 237 } |
242 } | 238 } |
OLD | NEW |