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

Unified Diff: chrome/browser/ui/webui/options/extension_settings_handler.cc

Issue 9370013: Simplify the handling of crashed extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/extension_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.cc b/chrome/browser/ui/webui/options/extension_settings_handler.cc
index a23106fc2e471a5de1d50b6cd5fa66384a217b81..ddd8f459a88863eb7f31fd51964413ddc1c17029 100644
--- a/chrome/browser/ui/webui/options/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/extension_settings_handler.cc
@@ -179,19 +179,6 @@ void ExtensionSettingsHandler::HandleRequestExtensionsData(
false, false)); // enabled, terminated
}
}
- extensions = extension_service_->terminated_extensions();
- std::vector<ExtensionPage> empty_pages;
- for (ExtensionSet::const_iterator extension = extensions->begin();
- extension != extensions->end(); ++extension) {
- if (ShouldShowExtension(*extension)) {
- extensions_list->Append(CreateExtensionDetailValue(
- extension_service_,
- *extension,
- empty_pages, // Terminated process has no active pages.
- warnings,
- false, true)); // enabled, terminated
- }
- }
results.Set("extensions", extensions_list);
Profile* profile = Profile::FromWebUI(web_ui());
@@ -367,8 +354,6 @@ void ExtensionSettingsHandler::HandleUninstallMessage(const ListValue* args) {
const Extension* extension =
extension_service_->GetExtensionById(extension_id, true);
if (!extension)
- extension = extension_service_->GetTerminatedExtension(extension_id);
- if (!extension)
return;
if (!Extension::UserMayDisable(extension->location())) {
@@ -388,17 +373,10 @@ void ExtensionSettingsHandler::HandleUninstallMessage(const ListValue* args) {
void ExtensionSettingsHandler::ExtensionUninstallAccepted() {
DCHECK(!extension_id_prompting_.empty());
- bool was_terminated = false;
-
// The extension can be uninstalled in another window while the UI was
// showing. Do nothing in that case.
const Extension* extension =
extension_service_->GetExtensionById(extension_id_prompting_, true);
- if (!extension) {
- extension = extension_service_->GetTerminatedExtension(
- extension_id_prompting_);
- was_terminated = true;
- }
if (!extension)
return;
@@ -406,11 +384,6 @@ void ExtensionSettingsHandler::ExtensionUninstallAccepted() {
false, // External uninstall.
NULL); // Error.
extension_id_prompting_ = "";
-
- // There will be no EXTENSION_UNLOADED notification for terminated
- // extensions as they were already unloaded.
- if (was_terminated)
- HandleRequestExtensionsData(NULL);
}
void ExtensionSettingsHandler::ExtensionUninstallCanceled() {
@@ -645,6 +618,7 @@ void ExtensionSettingsHandler::MaybeUpdateAfterNotification() {
}
// Static
+// TODO(aa): Remove |terminated| param. Doesn't seem to be in use.
DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
ExtensionService* service, const Extension* extension,
const std::vector<ExtensionPage>& pages,
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698