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

Unified Diff: chrome/browser/cocoa/bookmark_all_tabs_controller.mm

Issue 407011: Merge 32441 - Change the folder presentation in the Bookmark Editor and the B... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 11 years, 1 month 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/cocoa/bookmark_all_tabs_controller.mm
===================================================================
--- chrome/browser/cocoa/bookmark_all_tabs_controller.mm (revision 32459)
+++ chrome/browser/cocoa/bookmark_all_tabs_controller.mm (working copy)
@@ -30,9 +30,8 @@
}
- (void)awakeFromNib {
- [self
- setInitialName:
- l10n_util::GetNSStringWithFixup(IDS_BOOMARK_EDITOR_NEW_FOLDER_NAME)];
+ [self setInitialName:
+ l10n_util::GetNSStringWithFixup(IDS_BOOMARK_EDITOR_NEW_FOLDER_NAME)];
[super awakeFromNib];
}
@@ -52,10 +51,10 @@
}
}
-// The the name for the folder into which the tabs will be recorded as
-// bookmarks is assumed to be non-empty. The folder is then created
-// and a bookmark for each open tab added therein.
-- (IBAction)ok:(id)sender {
+// Called by -[BookmarkEditorBaseController ok:]. Creates the container
+// folder for the tabs and then the bookmarks in that new folder.
+// Returns a BOOL as an NSNumber indicating that the commit may proceed.
+- (NSNumber*)didCommit {
NSString* name = [[self displayName] stringByTrimmingCharactersInSet:
[NSCharacterSet newlineCharacterSet]];
std::wstring newTitle = base::SysNSStringToWide(name);
@@ -67,7 +66,7 @@
BookmarkModel* model = [self bookmarkModel];
const BookmarkNode* newFolder = model->AddGroup(newParentNode, newIndex,
newFolderString);
- [self NotifyHandlerCreatedNode:newFolder];
+ [self notifyHandlerCreatedNode:newFolder];
// Get a list of all open tabs, create nodes for them, and add
// to the new folder node.
[self UpdateActiveTabPairs];
@@ -77,9 +76,9 @@
it != activeTabPairsVector_.end(); ++it, ++i) {
const BookmarkNode* node = model->AddURL(newFolder, i,
it->first, it->second);
- [self NotifyHandlerCreatedNode:node];
+ [self notifyHandlerCreatedNode:node];
}
- [super ok:sender];
+ return [NSNumber numberWithBool:YES];
}
- (ActiveTabsNameURLPairVector*)activeTabPairsVector {
« no previous file with comments | « chrome/browser/cocoa/bookmark_all_tabs_controller.h ('k') | chrome/browser/cocoa/bookmark_all_tabs_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698