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

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

Issue 2631393002: Move "Read Later" to the third place in the context menu (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 c3fda741f8dd394d6275c8392c8b7f1173f8d2f6..2e73409785e7058320a75f472c0c873dcf29db92 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -2451,20 +2451,6 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
if (web::UrlHasWebScheme(link)) {
Olivier 2017/01/17 09:34:55 I know this is not in the scope of this CL, but th
web::Referrer referrer([_model currentTab].url, params.referrer_policy);
- 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];
- }
- }
-
// Open in New Tab.
title = l10n_util::GetNSStringWithFixup(
IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWTAB);
@@ -2492,6 +2478,20 @@ 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];
+ }
+ }
}
// Copy Link.
title = l10n_util::GetNSStringWithFixup(IDS_IOS_CONTENT_CONTEXT_COPY);
« 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