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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 8349030: Invalid URLs should not be added to startup page list. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Syncing with codebase. Created 9 years, 2 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
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..668b3a34f8a58a57b1e61146b30ed458f74db6fb 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -383,6 +383,8 @@ void BrowserOptionsHandler::AddStartupPage(const ListValue* args) {
CHECK(args->GetString(0, &url_string));
GURL url = URLFixerUpper::FixupURL(url_string, std::string());
+ if (!url.is_valid())
+ return;
int index = startup_custom_pages_table_model_->RowCount();
startup_custom_pages_table_model_->Add(index, url);
SaveStartupPagesPref();
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698