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

Unified Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2637983002: Reading List: Show "Read Later" only on HTTP or HTTPS scheme. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/browser_view_controller.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 6749fc2a2c6904960a6bef19e4f1cf0d71eeb4fb..de5dd7d097893f165dbc1c3deb56d17f57516590 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -2482,19 +2482,19 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
};
[_contextMenuCoordinator addItemWithTitle:title action:action];
}
-
- if (reading_list::switches::IsReadingListEnabled()) {
- NSString* innerText = params.link_text;
- if ([innerText length] > 0) {
- // Add to reading list.
- title = l10n_util::GetNSStringWithFixup(
- IDS_IOS_CONTENT_CONTEXT_ADDTOREADINGLIST);
- action = ^{
- Record(ACTION_READ_LATER, isImage, isLink);
- [weakSelf addToReadingListURL:link title:innerText];
- };
- [_contextMenuCoordinator addItemWithTitle:title action:action];
- }
+ }
+ if (link.SchemeIsHTTPOrHTTPS() &&
+ reading_list::switches::IsReadingListEnabled()) {
+ NSString* innerText = params.link_text;
+ if ([innerText length] > 0) {
+ // Add to reading list.
+ title = l10n_util::GetNSStringWithFixup(
+ IDS_IOS_CONTENT_CONTEXT_ADDTOREADINGLIST);
+ action = ^{
+ Record(ACTION_READ_LATER, isImage, isLink);
+ [weakSelf addToReadingListURL:link title:innerText];
+ };
+ [_contextMenuCoordinator addItemWithTitle:title action:action];
}
}
// Copy Link.
« 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