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

Side by Side Diff: ios/chrome/browser/share_extension/share_extension_item_receiver.mm

Issue 2588683002: Disable Share extension item receiver if there is no app group. (Closed)
Patch Set: Created 4 years 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 | « no previous file | 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 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 [[ShareExtensionItemReceiver alloc] init]; 91 [[ShareExtensionItemReceiver alloc] init];
92 return instance; 92 return instance;
93 } 93 }
94 94
95 - (void)setBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel 95 - (void)setBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel
96 readingListModel:(ReadingListModel*)readingListModel { 96 readingListModel:(ReadingListModel*)readingListModel {
97 DCHECK_CURRENTLY_ON(web::WebThread::UI); 97 DCHECK_CURRENTLY_ON(web::WebThread::UI);
98 DCHECK(!_readingListModel); 98 DCHECK(!_readingListModel);
99 DCHECK(!_bookmarkModel); 99 DCHECK(!_bookmarkModel);
100 100
101 #if TARGET_IPHONE_SIMULATOR
rohitrao (ping after 24h) 2016/12/19 09:40:33 We're running egtests on devices as well, that's w
sdefresne 2016/12/20 01:03:38 I think we should try to get the entitlements for
102 if (![self presentedItemURL]) { 101 if (![self presentedItemURL]) {
103 return; 102 return;
104 } 103 }
105 #else
106 DCHECK([self presentedItemURL]);
107 #endif
108 104
109 _readingListModel = readingListModel; 105 _readingListModel = readingListModel;
110 _bookmarkModel = bookmarkModel; 106 _bookmarkModel = bookmarkModel;
111 107
112 web::WebThread::PostTask(web::WebThread::FILE, FROM_HERE, 108 web::WebThread::PostTask(web::WebThread::FILE, FROM_HERE,
113 base::BindBlockArc(^() { 109 base::BindBlockArc(^() {
114 [self createReadingListFolder]; 110 [self createReadingListFolder];
115 })); 111 }));
116 [[NSNotificationCenter defaultCenter] 112 [[NSNotificationCenter defaultCenter]
117 addObserver:self 113 addObserver:self
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 342
347 - (NSOperationQueue*)presentedItemOperationQueue { 343 - (NSOperationQueue*)presentedItemOperationQueue {
348 return [NSOperationQueue mainQueue]; 344 return [NSOperationQueue mainQueue];
349 } 345 }
350 346
351 - (NSURL*)presentedItemURL { 347 - (NSURL*)presentedItemURL {
352 return app_group::ShareExtensionItemsFolder(); 348 return app_group::ShareExtensionItemsFolder();
353 } 349 }
354 350
355 @end 351 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698