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

Side by Side Diff: chrome/browser/ui/panels/panel_settings_menu_model.cc

Issue 8423060: Classification of TODOs in Panel code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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/panels/panel_settings_menu_model.h" 5 #include "chrome/browser/ui/panels/panel_settings_menu_model.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 browser->GetProfile()->GetExtensionProcessManager()->OpenOptionsPage( 84 browser->GetProfile()->GetExtensionProcessManager()->OpenOptionsPage(
85 extension, browser); 85 extension, browser);
86 break; 86 break;
87 case COMMAND_DISABLE: 87 case COMMAND_DISABLE:
88 browser->GetProfile()->GetExtensionService()->DisableExtension( 88 browser->GetProfile()->GetExtensionService()->DisableExtension(
89 extension->id()); 89 extension->id());
90 break; 90 break;
91 case COMMAND_UNINSTALL: 91 case COMMAND_UNINSTALL:
92 // TODO(jianli): Need to handle the case that the extension API requests 92 // TODO(jianli): Need to handle the case that the extension API requests
93 // the panel to be closed when the uninstall dialog is still showing. 93 // the panel to be closed when the uninstall dialog is still showing.
94 // http://crbug.com/102742
94 extension_uninstall_dialog_.reset( 95 extension_uninstall_dialog_.reset(
95 ExtensionUninstallDialog::Create(browser->GetProfile(), this)); 96 ExtensionUninstallDialog::Create(browser->GetProfile(), this));
96 extension_uninstall_dialog_->ConfirmUninstall(extension); 97 extension_uninstall_dialog_->ConfirmUninstall(extension);
97 break; 98 break;
98 case COMMAND_MANAGE: 99 case COMMAND_MANAGE:
99 browser->ShowOptionsTab(chrome::kExtensionsSubPage); 100 browser->ShowOptionsTab(chrome::kExtensionsSubPage);
100 break; 101 break;
101 default: 102 default:
102 NOTREACHED(); 103 NOTREACHED();
103 break; 104 break;
104 } 105 }
105 } 106 }
106 107
107 void PanelSettingsMenuModel::ExtensionUninstallAccepted() { 108 void PanelSettingsMenuModel::ExtensionUninstallAccepted() {
108 const Extension* extension = panel_->GetExtension(); 109 const Extension* extension = panel_->GetExtension();
109 DCHECK(extension); 110 DCHECK(extension);
110 111
111 panel_->browser()->GetProfile()->GetExtensionService()-> 112 panel_->browser()->GetProfile()->GetExtensionService()->
112 UninstallExtension(extension->id(), false, NULL); 113 UninstallExtension(extension->id(), false, NULL);
113 } 114 }
114 115
115 void PanelSettingsMenuModel::ExtensionUninstallCanceled() { 116 void PanelSettingsMenuModel::ExtensionUninstallCanceled() {
116 } 117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698