Index: chrome/browser/ui/webui/options/manage_profile_handler.cc |
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc |
index 41689f80a6da7c7bc0cc5074cfee7277a5f75cda..9bbce8898acda35c55d179954a406857b85f701f 100644 |
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc |
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc |
@@ -9,6 +9,7 @@ |
#include "base/prefs/pref_service.h" |
#include "base/prefs/scoped_user_pref_update.h" |
#include "base/strings/string_number_conversions.h" |
+#include "base/strings/string_util.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/value_conversions.h" |
#include "base/values.h" |
@@ -381,6 +382,7 @@ void ManageProfileHandler::SetProfileIconAndName(const base::ListValue* args) { |
if (!args->GetString(2, &new_profile_name)) |
return; |
+ base::TrimWhitespace(new_profile_name, base::TRIM_ALL, &new_profile_name); |
Dan Beam
2014/09/11 17:54:08
CHECK(!new_profile_name.empty());
noms (inactive)
2014/09/15 21:12:26
Done in https://codereview.chromium.org/562233002.
|
profiles::UpdateProfileName(profile, new_profile_name); |
} |