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

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

Issue 9960087: Revert 13676 - Revert 131665 - Add a preference for why an extension is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/extension_settings_handler.h" 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 576
577 if (enable_str == "true") { 577 if (enable_str == "true") {
578 ExtensionPrefs* prefs = extension_service_->extension_prefs(); 578 ExtensionPrefs* prefs = extension_service_->extension_prefs();
579 if (prefs->DidExtensionEscalatePermissions(extension_id)) { 579 if (prefs->DidExtensionEscalatePermissions(extension_id)) {
580 extensions::ShowExtensionDisabledDialog( 580 extensions::ShowExtensionDisabledDialog(
581 extension_service_, Profile::FromWebUI(web_ui()), extension); 581 extension_service_, Profile::FromWebUI(web_ui()), extension);
582 } else { 582 } else {
583 extension_service_->EnableExtension(extension_id); 583 extension_service_->EnableExtension(extension_id);
584 } 584 }
585 } else { 585 } else {
586 extension_service_->DisableExtension(extension_id); 586 extension_service_->DisableExtension(
587 extension_id, Extension::DISABLE_USER_ACTION);
587 } 588 }
588 } 589 }
589 590
590 void ExtensionSettingsHandler::HandleEnableIncognitoMessage( 591 void ExtensionSettingsHandler::HandleEnableIncognitoMessage(
591 const ListValue* args) { 592 const ListValue* args) {
592 CHECK_EQ(2U, args->GetSize()); 593 CHECK_EQ(2U, args->GetSize());
593 std::string extension_id, enable_str; 594 std::string extension_id, enable_str;
594 CHECK(args->GetString(0, &extension_id)); 595 CHECK(args->GetString(0, &extension_id));
595 CHECK(args->GetString(1, &enable_str)); 596 CHECK(args->GetString(1, &enable_str));
596 const Extension* extension = 597 const Extension* extension =
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 if (!extension_uninstall_dialog_.get()) { 813 if (!extension_uninstall_dialog_.get()) {
813 extension_uninstall_dialog_.reset( 814 extension_uninstall_dialog_.reset(
814 ExtensionUninstallDialog::Create(Profile::FromWebUI(web_ui()), this)); 815 ExtensionUninstallDialog::Create(Profile::FromWebUI(web_ui()), this));
815 } 816 }
816 return extension_uninstall_dialog_.get(); 817 return extension_uninstall_dialog_.get();
817 } 818 }
818 819
819 void ExtensionSettingsHandler::InspectExtensionHost(ExtensionHost* host) { 820 void ExtensionSettingsHandler::InspectExtensionHost(ExtensionHost* host) {
820 DevToolsWindow::OpenDevToolsWindow(host->render_view_host()); 821 DevToolsWindow::OpenDevToolsWindow(host->render_view_host());
821 } 822 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_settings_menu_model.cc ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698