Commit f6323455 authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

Remove image from ShareToData

This CL removes the image property of the ShareToData class, as it is
never set.

Bug: none
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Idd71cfe674e27705ac674c6e815e790f25a13755
Reviewed-on: https://chromium-review.googlesource.com/1179830Reviewed-by: default avatarPeter Lee <pkl@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584072}
parent 5cfaf0a0
......@@ -239,12 +239,6 @@ NSString* const kActivityServicesSnackbarCategory =
thumbnailGenerator:data.thumbnailGenerator];
[activityItems addObject:loginActionProvider];
if (data.image) {
UIActivityImageSource* imageProvider =
[[UIActivityImageSource alloc] initWithImage:data.image];
[activityItems addObject:imageProvider];
}
return activityItems;
}
......
......@@ -354,33 +354,6 @@ TEST_F(ActivityServiceControllerTest, PresentAndDismissController) {
EXPECT_TRUE(provider.activityServiceDidEndPresentingWasCalled);
}
// Verifies that an UIActivityImageSource is sent to the
// UIActivityViewController if and only if the ShareToData contains an image.
TEST_F(ActivityServiceControllerTest, ActivityItemsForData) {
ActivityServiceController* activityController =
[[ActivityServiceController alloc] init];
// ShareToData does not contain an image, so the result items array will not
// contain an image source.
ShareToData* data =
[[ShareToData alloc] initWithShareURL:GURL("https://chromium.org")
visibleURL:GURL("https://chromium.org")
title:@"foo"
isOriginalTitle:YES
isPagePrintable:YES
isPageSearchable:YES
userAgent:web::UserAgentType::DESKTOP
thumbnailGenerator:DummyThumbnailGeneratorBlock()];
NSArray* items = [activityController activityItemsForData:data];
EXPECT_FALSE(ArrayContainsImageSource(items));
// Adds an image to the ShareToData object and call -activityItemsForData:
// again. Verifies that the result items array contains an image source.
[data setImage:[UIImage imageNamed:@"activity_services_print"]];
items = [activityController activityItemsForData:data];
EXPECT_TRUE(ArrayContainsImageSource(items));
}
// Verifies that when App Extension support is enabled, the URL string is
// passed in a dictionary as part of the Activity Items to the App Extension.
TEST_F(ActivityServiceControllerTest, ActivityItemsForDataWithPasswordAppEx) {
......
......@@ -44,7 +44,6 @@
// Whether FindInPage can be enabled for this page.
@property(nonatomic, readonly, assign) BOOL isPageSearchable;
@property(nonatomic, readonly, assign) web::UserAgentType userAgent;
@property(nonatomic, strong) UIImage* image;
@property(nonatomic, copy) ThumbnailGeneratorBlock thumbnailGenerator;
@end
......
......@@ -25,7 +25,6 @@
@implementation ShareToData
@synthesize title = _title;
@synthesize image = image_;
@synthesize thumbnailGenerator = _thumbnailGenerator;
@synthesize isOriginalTitle = _isOriginalTitle;
@synthesize isPagePrintable = _isPagePrintable;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment