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

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

Issue 10823050: Removing instances of profile_->GetBookmarkModel() as part of converting BookmarkModel to a PKS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/cocoa/applescript/bookmark_node_applescript.h" 5 #import "chrome/browser/ui/cocoa/applescript/bookmark_node_applescript.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/memory/scoped_nsobject.h" 8 #import "base/memory/scoped_nsobject.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #import "chrome/browser/app_controller_mac.h" 10 #import "chrome/browser/app_controller_mac.h"
11 #include "chrome/browser/bookmarks/bookmark_model.h" 11 #include "chrome/browser/bookmarks/bookmark_model.h"
12 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
12 #import "chrome/browser/chrome_browser_application_mac.h" 13 #import "chrome/browser/chrome_browser_application_mac.h"
13 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
14 #import "chrome/browser/ui/cocoa/applescript/bookmark_item_applescript.h" 15 #import "chrome/browser/ui/cocoa/applescript/bookmark_item_applescript.h"
15 #import "chrome/browser/ui/cocoa/applescript/error_applescript.h" 16 #import "chrome/browser/ui/cocoa/applescript/error_applescript.h"
16 17
17 @interface BookmarkNodeAppleScript() 18 @interface BookmarkNodeAppleScript()
18 @property (nonatomic, copy) NSString* tempTitle; 19 @property (nonatomic, copy) NSString* tempTitle;
19 @end 20 @end
20 21
21 @implementation BookmarkNodeAppleScript 22 @implementation BookmarkNodeAppleScript
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 112
112 - (BookmarkModel*)bookmarkModel { 113 - (BookmarkModel*)bookmarkModel {
113 AppController* appDelegate = [NSApp delegate]; 114 AppController* appDelegate = [NSApp delegate];
114 115
115 Profile* lastProfile = [appDelegate lastProfile]; 116 Profile* lastProfile = [appDelegate lastProfile];
116 if (!lastProfile) { 117 if (!lastProfile) {
117 AppleScript::SetError(AppleScript::errGetProfile); 118 AppleScript::SetError(AppleScript::errGetProfile);
118 return NULL; 119 return NULL;
119 } 120 }
120 121
121 BookmarkModel* model = lastProfile->GetBookmarkModel(); 122 BookmarkModel* model = BookmarkModelFactory::GetForProfile(lastProfile);
122 if (!model->IsLoaded()) { 123 if (!model->IsLoaded()) {
123 AppleScript::SetError(AppleScript::errBookmarkModelLoad); 124 AppleScript::SetError(AppleScript::errBookmarkModelLoad);
124 return NULL; 125 return NULL;
125 } 126 }
126 127
127 return model; 128 return model;
128 } 129 }
129 130
130 @end 131 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698