| Index: chrome/browser/extensions/extension_web_ui.cc
|
| diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
|
| index dd401924c0895d1fe5a3ca6792238ed60f6f16f2..67999de390802e0307a557dd49c2c40a28b602ff 100644
|
| --- a/chrome/browser/extensions/extension_web_ui.cc
|
| +++ b/chrome/browser/extensions/extension_web_ui.cc
|
| @@ -332,9 +332,12 @@ void ExtensionWebUI::RegisterChromeURLOverrides(
|
|
|
| // static
|
| void ExtensionWebUI::UnregisterAndReplaceOverride(const std::string& page,
|
| - Profile* profile, ListValue* list, Value* override) {
|
| - int index = list->Remove(*override);
|
| - if (index == 0) {
|
| + Profile* profile,
|
| + ListValue* list,
|
| + Value* override) {
|
| + size_t index = 0;
|
| + bool found = list->Remove(*override, &index);
|
| + if (found && index == 0) {
|
| // This is the active override, so we need to find all existing
|
| // tabs for this override and get them to reload the original URL.
|
| for (TabContentsIterator iterator; !iterator.done(); ++iterator) {
|
|
|