OLD | NEW |
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_item_applescript.h" | 5 #import "chrome/browser/ui/cocoa/applescript/bookmark_item_applescript.h" |
6 | 6 |
7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
8 #include "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
9 #import "chrome/browser/ui/cocoa/applescript/error_applescript.h" | 9 #import "chrome/browser/ui/cocoa/applescript/error_applescript.h" |
10 #include "components/bookmarks/browser/bookmark_model.h" | 10 #include "components/bookmarks/browser/bookmark_model.h" |
11 | 11 |
12 using bookmarks::BookmarkModel; | 12 using bookmarks::BookmarkModel; |
| 13 using bookmarks::BookmarkNode; |
13 | 14 |
14 @interface BookmarkItemAppleScript() | 15 @interface BookmarkItemAppleScript() |
15 @property (nonatomic, copy) NSString* tempURL; | 16 @property (nonatomic, copy) NSString* tempURL; |
16 @end | 17 @end |
17 | 18 |
18 @implementation BookmarkItemAppleScript | 19 @implementation BookmarkItemAppleScript |
19 | 20 |
20 @synthesize tempURL = tempURL_; | 21 @synthesize tempURL = tempURL_; |
21 | 22 |
22 - (id)init { | 23 - (id)init { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 GURL url(base::SysNSStringToUTF8(aURL)); | 59 GURL url(base::SysNSStringToUTF8(aURL)); |
59 if (!url.is_valid()) { | 60 if (!url.is_valid()) { |
60 AppleScript::SetError(AppleScript::errInvalidURL); | 61 AppleScript::SetError(AppleScript::errInvalidURL); |
61 return; | 62 return; |
62 } | 63 } |
63 | 64 |
64 model->SetURL(bookmarkNode_, url); | 65 model->SetURL(bookmarkNode_, url); |
65 } | 66 } |
66 | 67 |
67 @end | 68 @end |
OLD | NEW |