Chromium Code Reviews| Index: chrome/browser/ui/webui/options/browser_options_handler.cc |
| diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc |
| index cd57df8b39c8fab3e056cdae1156136aeb1c2a7d..3a2db0a7379b7993e0e0cfd1cb5088aa9f1809b2 100644 |
| --- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
| +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
| @@ -383,6 +383,9 @@ void BrowserOptionsHandler::AddStartupPage(const ListValue* args) { |
| CHECK(args->GetString(0, &url_string)); |
| GURL url = URLFixerUpper::FixupURL(url_string, std::string()); |
| + // Invalid urls should not be added to the list. http://crbug.com/100658. |
| + if (url.spec().empty()) |
|
csilv
2011/10/19 18:49:48
I think url.is_valid() would be a better choice he
rosen.dash
2011/10/20 06:31:25
Done.
|
| + return; |
| int index = startup_custom_pages_table_model_->RowCount(); |
| startup_custom_pages_table_model_->Add(index, url); |
| SaveStartupPagesPref(); |