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

Unified Diff: ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm

Issue 2816203002: Remove usage of Tab's |url| property for BookmarkInteractionController. (Closed)
Patch Set: Created 3 years, 8 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/bookmarks/bookmark_interaction_controller.mm
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm b/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm
index 44c9dd0d046adb6d217b9bdff23baafa7f4a85c0..289d4754f38f9cec930da252e18570e884c5ad48 100644
--- a/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm
+++ b/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm
@@ -150,7 +150,8 @@ - (void)addBookmarkForTab:(Tab*)tab {
const BookmarkNode* defaultFolder =
[[self class] folderForNewBookmarksInBrowserState:_browserState];
self.bookmarkModel->AddURL(defaultFolder, defaultFolder->child_count(),
- base::SysNSStringToUTF16(tab.title), tab.url);
+ base::SysNSStringToUTF16(tab.title),
+ tab.lastCommittedURL);
Eugene But (OOO till 7-30) 2017/04/14 21:06:24 I checked that Desktop adds bookmark for lastCommi
MDCSnackbarMessageAction* action = [[MDCSnackbarMessageAction alloc] init];
__weak BookmarkInteractionController* weakSelf = self;
@@ -184,7 +185,8 @@ - (void)presentBookmarkForTab:(Tab*)tab {
DCHECK(tab);
const BookmarkNode* bookmark =
- self.bookmarkModel->GetMostRecentlyAddedUserNodeForURL(tab.url);
+ self.bookmarkModel->GetMostRecentlyAddedUserNodeForURL(
+ tab.lastCommittedURL);
if (!bookmark)
return;
« 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