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

Issue 2421333002: Protobuf for Traffic Annotation and first use by a URLFetcher. (Closed)

Created:
4 years, 2 months ago by Ramin Halavati
Modified:
3 years, 10 months ago
CC:
cbentzel+watch_chromium.org, chromium-reviews, groby+spellwatch_chromium.org, msramek, rlp+watch_chromium.org, rouslan+spell_chromium.org, timvolodine
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Protobuf for Traffic Annotation and first use by a URLFetcher. This CL introduces a Traffic Annotation data type that allows annotating network traffic issued by Chrome. The annotation is expressed in such a way that neither the network request nor the Chrome binary grow in size. Instead the annotation is written such that a source code analysis tool can detect and extract the information. The network request may, in the future, be extended to store an identifier in the network request, which allows to even do runtime analysis and auditing. Once we settle on interfaces, the old Create() method of URLFetcher will be deprecated and successively migrated to the annotated versio. BUG=656607 TBR=dpranke@chromium.org Review-Url: https://codereview.chromium.org/2421333002 Cr-Commit-Position: refs/heads/master@{#449265} Committed: https://chromium.googlesource.com/chromium/src/+/a9b551dfda8c2231f7ba4733cdee33bc9747979b

Patch Set 1 #

Total comments: 37

Patch Set 2 : Addressed comments. #

Total comments: 30

Patch Set 3 : Comments addressed. #

Patch Set 4 : Minor update. #

Patch Set 5 : String hasing function simplified. #

Patch Set 6 : Minor updates to annotation definition and one more sample. #

Patch Set 7 : One more file added due to dependacy. #

Patch Set 8 : Windows compatibility. #

Patch Set 9 : Traffic annotation sourceset added to net/BUILD.gn #

Total comments: 8

Patch Set 10 : All comments addressed. #

Total comments: 16

Patch Set 11 : Comments addressed. #

Total comments: 10

Patch Set 12 : Network Traffic Annotation tag changed to const char*. #

Total comments: 23

Patch Set 13 : Comments addressed. #

Total comments: 10

Patch Set 14 : All comments addressed. #

Patch Set 15 : File downloader removed. #

Patch Set 16 : nits #

Patch Set 17 : Minor update on BUILD.gn #

Patch Set 18 : Direct dependency added to traffic_annotations #

Patch Set 19 : Traffic annotation moved to net public deps #

Total comments: 2

Patch Set 20 : test_helper moved to test_support. #

Patch Set 21 : More comments added. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+465 lines, -8 lines) Patch
M chrome/browser/spellchecker/spelling_service_client_unittest.cc View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M components/spellcheck/browser/spelling_service_client.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -1 line 0 comments Download
M components/spellcheck/browser/spelling_service_client.cc View 1 2 3 4 5 6 7 8 9 2 chunks +41 lines, -3 lines 0 comments Download
M net/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +10 lines, -0 lines 0 comments Download
A net/traffic_annotation/network_traffic_annotation.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +55 lines, -0 lines 0 comments Download
A net/traffic_annotation/network_traffic_annotation_test_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +15 lines, -0 lines 0 comments Download
M net/url_request/url_fetcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +32 lines, -0 lines 0 comments Download
M net/url_request/url_fetcher.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +21 lines, -0 lines 0 comments Download
M net/url_request/url_request_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +18 lines, -3 lines 0 comments Download
M net/url_request/url_request_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +10 lines, -0 lines 0 comments Download
A tools/traffic_annotation/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
A tools/traffic_annotation/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
A tools/traffic_annotation/sample_traffic_annotation.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +69 lines, -0 lines 0 comments Download
A tools/traffic_annotation/traffic_annotation.proto View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +182 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 62 (18 generated)
Ramin Halavati
Please review this https://codereview.chromium.org/2421333002/diff/1/net/traffic_annotation/network_traffic_annotation.h File net/traffic_annotation/network_traffic_annotation.h (right): https://codereview.chromium.org/2421333002/diff/1/net/traffic_annotation/network_traffic_annotation.h#newcode1 net/traffic_annotation/network_traffic_annotation.h:1: // Copyright? Separate as two files ...
4 years, 2 months ago (2016-10-17 13:19:23 UTC) #3
battre
https://codereview.chromium.org/2421333002/diff/1/components/spellcheck/browser/spelling_service_client.cc File components/spellcheck/browser/spelling_service_client.cc (right): https://codereview.chromium.org/2421333002/diff/1/components/spellcheck/browser/spelling_service_client.cc#newcode113 components/spellcheck/browser/spelling_service_client.cc:113: "word, if a user right-clicks on it." Looking at ...
4 years, 2 months ago (2016-10-17 14:58:46 UTC) #4
groby-ooo-7-16
On 2016/10/17 14:58:46, battre wrote: > https://codereview.chromium.org/2421333002/diff/1/components/spellcheck/browser/spelling_service_client.cc > File components/spellcheck/browser/spelling_service_client.cc (right): > > https://codereview.chromium.org/2421333002/diff/1/components/spellcheck/browser/spelling_service_client.cc#newcode113 > ...
4 years, 2 months ago (2016-10-18 05:14:41 UTC) #5
Ramin Halavati
Addressed your comments. https://codereview.chromium.org/2421333002/diff/1/components/spellcheck/browser/spelling_service_client.cc File components/spellcheck/browser/spelling_service_client.cc (right): https://codereview.chromium.org/2421333002/diff/1/components/spellcheck/browser/spelling_service_client.cc#newcode113 components/spellcheck/browser/spelling_service_client.cc:113: "word, if a user right-clicks on ...
4 years, 2 months ago (2016-10-18 06:57:57 UTC) #6
battre
More comments. https://codereview.chromium.org/2421333002/diff/20001/tools/traffic_annotation/traffic_annotation.proto File tools/traffic_annotation/traffic_annotation.proto (right): https://codereview.chromium.org/2421333002/diff/20001/tools/traffic_annotation/traffic_annotation.proto#newcode11 tools/traffic_annotation/traffic_annotation.proto:11: // Section 1: Location of what is ...
4 years, 2 months ago (2016-10-18 09:05:29 UTC) #7
battre
Hi. > Is there a doc describing this/how to use it/what the benefits are? Please ...
4 years, 2 months ago (2016-10-18 09:19:51 UTC) #8
Ramin Halavati
All comments addressed. https://codereview.chromium.org/2421333002/diff/20001/tools/traffic_annotation/traffic_annotation.proto File tools/traffic_annotation/traffic_annotation.proto (right): https://codereview.chromium.org/2421333002/diff/20001/tools/traffic_annotation/traffic_annotation.proto#newcode11 tools/traffic_annotation/traffic_annotation.proto:11: // Section 1: Location of what ...
4 years, 2 months ago (2016-10-18 10:03:22 UTC) #9
Ramin Halavati
Hi, This is the primary change list for "Network Traffic Annotation" project, here is the ...
3 years, 11 months ago (2017-01-19 05:50:27 UTC) #11
Ramin Halavati
battre@chromium.org: Please review changes in protobuf and downloader sample.
3 years, 11 months ago (2017-01-19 07:51:43 UTC) #13
battre
https://codereview.chromium.org/2421333002/diff/160001/tools/traffic_annotation/traffic_annotation.proto File tools/traffic_annotation/traffic_annotation.proto (right): https://codereview.chromium.org/2421333002/diff/160001/tools/traffic_annotation/traffic_annotation.proto#newcode61 tools/traffic_annotation/traffic_annotation.proto:61: // has annotation, the net::TCPClientSocket() that is used by ...
3 years, 11 months ago (2017-01-19 08:10:16 UTC) #14
Ramin Halavati
All Comments addressed. Please review. https://codereview.chromium.org/2421333002/diff/160001/tools/traffic_annotation/traffic_annotation.proto File tools/traffic_annotation/traffic_annotation.proto (right): https://codereview.chromium.org/2421333002/diff/160001/tools/traffic_annotation/traffic_annotation.proto#newcode61 tools/traffic_annotation/traffic_annotation.proto:61: // has annotation, the ...
3 years, 11 months ago (2017-01-24 08:49:39 UTC) #15
battre
tools/traffic_annotation LGTM
3 years, 11 months ago (2017-01-24 17:04:03 UTC) #16
asanka
Quick uneducated pass. I'll do another after I chat with rhalavati@ about the overall approach. ...
3 years, 11 months ago (2017-01-26 20:59:28 UTC) #17
Ramin Halavati
I have addressed all comments Asanka, please review. https://codereview.chromium.org/2421333002/diff/180001/net/BUILD.gn File net/BUILD.gn (right): https://codereview.chromium.org/2421333002/diff/180001/net/BUILD.gn#newcode2967 net/BUILD.gn:2967: source_set("traffic_annotation_header") ...
3 years, 10 months ago (2017-01-27 07:48:58 UTC) #18
asanka
Overall I'm strongly leaning towards just storing string a pointer to the string rather than ...
3 years, 10 months ago (2017-01-27 16:58:01 UTC) #19
Ramin Halavati
Asanka, Dominic, please review. Network traffic annotation tag is changed to const char * and ...
3 years, 10 months ago (2017-01-30 08:43:26 UTC) #20
asanka
My comments are mostly nits and questions. I think at this point we can land ...
3 years, 10 months ago (2017-02-01 02:28:28 UTC) #21
battre
https://codereview.chromium.org/2421333002/diff/220001/net/url_request/url_fetcher.h File net/url_request/url_fetcher.h (right): https://codereview.chromium.org/2421333002/diff/220001/net/url_request/url_fetcher.h#newcode110 net/url_request/url_fetcher.h:110: // below instead. Shouldn't we remove comments about this ...
3 years, 10 months ago (2017-02-01 03:48:24 UTC) #22
Ramin Halavati
Comments addressed. battre@: Do you have any suggestions for asanka@'s comments on cookies in TrafficPolicy ...
3 years, 10 months ago (2017-02-01 10:11:14 UTC) #24
Ramin Halavati
On 2017/02/01 10:11:14, Ramin Halavati wrote: > Comments addressed. > > battre@: Do you have ...
3 years, 10 months ago (2017-02-01 10:28:55 UTC) #25
battre
https://codereview.chromium.org/2421333002/diff/220001/tools/traffic_annotation/traffic_annotation.proto File tools/traffic_annotation/traffic_annotation.proto (right): https://codereview.chromium.org/2421333002/diff/220001/tools/traffic_annotation/traffic_annotation.proto#newcode125 tools/traffic_annotation/traffic_annotation.proto:125: // least one is correct). On 2017/02/01 02:28:28, asanka ...
3 years, 10 months ago (2017-02-01 16:25:58 UTC) #26
asanka
Also, the sample annotation file is missing. https://codereview.chromium.org/2421333002/diff/220001/tools/traffic_annotation/traffic_annotation.proto File tools/traffic_annotation/traffic_annotation.proto (right): https://codereview.chromium.org/2421333002/diff/220001/tools/traffic_annotation/traffic_annotation.proto#newcode131 tools/traffic_annotation/traffic_annotation.proto:131: // exceptions ...
3 years, 10 months ago (2017-02-01 17:08:41 UTC) #27
please use gerrit instead
spellcheck lgtm. other files: drive by. https://codereview.chromium.org/2421333002/diff/240001/net/traffic_annotation/network_traffic_annotation.h File net/traffic_annotation/network_traffic_annotation.h (right): https://codereview.chromium.org/2421333002/diff/240001/net/traffic_annotation/network_traffic_annotation.h#newcode1 net/traffic_annotation/network_traffic_annotation.h:1: // Copyright (c) ...
3 years, 10 months ago (2017-02-01 22:10:20 UTC) #28
Ramin Halavati
dpranke@chromium.org: Please review changes in tools/traffic_annotation https://codereview.chromium.org/2421333002/diff/220001/tools/traffic_annotation/traffic_annotation.proto File tools/traffic_annotation/traffic_annotation.proto (right): https://codereview.chromium.org/2421333002/diff/220001/tools/traffic_annotation/traffic_annotation.proto#newcode131 tools/traffic_annotation/traffic_annotation.proto:131: // exceptions (e.g. ...
3 years, 10 months ago (2017-02-02 07:44:25 UTC) #30
Ramin Halavati
Dirk, Please just review the ownership of tools/traffic_annotation.
3 years, 10 months ago (2017-02-02 08:09:11 UTC) #31
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/2421333002/300001
3 years, 10 months ago (2017-02-06 13:52:58 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: android_cronet on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_cronet/builds/77250) android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 10 months ago (2017-02-06 13:57:29 UTC) #37
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/2421333002/320001
3 years, 10 months ago (2017-02-06 14:35:02 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/305325) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 10 months ago (2017-02-06 14:38:33 UTC) #42
Ramin Halavati
rouslan@, asanka@, I tried to land this CL and got the following two commit errors ...
3 years, 10 months ago (2017-02-06 15:03:14 UTC) #43
msramek
Drive-by! Since our goal is to ultimately annotate all requests, maybe we should instead make ...
3 years, 10 months ago (2017-02-06 15:09:36 UTC) #45
please use gerrit instead
On 2017/02/06 15:03:14, Ramin Halavati wrote: > rouslan@, asanka@, > > I tried to land ...
3 years, 10 months ago (2017-02-06 15:16:19 UTC) #46
Dirk Pranke
I'm a bit lost here. What is the code in //tools doing (or being used ...
3 years, 10 months ago (2017-02-07 02:52:22 UTC) #47
Ramin Halavati
asanka@: I moved Traffic Annotation to public dependency of net BUILD.gn so that we won't ...
3 years, 10 months ago (2017-02-07 10:22:16 UTC) #48
Dirk Pranke
On 2017/02/07 10:22:16, Ramin Halavati wrote: > dpranke@: > I will wait for your approval ...
3 years, 10 months ago (2017-02-08 02:06:22 UTC) #49
asanka
https://codereview.chromium.org/2421333002/diff/360001/net/BUILD.gn File net/BUILD.gn (right): https://codereview.chromium.org/2421333002/diff/360001/net/BUILD.gn#newcode2982 net/BUILD.gn:2982: "traffic_annotation/network_traffic_annotation_test_helper.h", Can test_helper be moved to :test_support ?
3 years, 10 months ago (2017-02-08 04:37:16 UTC) #50
battre
On 2017/02/08 02:06:22, Dirk Pranke wrote: > On 2017/02/07 10:22:16, Ramin Halavati wrote: > > ...
3 years, 10 months ago (2017-02-08 09:42:27 UTC) #51
Ramin Halavati
asanka@: Comment addressed, please review. https://codereview.chromium.org/2421333002/diff/360001/net/BUILD.gn File net/BUILD.gn (right): https://codereview.chromium.org/2421333002/diff/360001/net/BUILD.gn#newcode2982 net/BUILD.gn:2982: "traffic_annotation/network_traffic_annotation_test_helper.h", On 2017/02/08 04:37:16, ...
3 years, 10 months ago (2017-02-08 10:09:57 UTC) #52
asanka
//net lgtm But things I'd like to see going forward (in this CL or later ...
3 years, 10 months ago (2017-02-08 15:05:47 UTC) #53
Dirk Pranke
It still feels a little weird to be putting this in //tools, but I still ...
3 years, 10 months ago (2017-02-09 02:46:18 UTC) #54
asanka
On 2017/02/09 at 02:46:18, dpranke wrote: > It still feels a little weird to be ...
3 years, 10 months ago (2017-02-09 03:07:10 UTC) #55
Ramin Halavati
asanka@: Proposed comments added to both citations of network traffic annotation in net, and a ...
3 years, 10 months ago (2017-02-09 10:58:34 UTC) #56
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/2421333002/400001
3 years, 10 months ago (2017-02-09 10:59:09 UTC) #59
commit-bot: I haz the power
3 years, 10 months ago (2017-02-09 12:03:38 UTC) #62
Message was sent while issue was closed.
Committed patchset #21 (id:400001) as
https://chromium.googlesource.com/chromium/src/+/a9b551dfda8c2231f7ba4733cdee...

Powered by Google App Engine
This is Rietveld 408576698