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

Side by Side Diff: chrome/browser/cocoa/bookmark_editor_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_editor_controller.h" 5 #import "chrome/browser/cocoa/bookmark_editor_controller.h"
6 #include "app/l10n_util.h" 6 #include "app/l10n_util.h"
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "chrome/browser/bookmarks/bookmark_model.h" 9 #include "chrome/browser/bookmarks/bookmark_model.h"
10 10
(...skipping 30 matching lines...) Expand all
41 41
42 - (void)dealloc { 42 - (void)dealloc {
43 [displayURL_ release]; 43 [displayURL_ release];
44 [super dealloc]; 44 [super dealloc];
45 } 45 }
46 46
47 - (void)awakeFromNib { 47 - (void)awakeFromNib {
48 // Set text fields to match our bookmark. If the node is NULL we 48 // Set text fields to match our bookmark. If the node is NULL we
49 // arrived here from an "Add Page..." item in a context menu. 49 // arrived here from an "Add Page..." item in a context menu.
50 if (node_) { 50 if (node_) {
51 [self setInitialName:base::SysWideToNSString(node_->GetTitle())]; 51 [self setInitialName:base::SysUTF16ToNSString(node_->GetTitleAsString16())];
52 std::string url_string = node_->GetURL().possibly_invalid_spec(); 52 std::string url_string = node_->GetURL().possibly_invalid_spec();
53 initialUrl_.reset([[NSString stringWithUTF8String:url_string.c_str()] 53 initialUrl_.reset([[NSString stringWithUTF8String:url_string.c_str()]
54 retain]); 54 retain]);
55 } else { 55 } else {
56 initialUrl_.reset([@"" retain]); 56 initialUrl_.reset([@"" retain]);
57 } 57 }
58 [self setDisplayURL:initialUrl_]; 58 [self setDisplayURL:initialUrl_];
59 [super awakeFromNib]; 59 [super awakeFromNib];
60 } 60 }
61 61
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 return [NSNumber numberWithBool:YES]; 134 return [NSNumber numberWithBool:YES];
135 } 135 }
136 136
137 - (NSColor *)urlFieldColor { 137 - (NSColor *)urlFieldColor {
138 return [urlField_ backgroundColor]; 138 return [urlField_ backgroundColor];
139 } 139 }
140 140
141 @end // BookmarkEditorController 141 @end // BookmarkEditorController
142 142
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_editor_base_controller.mm ('k') | chrome/browser/cocoa/bookmark_editor_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698