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

Unified Diff: ios/chrome/browser/metrics/new_tab_page_uma.mm

Issue 2819903002: Remove usage of Tab's |url| property from NewTabPageUMA utilities. (Closed)
Patch Set: lastCommitted => visible 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/metrics/new_tab_page_uma.mm
diff --git a/ios/chrome/browser/metrics/new_tab_page_uma.mm b/ios/chrome/browser/metrics/new_tab_page_uma.mm
index 8405afa190e9ee123388a1c17f02fd58ae0b7163..c07308925cd50309b2857f6c87eb7b7c66b512bf 100644
--- a/ios/chrome/browser/metrics/new_tab_page_uma.mm
+++ b/ios/chrome/browser/metrics/new_tab_page_uma.mm
@@ -15,10 +15,11 @@
namespace new_tab_page_uma {
-bool IsCurrentlyOnNTP(ios::ChromeBrowserState* browserState) {
- TabModel* tabModel = GetLastActiveTabModelForChromeBrowserState(browserState);
- return tabModel.currentTab &&
- tabModel.currentTab.url == GURL(kChromeUINewTabURL);
+bool IsCurrentlyOnNTP(ios::ChromeBrowserState* browser_state) {
+ TabModel* tab_model =
+ GetLastActiveTabModelForChromeBrowserState(browser_state);
+ return tab_model.currentTab &&
+ tab_model.currentTab.visibleURL == GURL(kChromeUINewTabURL);
kkhorimoto 2017/04/14 20:34:33 The old behavior would return a non-NTP URL if the
Eugene But (OOO till 7-30) 2017/04/14 21:43:02 Should this be lastCommittedURL? I think that old
kkhorimoto 2017/05/31 22:58:33 For user-initiated loads, the web view will be sho
}
void RecordAction(ios::ChromeBrowserState* browserState, ActionType type) {
« 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