| 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 virtual void Display() override; |
| 54 virtual void Error() OVERRIDE; | 54 virtual void Error() override; |
| 55 virtual void Close(bool by_user) OVERRIDE; | 55 virtual void Close(bool by_user) override; |
| 56 virtual bool HasClickedListener() OVERRIDE; | 56 virtual bool HasClickedListener() override; |
| 57 virtual void Click() OVERRIDE; | 57 virtual void Click() override; |
| 58 virtual void ButtonClick(int button_index) OVERRIDE; | 58 virtual void ButtonClick(int button_index) override; |
| 59 virtual std::string id() const OVERRIDE; | 59 virtual std::string id() const override; |
| 60 virtual content::WebContents* GetWebContents() const OVERRIDE; | 60 virtual content::WebContents* GetWebContents() const override; |
| 61 | 61 |
| 62 protected: | 62 protected: |
| 63 virtual ~SigninNotificationDelegate(); | 63 virtual ~SigninNotificationDelegate(); |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 void FixSignIn(); | 66 void FixSignIn(); |
| 67 | 67 |
| 68 // Unique id of the notification. | 68 // Unique id of the notification. |
| 69 const std::string id_; | 69 const std::string id_; |
| 70 | 70 |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 return l10n_util::GetStringUTF16( | 238 return l10n_util::GetStringUTF16( |
| 239 IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_MESSAGE); | 239 IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_MESSAGE); |
| 240 break; | 240 break; |
| 241 | 241 |
| 242 // Generic message for "other" errors. | 242 // Generic message for "other" errors. |
| 243 default: | 243 default: |
| 244 return l10n_util::GetStringUTF16( | 244 return l10n_util::GetStringUTF16( |
| 245 IDS_SYNC_OTHER_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE); | 245 IDS_SYNC_OTHER_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE); |
| 246 } | 246 } |
| 247 } | 247 } |
| OLD | NEW |