Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: chrome/browser/ui/webui/options/extension_settings_handler.cc

Issue 7864029: Fix crash in extension settings when trying to enable/disable a crashed extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/webui/options/extension_settings_handler.h" 5 #include "chrome/browser/ui/webui/options/extension_settings_handler.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 l10n_util::GetStringUTF16(IDS_EXTENSIONS_OPTIONS)); 635 l10n_util::GetStringUTF16(IDS_EXTENSIONS_OPTIONS));
636 localized_strings->SetString("extensionSettingsPolicyControlled", 636 localized_strings->SetString("extensionSettingsPolicyControlled",
637 l10n_util::GetStringUTF16(IDS_EXTENSIONS_POLICY_CONTROLLED)); 637 l10n_util::GetStringUTF16(IDS_EXTENSIONS_POLICY_CONTROLLED));
638 localized_strings->SetString("extensionSettingsShowButton", 638 localized_strings->SetString("extensionSettingsShowButton",
639 l10n_util::GetStringUTF16(IDS_EXTENSIONS_SHOW_BUTTON)); 639 l10n_util::GetStringUTF16(IDS_EXTENSIONS_SHOW_BUTTON));
640 localized_strings->SetString("extensionSettingsLoadUnpackedButton", 640 localized_strings->SetString("extensionSettingsLoadUnpackedButton",
641 l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOAD_UNPACKED_BUTTON)); 641 l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOAD_UNPACKED_BUTTON));
642 localized_strings->SetString("extensionSettingsPackButton", 642 localized_strings->SetString("extensionSettingsPackButton",
643 l10n_util::GetStringUTF16(IDS_EXTENSIONS_PACK_BUTTON)); 643 l10n_util::GetStringUTF16(IDS_EXTENSIONS_PACK_BUTTON));
644 localized_strings->SetString("extensionSettingsUpdateButton", 644 localized_strings->SetString("extensionSettingsUpdateButton",
645 l10n_util::GetStringUTF16(IDS_EXTENSIONS_UPDATE_BUTTON)); 645 l10n_util::GetStringUTF16(IDS_EXTENSIONS_UPDATE_BUTTON));
646 localized_strings->SetString("extensionSettingsCrashMessage",
647 l10n_util::GetStringUTF16(IDS_EXTENSIONS_CRASHED_EXTENSION));
648 localized_strings->SetString("extensionSettingsInDevelopment",
649 l10n_util::GetStringUTF16(IDS_EXTENSIONS_IN_DEVELOPMENT));
646 } 650 }
647 651
648 void ExtensionSettingsHandler::Initialize() { 652 void ExtensionSettingsHandler::Initialize() {
649 } 653 }
650 654
651 WebUIMessageHandler* ExtensionSettingsHandler::Attach(WebUI* web_ui) { 655 WebUIMessageHandler* ExtensionSettingsHandler::Attach(WebUI* web_ui) {
652 // Call through to superclass. 656 // Call through to superclass.
653 WebUIMessageHandler* handler = OptionsPageUIHandler::Attach(web_ui); 657 WebUIMessageHandler* handler = OptionsPageUIHandler::Attach(web_ui);
654 658
655 extension_service_ = Profile::FromWebUI(web_ui_) 659 extension_service_ = Profile::FromWebUI(web_ui_)
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 continue; 831 continue;
828 } else if (!extension->web_extent().MatchesURL(url)) { 832 } else if (!extension->web_extent().MatchesURL(url)) {
829 continue; 833 continue;
830 } 834 }
831 835
832 result->push_back( 836 result->push_back(
833 ExtensionPage(url, process->id(), host->routing_id(), 837 ExtensionPage(url, process->id(), host->routing_id(),
834 process->browser_context()->IsOffTheRecord())); 838 process->browser_context()->IsOffTheRecord()));
835 } 839 }
836 } 840 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698