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

Issue 2936003002: [Tab Metrics] Adding the tab loading state to the WebContentsData. (Closed)

Created:
3 years, 6 months ago by shaseley
Modified:
3 years, 6 months ago
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Tab Metrics] Adding the tab loading state to the WebContentsData. Adding the tab loading state as a preliminary step for adding the number of switches to not loading, loading, and loaded tabs during session restore and background tab loading. Initially, the tab/WebContentsData starts as not loaded. We consider the tab to be loading when the main frame begins a navigation. This happens with the initial page navigation, if a page refreshes itself, or if navigating to a new page and the WebContents is being reused. This does not include cases where individual iframes update content after the page is loaded. The tab is considered to be loaded when receiving the WebContentsObserver::DidStopLoading signal, which corresponds to when the spinner stops. BUG=732837 Review-Url: https://codereview.chromium.org/2936003002 Cr-Commit-Position: refs/heads/master@{#480108} Committed: https://chromium.googlesource.com/chromium/src/+/2b1e1bf1a312185ac0162c31805b49333fc1cb3b

Patch Set 1 #

Total comments: 13

Patch Set 2 : Address comments #

Total comments: 8

Patch Set 3 : Remove state check and fix style #

Total comments: 5

Patch Set 4 : Fix nits #

Total comments: 1

Patch Set 5 : Rename enum max #

Total comments: 8

Patch Set 6 : More comments, move test, inline state change function #

Total comments: 6

Patch Set 7 : Fix style issues, add TODO #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -2 lines) Patch
M chrome/browser/resource_coordinator/tab_manager_web_contents_data.h View 1 2 3 4 5 6 5 chunks +36 lines, -0 lines 0 comments Download
M chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc View 1 2 3 4 5 6 3 chunks +28 lines, -2 lines 0 comments Download
M chrome/browser/resource_coordinator/tab_manager_web_contents_data_unittest.cc View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (14 generated)
shaseley
3 years, 6 months ago (2017-06-13 18:02:46 UTC) #2
zhenw
https://codereview.chromium.org/2936003002/diff/1/chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc File chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc (right): https://codereview.chromium.org/2936003002/diff/1/chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc#newcode39 chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc:39: // iframe loading new content. Add TODO here to ...
3 years, 6 months ago (2017-06-13 18:57:40 UTC) #4
shaseley
https://codereview.chromium.org/2936003002/diff/1/chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc File chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc (right): https://codereview.chromium.org/2936003002/diff/1/chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc#newcode39 chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc:39: // iframe loading new content. On 2017/06/13 18:57:39, zhenw ...
3 years, 6 months ago (2017-06-13 21:45:25 UTC) #5
panicker
https://codereview.chromium.org/2936003002/diff/1/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/1/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode28 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:28: TAB_IS_NOT_LOADING = 0, On 2017/06/13 21:45:25, shaseley wrote: > ...
3 years, 6 months ago (2017-06-13 22:25:53 UTC) #6
Zhen Wang
https://codereview.chromium.org/2936003002/diff/20001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc File chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc (right): https://codereview.chromium.org/2936003002/diff/20001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc#newcode41 chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc:41: // TODO(shaseley): switch to the new done signal (network ...
3 years, 6 months ago (2017-06-13 23:57:23 UTC) #9
shaseley
https://codereview.chromium.org/2936003002/diff/20001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc File chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc (right): https://codereview.chromium.org/2936003002/diff/20001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc#newcode41 chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc:41: // TODO(shaseley): switch to the new done signal (network ...
3 years, 6 months ago (2017-06-14 00:12:26 UTC) #10
shaseley
On 2017/06/13 23:57:23, Zhen Wang wrote: > https://codereview.chromium.org/2936003002/diff/20001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc#newcode55 > chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc:55: if > (tab_data_.tab_loading_state != TAB_IS_NOT_LOADING ...
3 years, 6 months ago (2017-06-14 00:14:16 UTC) #11
zhenw
On 2017/06/14 00:14:16, shaseley wrote: > On 2017/06/13 23:57:23, Zhen Wang wrote: > > > ...
3 years, 6 months ago (2017-06-14 00:18:39 UTC) #12
zhenw
lgtm
3 years, 6 months ago (2017-06-14 00:22:36 UTC) #13
shaseley
On 2017/06/14 00:18:39, zhenw wrote: > On 2017/06/14 00:14:16, shaseley wrote: > > On 2017/06/13 ...
3 years, 6 months ago (2017-06-14 00:23:29 UTC) #14
zhenw
https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode31 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:31: TAB_LOADING_STATES_UMA_MAX, Just one nit that I think you forget ...
3 years, 6 months ago (2017-06-14 00:24:06 UTC) #15
shaseley
https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode31 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:31: TAB_LOADING_STATES_UMA_MAX, On 2017/06/14 00:24:06, zhenw wrote: > Just one ...
3 years, 6 months ago (2017-06-14 00:31:12 UTC) #16
shaseley
https://codereview.chromium.org/2936003002/diff/20001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/20001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode31 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:31: TAB_LOADING_STATES_UMA_MAX, On 2017/06/13 23:57:23, Zhen Wang wrote: > s/TAB_LOADING_STATES_UMA_MAX/TAB_LOADING_STATE_MAX ...
3 years, 6 months ago (2017-06-14 00:32:25 UTC) #17
zhenw
https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode31 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:31: TAB_LOADING_STATES_UMA_MAX, On 2017/06/14 00:31:11, shaseley wrote: > On 2017/06/14 ...
3 years, 6 months ago (2017-06-14 00:35:12 UTC) #18
shaseley
https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode31 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:31: TAB_LOADING_STATES_UMA_MAX, On 2017/06/14 00:35:12, zhenw wrote: > On 2017/06/14 ...
3 years, 6 months ago (2017-06-14 00:39:30 UTC) #19
zhenw
https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode31 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:31: TAB_LOADING_STATES_UMA_MAX, On 2017/06/14 00:39:29, shaseley wrote: > On 2017/06/14 ...
3 years, 6 months ago (2017-06-14 00:48:36 UTC) #20
shaseley
On 2017/06/14 00:48:36, zhenw wrote: > https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h > File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h > (right): > > https://codereview.chromium.org/2936003002/diff/40001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode31 ...
3 years, 6 months ago (2017-06-14 00:59:38 UTC) #21
fmeawad
lgtm https://codereview.chromium.org/2936003002/diff/60001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc File chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc (right): https://codereview.chromium.org/2936003002/diff/60001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc#newcode211 chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc:211: tab_loading_state == right.tab_loading_state; unrelated to this CL, I ...
3 years, 6 months ago (2017-06-14 15:42:53 UTC) #22
fmeawad
https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data_unittest.cc File chrome/browser/resource_coordinator/tab_manager_web_contents_data_unittest.cc (right): https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data_unittest.cc#newcode212 chrome/browser/resource_coordinator/tab_manager_web_contents_data_unittest.cc:212: EXPECT_EQ(TAB_IS_LOADED, tab_data()->GetTabLoadingState()); Can you move this test up next ...
3 years, 6 months ago (2017-06-14 17:46:22 UTC) #23
shaseley
https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data_unittest.cc File chrome/browser/resource_coordinator/tab_manager_web_contents_data_unittest.cc (right): https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data_unittest.cc#newcode212 chrome/browser/resource_coordinator/tab_manager_web_contents_data_unittest.cc:212: EXPECT_EQ(TAB_IS_LOADED, tab_data()->GetTabLoadingState()); On 2017/06/14 17:46:22, fmeawad wrote: > Can ...
3 years, 6 months ago (2017-06-14 18:12:34 UTC) #24
lpy
https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode154 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:154: void MarkTabAsLoading(); Are we planning to expose these two ...
3 years, 6 months ago (2017-06-14 18:41:11 UTC) #26
panicker
LGTM https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode27 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:27: enum TabLoadingState { Could you add a comment ...
3 years, 6 months ago (2017-06-14 19:38:37 UTC) #27
shaseley
https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode154 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:154: void MarkTabAsLoading(); On 2017/06/14 18:41:11, lpy wrote: > Are ...
3 years, 6 months ago (2017-06-14 20:51:34 UTC) #28
fmeawad
On 2017/06/14 20:51:34, shaseley wrote: > https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h > File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h > (right): > > https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode154 ...
3 years, 6 months ago (2017-06-14 21:46:47 UTC) #29
zhenw
https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode154 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:154: void MarkTabAsLoading(); On 2017/06/14 20:51:34, shaseley wrote: > On ...
3 years, 6 months ago (2017-06-15 15:54:53 UTC) #30
shaseley
https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/80001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode27 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:27: enum TabLoadingState { On 2017/06/14 19:38:36, panicker wrote: > ...
3 years, 6 months ago (2017-06-15 16:22:15 UTC) #31
Zhen Wang
lgtm
3 years, 6 months ago (2017-06-15 16:26:41 UTC) #32
Zhen Wang
+chrisha
3 years, 6 months ago (2017-06-15 19:08:18 UTC) #34
chrisha
Some nits... https://codereview.chromium.org/2936003002/diff/100001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/100001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode27 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:27: // WebContents. The state changes to loaded ...
3 years, 6 months ago (2017-06-15 20:46:44 UTC) #37
shaseley
https://codereview.chromium.org/2936003002/diff/100001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h File chrome/browser/resource_coordinator/tab_manager_web_contents_data.h (right): https://codereview.chromium.org/2936003002/diff/100001/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h#newcode27 chrome/browser/resource_coordinator/tab_manager_web_contents_data.h:27: // WebContents. The state changes to loaded when we ...
3 years, 6 months ago (2017-06-16 01:22:50 UTC) #40
chrisha
lgtm!
3 years, 6 months ago (2017-06-16 16:45:50 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2936003002/120001
3 years, 6 months ago (2017-06-16 17:30:04 UTC) #44
commit-bot: I haz the power
3 years, 6 months ago (2017-06-16 18:39:14 UTC) #47
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/2b1e1bf1a312185ac0162c31805b...

Powered by Google App Engine
This is Rietveld 408576698