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 d7c88a60af9c09853ddcc2ddb72fc909fe8be568..8d722e7349a54212a053127cbdb408f95caad431 100644 |
--- a/chrome/browser/ui/webui/options/create_profile_handler.cc |
+++ b/chrome/browser/ui/webui/options/create_profile_handler.cc |
@@ -8,6 +8,7 @@ |
#include "base/files/file_path.h" |
#include "base/metrics/histogram.h" |
#include "base/prefs/pref_service.h" |
+#include "base/strings/string_util.h" |
#include "base/value_conversions.h" |
#include "base/values.h" |
#include "chrome/browser/browser_process.h" |
@@ -80,6 +81,7 @@ void CreateProfileHandler::CreateProfile(const base::ListValue* args) { |
bool create_shortcut = false; |
bool supervised_user = false; |
if (args->GetString(0, &name) && args->GetString(1, &icon)) { |
+ base::TrimWhitespace(name, base::TRIM_ALL, &name); |
Dan Beam
2014/09/11 17:54:08
CHECK(!name.empty());
noms (inactive)
2014/09/15 21:12:26
Done in https://codereview.chromium.org/562233002.
|
if (args->GetBoolean(2, &create_shortcut)) { |
bool success = args->GetBoolean(3, &supervised_user); |
DCHECK(success); |