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

Side by Side Diff: chrome/browser/cocoa/cookie_tree_node.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
« no previous file with comments | « chrome/browser/cocoa/bookmark_name_folder_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/cookie_tree_node.h" 5 #import "chrome/browser/cocoa/cookie_tree_node.h"
6 6
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 8
9 @implementation CocoaCookieTreeNode 9 @implementation CocoaCookieTreeNode
10 10
11 - (id)initWithNode:(CookieTreeNode*)node { 11 - (id)initWithNode:(CookieTreeNode*)node {
12 if ((self = [super init])) { 12 if ((self = [super init])) {
13 DCHECK(node); 13 DCHECK(node);
14 treeNode_ = node; 14 treeNode_ = node;
15 [self rebuild]; 15 [self rebuild];
16 } 16 }
17 return self; 17 return self;
18 } 18 }
19 19
20 - (void)rebuild { 20 - (void)rebuild {
21 title_.reset([base::SysWideToNSString(treeNode_->GetTitle()) retain]); 21 title_.reset(
22 [base::SysUTF16ToNSString(treeNode_->GetTitleAsString16()) retain]);
22 children_.reset(); 23 children_.reset();
23 // The tree node assumes ownership of the cookie details object 24 // The tree node assumes ownership of the cookie details object
24 details_.reset([[CocoaCookieDetails createFromCookieTreeNode:(treeNode_)] 25 details_.reset([[CocoaCookieDetails createFromCookieTreeNode:(treeNode_)]
25 retain]); 26 retain]);
26 } 27 }
27 28
28 - (NSString*)title { 29 - (NSString*)title {
29 return title_.get(); 30 return title_.get();
30 } 31 }
31 32
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 @"<CocoaCookieTreeNode @ %p (title=%@, nodeType=%d, childCount=%u)"; 65 @"<CocoaCookieTreeNode @ %p (title=%@, nodeType=%d, childCount=%u)";
65 return [NSString stringWithFormat:format, self, [self title], 66 return [NSString stringWithFormat:format, self, [self title],
66 [self nodeType], [[self children] count]]; 67 [self nodeType], [[self children] count]];
67 } 68 }
68 69
69 - (CocoaCookieDetails*)details { 70 - (CocoaCookieDetails*)details {
70 return details_; 71 return details_;
71 } 72 }
72 73
73 @end 74 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_name_folder_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698