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

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

Issue 1849543006: MD Settings: validate startup URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startup-browser-proxy
Patch Set: compile fix Created 4 years, 9 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/ui/webui/options/startup_pages_handler.cc
diff --git a/chrome/browser/ui/webui/options/startup_pages_handler.cc b/chrome/browser/ui/webui/options/startup_pages_handler.cc
index 44c3a29c1a3ecd5c6fc6d5985a603356fbde2f8f..c2c9acb02713f3e389713f048d05903ec888e36f 100644
--- a/chrome/browser/ui/webui/options/startup_pages_handler.cc
+++ b/chrome/browser/ui/webui/options/startup_pages_handler.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/logging.h"
#include "base/macros.h"
#include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h"
#include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
@@ -168,8 +169,10 @@ void StartupPagesHandler::AddStartupPage(const base::ListValue* args) {
CHECK(args->GetString(0, &url_string));
GURL fixed_url;
- if (!settings_utils::FixupAndValidateStartupPage(url_string, &fixed_url))
+ if (!settings_utils::FixupAndValidateStartupPage(url_string, &fixed_url)) {
+ NOTREACHED();
return;
+ }
int row_count = startup_custom_pages_table_model_->RowCount();
int index;

Powered by Google App Engine
This is Rietveld 408576698