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

Unified Diff: chrome/browser/dom_ui/options/options_ui.cc

Issue 6269015: Add facility to fix about: and file: links from chrome:// pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git add Created 9 years, 11 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
Index: chrome/browser/dom_ui/options/options_ui.cc
diff --git a/chrome/browser/dom_ui/options/options_ui.cc b/chrome/browser/dom_ui/options/options_ui.cc
index fcc3b8062e69dbaa1f57eacbbf13eb0e9e86300d..ffd8d78ac73ffff9dfbc54ea85c93a4a5b2ef049 100644
--- a/chrome/browser/dom_ui/options/options_ui.cc
+++ b/chrome/browser/dom_ui/options/options_ui.cc
@@ -214,8 +214,8 @@ OptionsUI::OptionsUI(TabContents* contents) : DOMUI(contents) {
OptionsUI::~OptionsUI() {
// Uninitialize all registered handlers. The base class owns them and it will
- // eventually delete them.
- for (std::vector<DOMMessageHandler*>::iterator iter = handlers_.begin();
+ // eventually delete them. Skip over the generic handler.
arv (Not doing code reviews) 2011/01/21 23:07:32 Why?
Evan Stade 2011/01/21 23:41:35 uninitialize is a function of OptionsPageUIHandler
+ for (std::vector<DOMMessageHandler*>::iterator iter = handlers_.begin() + 1;
iter != handlers_.end();
++iter) {
static_cast<OptionsPageUIHandler*>(*iter)->Uninitialize();
@@ -259,7 +259,8 @@ void OptionsUI::InitializeHandlers() {
DCHECK(!GetProfile()->IsOffTheRecord());
std::vector<DOMMessageHandler*>::iterator iter;
- for (iter = handlers_.begin(); iter != handlers_.end(); ++iter) {
+ // Skip over the generic handler.
+ for (iter = handlers_.begin() + 1; iter != handlers_.end(); ++iter) {
(static_cast<OptionsPageUIHandler*>(*iter))->Initialize();
}
}

Powered by Google App Engine
This is Rietveld 408576698