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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm

Issue 476643002: Bookmark context menu "Add folder..." allows to create folder with empty name(empty string). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bookmark edit menu “New folder" allows to create folder with empty name(empty string). Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm
index e9b1fb915e9c6cee8e0c2f7e1784906da32a9183..405f935ff55f40ab5125c075b5bba91fd5782f2f 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm
@@ -582,9 +582,13 @@ NSString* const kOkEnabledName = @"okEnabled";
for (BookmarkFolderInfo* subFolderInfo in subfolders) {
if ([subFolderInfo newFolder]) {
BookmarkModel* model = [self bookmarkModel];
+ NSString* name = [subFolderInfo folderName];
+ if ([name length] == 0)
+ name =
+ l10n_util::GetNSStringWithFixup(IDS_BOOKMARK_EDITOR_NEW_FOLDER_NAME);
const BookmarkNode* newFolder =
model->AddFolder(parentNode, i,
- base::SysNSStringToUTF16([subFolderInfo folderName]));
+ base::SysNSStringToUTF16(name));
// Update our dictionary with the actual folder node just created.
[subFolderInfo setFolderNode:newFolder];
[subFolderInfo setNewFolder:NO];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698