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

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

Issue 562233002: Don't allow creating a profile with an empty name in chrome://settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added empty string checks Created 6 years, 3 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/create_profile_handler.cc
diff --git a/chrome/browser/ui/webui/options/create_profile_handler.cc b/chrome/browser/ui/webui/options/create_profile_handler.cc
index 8d722e7349a54212a053127cbdb408f95caad431..135c8763c587f24968ab29f103e1a54bbc548453 100644
--- a/chrome/browser/ui/webui/options/create_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/create_profile_handler.cc
@@ -82,6 +82,7 @@ void CreateProfileHandler::CreateProfile(const base::ListValue* args) {
bool supervised_user = false;
if (args->GetString(0, &name) && args->GetString(1, &icon)) {
base::TrimWhitespace(name, base::TRIM_ALL, &name);
+ CHECK(!name.empty());
if (args->GetBoolean(2, &create_shortcut)) {
bool success = args->GetBoolean(3, &supervised_user);
DCHECK(success);

Powered by Google App Engine
This is Rietveld 408576698