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

Side by Side Diff: chrome/browser/cocoa/bookmark_name_folder_controller.mm

Issue 3113028: Remove wstrings from bookmarks, part 8. (Closed)
Patch Set: Created 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/cocoa/bookmark_name_folder_controller.h" 5 #import "chrome/browser/cocoa/bookmark_name_folder_controller.h"
6 #include "app/l10n_util.h" 6 #include "app/l10n_util.h"
7 #include "app/l10n_util_mac.h" 7 #include "app/l10n_util_mac.h"
8 #include "base/mac_util.h" 8 #include "base/mac_util.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
(...skipping 14 matching lines...) Expand all
25 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { 25 if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
26 parentWindow_ = window; 26 parentWindow_ = window;
27 profile_ = profile; 27 profile_ = profile;
28 node_ = node; 28 node_ = node;
29 parent_ = parent; 29 parent_ = parent;
30 newIndex_ = newIndex; 30 newIndex_ = newIndex;
31 if (parent) { 31 if (parent) {
32 DCHECK_LE(newIndex, parent->GetChildCount()); 32 DCHECK_LE(newIndex, parent->GetChildCount());
33 } 33 }
34 if (node_) { 34 if (node_) {
35 initialName_.reset([base::SysWideToNSString(node_->GetTitle()) retain]); 35 initialName_.reset(
36 [base::SysUTF16ToNSString(node_->GetTitleAsString16()) retain]);
36 } else { 37 } else {
37 NSString* newString = 38 NSString* newString =
38 l10n_util::GetNSStringWithFixup(IDS_BOOMARK_EDITOR_NEW_FOLDER_NAME); 39 l10n_util::GetNSStringWithFixup(IDS_BOOMARK_EDITOR_NEW_FOLDER_NAME);
39 initialName_.reset([newString retain]); 40 initialName_.reset([newString retain]);
40 } 41 }
41 } 42 }
42 return self; 43 return self;
43 } 44 }
44 45
45 - (id)initWithParentWindow:(NSWindow*)window 46 - (id)initWithParentWindow:(NSWindow*)window
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 114
114 - (void)setFolderName:(NSString*)name { 115 - (void)setFolderName:(NSString*)name {
115 [nameField_ setStringValue:name]; 116 [nameField_ setStringValue:name];
116 } 117 }
117 118
118 - (NSButton*)okButton { 119 - (NSButton*)okButton {
119 return okButton_; 120 return okButton_;
120 } 121 }
121 122
122 @end // BookmarkNameFolderController 123 @end // BookmarkNameFolderController
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm ('k') | chrome/browser/cocoa/cookie_tree_node.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698