| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ios/chrome/browser/share_extension/share_extension_item_receiver.h" | 5 #import "ios/chrome/browser/share_extension/share_extension_item_receiver.h" |
| 6 | 6 |
| 7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
| 8 | 8 |
| 9 #include "base/ios/block_types.h" | 9 #include "base/ios/block_types.h" |
| 10 #include "base/mac/bind_objc_block.h" | 10 #include "base/mac/bind_objc_block.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 [entryType integerValue]); | 213 [entryType integerValue]); |
| 214 if (type == app_group::READING_LIST_ITEM) { | 214 if (type == app_group::READING_LIST_ITEM) { |
| 215 LogHistogramReceivedItem(READINGLIST_ENTRY); | 215 LogHistogramReceivedItem(READINGLIST_ENTRY); |
| 216 _readingListModel->AddEntry(entryURL, | 216 _readingListModel->AddEntry(entryURL, |
| 217 entryTitle); | 217 entryTitle); |
| 218 } | 218 } |
| 219 if (type == app_group::BOOKMARK_ITEM) { | 219 if (type == app_group::BOOKMARK_ITEM) { |
| 220 LogHistogramReceivedItem(BOOKMARK_ENTRY); | 220 LogHistogramReceivedItem(BOOKMARK_ENTRY); |
| 221 _bookmarkModel->AddURL( | 221 _bookmarkModel->AddURL( |
| 222 _bookmarkModel->mobile_node(), 0, | 222 _bookmarkModel->mobile_node(), 0, |
| 223 base::ASCIIToUTF16(entryTitle), entryURL); | 223 base::UTF8ToUTF16(entryTitle), entryURL); |
| 224 } | 224 } |
| 225 if (completion) { | 225 if (completion) { |
| 226 web::WebThread::PostTask(web::WebThread::FILE, | 226 web::WebThread::PostTask(web::WebThread::FILE, |
| 227 FROM_HERE, | 227 FROM_HERE, |
| 228 base::BindBlockArc(^() { | 228 base::BindBlockArc(^() { |
| 229 completion(); | 229 completion(); |
| 230 })); | 230 })); |
| 231 } | 231 } |
| 232 })); | 232 })); |
| 233 return YES; | 233 return YES; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 342 |
| 343 - (NSOperationQueue*)presentedItemOperationQueue { | 343 - (NSOperationQueue*)presentedItemOperationQueue { |
| 344 return [NSOperationQueue mainQueue]; | 344 return [NSOperationQueue mainQueue]; |
| 345 } | 345 } |
| 346 | 346 |
| 347 - (NSURL*)presentedItemURL { | 347 - (NSURL*)presentedItemURL { |
| 348 return app_group::ShareExtensionItemsFolder(); | 348 return app_group::ShareExtensionItemsFolder(); |
| 349 } | 349 } |
| 350 | 350 |
| 351 @end | 351 @end |
| OLD | NEW |