| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/extensions/crashed_extension_infobar.h" | 5 #include "chrome/browser/extensions/crashed_extension_infobar.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | |
| 9 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 11 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| 12 #include "grit/browser_resources.h" | 11 #include "grit/browser_resources.h" |
| 13 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
| 14 #include "grit/theme_resources.h" | 13 #include "grit/theme_resources.h" |
| 14 #include "ui/base/resource/resource_bundle.h" |
| 15 | 15 |
| 16 CrashedExtensionInfoBarDelegate::CrashedExtensionInfoBarDelegate( | 16 CrashedExtensionInfoBarDelegate::CrashedExtensionInfoBarDelegate( |
| 17 TabContents* tab_contents, | 17 TabContents* tab_contents, |
| 18 ExtensionService* extensions_service, | 18 ExtensionService* extensions_service, |
| 19 const Extension* extension) | 19 const Extension* extension) |
| 20 : ConfirmInfoBarDelegate(tab_contents), | 20 : ConfirmInfoBarDelegate(tab_contents), |
| 21 extensions_service_(extensions_service), | 21 extensions_service_(extensions_service), |
| 22 extension_id_(extension->id()), | 22 extension_id_(extension->id()), |
| 23 extension_name_(extension->name()) { | 23 extension_name_(extension->name()) { |
| 24 DCHECK(extensions_service_); | 24 DCHECK(extensions_service_); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 return l10n_util::GetStringUTF16( | 60 return l10n_util::GetStringUTF16( |
| 61 IDS_EXTENSION_CRASHED_INFOBAR_RESTART_BUTTON); | 61 IDS_EXTENSION_CRASHED_INFOBAR_RESTART_BUTTON); |
| 62 } | 62 } |
| 63 return ConfirmInfoBarDelegate::GetButtonLabel(button); | 63 return ConfirmInfoBarDelegate::GetButtonLabel(button); |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool CrashedExtensionInfoBarDelegate::Accept() { | 66 bool CrashedExtensionInfoBarDelegate::Accept() { |
| 67 extensions_service_->ReloadExtension(extension_id_); | 67 extensions_service_->ReloadExtension(extension_id_); |
| 68 return true; | 68 return true; |
| 69 } | 69 } |
| OLD | NEW |