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/infobars/infobar_manager_impl.cc

Issue 1160443010: More infobar cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix iOS too Created 5 years, 6 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 | « components/infobars/core/infobar_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/infobars/infobar_manager_impl.cc
diff --git a/ios/chrome/browser/infobars/infobar_manager_impl.cc b/ios/chrome/browser/infobars/infobar_manager_impl.cc
index a3ed407911532d87b1e1ee7e7db35712ab827797..55eecccdd102380dca3c426e97b6e68043ebbbb6 100644
--- a/ios/chrome/browser/infobars/infobar_manager_impl.cc
+++ b/ios/chrome/browser/infobars/infobar_manager_impl.cc
@@ -21,18 +21,14 @@ namespace {
infobars::InfoBarDelegate::NavigationDetails
NavigationDetailsFromLoadCommittedDetails(
const web::LoadCommittedDetails& load_details) {
- const ui::PageTransition transition = load_details.item->GetTransitionType();
infobars::InfoBarDelegate::NavigationDetails navigation_details;
Peter Kasting 2015/06/05 03:02:39 I reordered the code here so as to match the simil
- navigation_details.is_main_frame = ui::PageTransitionIsMainFrame(transition);
- navigation_details.is_redirect = ui::PageTransitionIsRedirect(transition);
- navigation_details.is_reload =
- ui::PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_RELOAD);
-
- // web::LoadCommittedDetails don't store this information, default to false.
- navigation_details.did_replace_entry = false;
navigation_details.entry_id = load_details.item->GetUniqueID();
+ const ui::PageTransition transition = load_details.item->GetTransitionType();
navigation_details.is_navigation_to_different_page =
- navigation_details.is_main_frame && !load_details.is_in_page;
+ ui::PageTransitionIsMainFrame(transition) && !load_details.is_in_page;
+ // web::LoadCommittedDetails doesn't store this information, default to false.
+ navigation_details.did_replace_entry = false;
+ navigation_details.is_redirect = ui::PageTransitionIsRedirect(transition);
return navigation_details;
}
« no previous file with comments | « components/infobars/core/infobar_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698