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

Side by Side Diff: chrome/browser/cocoa/applescript/bookmark_node_applescript.mm

Issue 3142030: Remove wstrings from bookmarks, part 6. (Closed)
Patch Set: fix views and tests 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/applescript/bookmark_node_applescript.h" 5 #import "chrome/browser/cocoa/applescript/bookmark_node_applescript.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #import "base/scoped_nsobject.h" 9 #import "base/scoped_nsobject.h"
10 #import "chrome/browser/app_controller_mac.h" 10 #import "chrome/browser/app_controller_mac.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // temp title. 92 // temp title.
93 if (!bookmarkNode_) { 93 if (!bookmarkNode_) {
94 [self setTempTitle:aTitle]; 94 [self setTempTitle:aTitle];
95 return; 95 return;
96 } 96 }
97 97
98 BookmarkModel* model = [self bookmarkModel]; 98 BookmarkModel* model = [self bookmarkModel];
99 if (!model) 99 if (!model)
100 return; 100 return;
101 101
102 model->SetTitle(bookmarkNode_, base::SysNSStringToWide(aTitle)); 102 model->SetTitle(bookmarkNode_, base::SysNSStringToUTF16(aTitle));
103 } 103 }
104 104
105 - (BookmarkModel*)bookmarkModel { 105 - (BookmarkModel*)bookmarkModel {
106 AppController* appDelegate = [NSApp delegate]; 106 AppController* appDelegate = [NSApp delegate];
107 107
108 Profile* defaultProfile = [appDelegate defaultProfile]; 108 Profile* defaultProfile = [appDelegate defaultProfile];
109 if (!defaultProfile) { 109 if (!defaultProfile) {
110 AppleScript::SetError(AppleScript::errGetProfile); 110 AppleScript::SetError(AppleScript::errGetProfile);
111 return NULL; 111 return NULL;
112 } 112 }
113 113
114 BookmarkModel* model = defaultProfile->GetBookmarkModel(); 114 BookmarkModel* model = defaultProfile->GetBookmarkModel();
115 if (!model->IsLoaded()) { 115 if (!model->IsLoaded()) {
116 AppleScript::SetError(AppleScript::errBookmarkModelLoad); 116 AppleScript::SetError(AppleScript::errBookmarkModelLoad);
117 return NULL; 117 return NULL;
118 } 118 }
119 119
120 return model; 120 return model;
121 } 121 }
122 122
123 @end 123 @end
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model.cc ('k') | chrome/browser/cocoa/bookmark_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698