New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 762621 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 843715



Sign in to add a comment

Data use measurement for offline page service

Project Member Reported by rajendrant@chromium.org, Sep 6 2017

Issue description

OPS uses an URLFetcher to get metadata of suggested URLs (PrefetchRequestFetcher::PrefetchRequestFetcher()).
This URLFetcher should be tracked with a service.

Downloads service is used to fetch the actual media files, which is the significant data use. That needs to be tracked as well. OPS is one of the clients for downloads service.
 

Comment 1 by bengr@chromium.org, Sep 6 2017

Cc: manisca...@chromium.org
Labels: M-63

Comment 3 by bengr@chromium.org, Dec 1 2017

So is this fixed? What's the status?
Refreshed during triage.
Refreshed during triage.

Comment 6 by bengr@chromium.org, May 2 2018

So is this fixed? What's the status?
Blockedon: 843715
This will be added after migrating data use to use traffic annotations.
Labels: -M-63 M-69
Expecting the fix to be done for M69.
Refreshed during triage.
Refreshed during triage.
Part of offline pages datause is marked as undefined traffic annotation ID.
I am fixing them by providing an ID.

Following are more instances of undefined ID uses in android.
https://cs.chromium.org/search/?q=NO_TRAFFIC_ANNOTATION_YET+-f:test+-f:chromeos+-f:ios&type=cs

The offline pages usage is in:


OfflinePageDownloadBridge::StartDownload - https://cs.chromium.org/chromium/src/chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.cc?rcl=b2c140b85bf6cb4aa81c1a24a0d140770b6f519c&l=239

I thinkw e could use a similar annotation to the one for downloading from a context menu:

  net::NetworkTrafficAnnotationTag traffic_annotation =
      net::DefineNetworkTrafficAnnotation("download_web_contents_tab", R"(
        semantics {
          sender: "Save Page Action"
          description:
            "Saves the given tab's contents to the local file system."
          trigger:
            "The user has triggered a save operation on the frame through the "
            "download button."
          data: "None."
          destination: WEBSITE
        }
        policy {
          cookies_allowed: YES
          cookies_store: "user"
          setting:
            "This feature cannot be disabled by settings, but it's is only "
            "triggered by user request."
          policy_exception_justification: "Not implemented."
        })");
But to be clear, this data use is not for offline page service per se, but the downloads facility within Chrome.
Ah. I see you have started a CL for the fix.
Annotations are only required in windows and linux.
For codepath specific to other platforms, the proto is not parsed to annotations.xml and some other steps are not done too.

So I have created this CL that just adds the annotation ID.
https://chromium-review.googlesource.com/c/chromium/src/+/1128439

You could close your CL or I can exclude offlinepages from the CL.
Let me know.
Project Member

Comment 16 by bugdroid1@chromium.org, Jul 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/99985ec282ee3069fd42a37e32940c75dea4881a

commit 99985ec282ee3069fd42a37e32940c75dea4881a
Author: rajendrant <rajendrant@chromium.org>
Date: Fri Jul 13 19:47:13 2018

Add traffic annotation IDs for offline pages and downloads

Network traffic annotations are enforced in Windows, Linux. In other platforms
the annotation IDs are undefined. This leads to data use of android specific
services being bucketed to undefined bucket. This CL adds an annotation ID
for the codepath.

Bug:  762621 
Change-Id: I5676680f3fb7c0f70cc1cd34ff36c898134990e7
Reviewed-on: https://chromium-review.googlesource.com/1128439
Reviewed-by: Justin DeWitt <dewittj@chromium.org>
Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Ryan Sleevi <rsleevi@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Commit-Queue: rajendrant <rajendrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575029}
[modify] https://crrev.com/99985ec282ee3069fd42a37e32940c75dea4881a/chrome/browser/android/download/download_controller.cc
[modify] https://crrev.com/99985ec282ee3069fd42a37e32940c75dea4881a/chrome/browser/android/omnibox/answers_image_bridge.cc
[modify] https://crrev.com/99985ec282ee3069fd42a37e32940c75dea4881a/chrome/browser/android/webapk/webapk_icon_hasher.cc
[modify] https://crrev.com/99985ec282ee3069fd42a37e32940c75dea4881a/chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.cc
[modify] https://crrev.com/99985ec282ee3069fd42a37e32940c75dea4881a/net/traffic_annotation/network_traffic_annotation.h

Status: Fixed (was: Assigned)
Project Member

Comment 18 by bugdroid1@chromium.org, Jul 25

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bf96c15a2764762e7503198415f7fd7b70cc5ce4

commit bf96c15a2764762e7503198415f7fd7b70cc5ce4
Author: rajendrant <rajendrant@chromium.org>
Date: Wed Jul 25 20:10:59 2018

Add more data use service hashes

Bug:  762621 
Change-Id: Ibd8bab7891081ac4d3a82215f483d85f60ff693f
Reviewed-on: https://chromium-review.googlesource.com/1150449
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Commit-Queue: rajendrant <rajendrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578032}
[modify] https://crrev.com/bf96c15a2764762e7503198415f7fd7b70cc5ce4/tools/metrics/histograms/enums.xml

Sign in to add a comment