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

Issue 2874353002: PlzNavigate support in data use ascriber (Closed)

Created:
3 years, 7 months ago by Raj
Modified:
3 years, 5 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

PlzNavigate support in data use ascriber With PlzNavigate, RenderFrameHost will not be populated in mainframe requests. So global request ID alone should be used for mapping those requests to main renderframe, when navigation commits later. BUG=664233

Patch Set 1 #

Patch Set 2 : rebased #

Patch Set 3 : more fixes #

Total comments: 6

Patch Set 4 : rebased #

Patch Set 5 : rebased #

Patch Set 6 : minor fix #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -71 lines) Patch
M chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc View 1 2 3 4 5 9 chunks +38 lines, -48 lines 2 comments Download
M chrome/browser/data_use_measurement/chrome_data_use_ascriber_unittest.cc View 1 2 3 4 5 chunks +7 lines, -23 lines 0 comments Download

Messages

Total messages: 17 (11 generated)
rajendrant
ptal
3 years, 7 months ago (2017-05-12 00:06:50 UTC) #4
RyanSturm
https://codereview.chromium.org/2874353002/diff/40001/chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc File chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc (right): https://codereview.chromium.org/2874353002/diff/40001/chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc#newcode102 chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc:102: if (request_info->GetResourceType() == content::RESOURCE_TYPE_MAIN_FRAME) { Should this clause be ...
3 years, 7 months ago (2017-05-22 17:22:06 UTC) #5
rajendrant
https://codereview.chromium.org/2874353002/diff/40001/chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc File chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc (right): https://codereview.chromium.org/2874353002/diff/40001/chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc#newcode102 chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc:102: if (request_info->GetResourceType() == content::RESOURCE_TYPE_MAIN_FRAME) { On 2017/05/22 17:22:05, RyanSturm ...
3 years, 7 months ago (2017-05-24 07:14:09 UTC) #6
RyanSturm
https://codereview.chromium.org/2874353002/diff/40001/chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc File chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc (right): https://codereview.chromium.org/2874353002/diff/40001/chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc#newcode102 chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc:102: if (request_info->GetResourceType() == content::RESOURCE_TYPE_MAIN_FRAME) { On 2017/05/24 07:14:09, rajendrant ...
3 years, 7 months ago (2017-05-24 16:08:44 UTC) #7
tbansal1
On 2017/05/24 16:08:44, RyanSturm wrote: > https://codereview.chromium.org/2874353002/diff/40001/chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc > File chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc (right): > > https://codereview.chromium.org/2874353002/diff/40001/chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc#newcode102 > ...
3 years, 6 months ago (2017-05-31 16:04:58 UTC) #16
tbansal1
3 years, 6 months ago (2017-05-31 16:06:53 UTC) #17
On 2017/05/31 16:04:58, tbansal1 wrote:
> On 2017/05/24 16:08:44, RyanSturm wrote:
> >
>
https://codereview.chromium.org/2874353002/diff/40001/chrome/browser/data_use...
> > File chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc
(right):
> > 
> >
>
https://codereview.chromium.org/2874353002/diff/40001/chrome/browser/data_use...
> > chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc:102: if
> > (request_info->GetResourceType() == content::RESOURCE_TYPE_MAIN_FRAME) {
> > On 2017/05/24 07:14:09, rajendrant wrote:
> > > On 2017/05/22 17:22:05, RyanSturm wrote:
> > > > Should this clause be before the other clause you are adding (more
> > > specifically
> > > > before the request_info->GetGlobalRequestID() ==
> content::GlobalRequestID()
> > > > check)?
> > > > 
> > > > AFAIK, request_info->GetGlobalRequestID() == content::GlobalRequestID()
> > could
> > > > happen in plzNavigate (not sure), in which case 
> > > > pending_navigation_data_use_map_ won't have an entry for it.
> > > 
> > > I guess, your question is about the following bug ?
> > > https://bugs.chromium.org/p/chromium/issues/detail?id=680841
> > > 
> > > I think, only in some tests it may not be populated. Maybe this check can
be
> > > removed. I am being conservative here.
> > 
> > sgtm.
> > 
> >
>
https://codereview.chromium.org/2874353002/diff/40001/chrome/browser/data_use...
> > chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc:202:
> > main_render_frame_data_use_map_.find(entry->main_frame_id());
> > On 2017/05/24 07:14:09, rajendrant wrote:
> > > On 2017/05/22 17:22:05, RyanSturm wrote:
> > > > If the request is destroyed after the next page load commits in the same
> > > frame,
> > > > will this get deleted correctly? 
> > > 
> > > Yes. That happens in mainframe delete or next pageload commit, whichever
is
> > > sooner.
> > > 
> > >
> >
>
https://cs.chromium.org/chromium/src/chrome/browser/data_use_measurement/chro...
> > >
> >
>
https://cs.chromium.org/chromium/src/chrome/browser/data_use_measurement/chro...
> > 
> > I was thinking more along the lines of:
> > 
> > 1) request A created for frame (1,1)
> > 2) navigation in frame (1,1) to new page load
> > 3) request A destroyed
> > 4) main_render_frame_data_use_map_.find(entry->main_frame_id()) returns the
> next
> > page load because (1,1) is still around
> > 5) frame_iter->second->HasPendingURLRequest(request) returns false since
that
> > page load is active
> > 
> > wouldn't it better to also verify that (entry == frame_iter->second) and
that
> > entry->HasPendingURLRequest, so that you check:
> > 1) the frame is gone (via frame_iter ==
main_render_frame_data_use_map_.end())
> > or the page load is gone in the frame (via entry == frame_iter->second)
> > 2) data use is complete for entry (via entry->HasPendingURLRequest as
opposed
> to
> > frame_iter->second)
> > 
> >
>
https://codereview.chromium.org/2874353002/diff/100001/chrome/browser/data_us...
> > File chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc
(right):
> > 
> >
>
https://codereview.chromium.org/2874353002/diff/100001/chrome/browser/data_us...
> > chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc:397:
> > main_render_frame_data_use_map_.erase(frame_it);
> > On 2017/05/24 07:14:09, rajendrant wrote:
> > > Moving it down, since |old_frame_entry| is accessed after erase.
> > 
> > Acknowledged.
> 
> I am trying to land this in https://codereview.chromium.org/2874353002/.
> undo lgtm to prevent conflicts.

Aah, I meant: not lgtm to prevent conflicts with the other CL, and to
make it clear that this should not be worked on.

Powered by Google App Engine
This is Rietveld 408576698