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

Issue 10982044: Adding thirdParty property to RequestMatcher (Closed)

Created:
8 years, 2 months ago by vabr (Chromium)
Modified:
8 years, 2 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Adding thirdParty property to RequestMatcher Including tests. Also, corrected alphabetical order of keys. BUG=135606 TEST=Install both extensions attached to BUG 135606 (but not both at the same time). If this feature is working correctly the extensions should block 3rd party requests on all pages. An example page to test this is http://www.corp.google.com/~vabr/no_crawl/third_party.html, where the first image is 1st-party, and the second is 3rd party. TBR=yoz@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161861

Patch Set 1 #

Total comments: 3

Patch Set 2 : Added a unit test #

Total comments: 10

Patch Set 3 : Jochen's comments #

Total comments: 2

Patch Set 4 : Renaming "parties" #

Total comments: 4

Patch Set 5 : Handling empty 1st party for cookies. #

Patch Set 6 : Reordered the unit-test to spare setting up some URLs. #

Messages

Total messages: 16 (0 generated)
vabr (Chromium)
Hi Dominic, Can you please take a look at this? No need to hurry, I ...
8 years, 2 months ago (2012-09-26 15:44:46 UTC) #1
battre
LGTM, please check with Jochen and Adam. I think they were fine if we abused ...
8 years, 2 months ago (2012-09-26 17:18:54 UTC) #2
vabr (Chromium)
Thanks, Dominic! Jochen, Adam, Could you please check my use of URLRequest::first_party_for_cookies() in chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc, around ...
8 years, 2 months ago (2012-09-26 19:37:30 UTC) #3
jochen (gone - plz use gerrit)
https://chromiumcodereview.appspot.com/10982044/diff/1001/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc File chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc (right): https://chromiumcodereview.appspot.com/10982044/diff/1001/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc#newcode617 chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc:617: DCHECK(request_data.request->first_party_for_cookies().is_valid()); first_party_for_cookies() is not necessarily valid https://chromiumcodereview.appspot.com/10982044/diff/1001/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc#newcode619 chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc:619: request_data.request->first_party_for_cookies().GetOrigin(); ...
8 years, 2 months ago (2012-09-26 19:50:19 UTC) #4
vabr (Chromium)
Thanks, Jochen, I addressed your comments, PTAL. Dominic, Are you fine with renaming the filter ...
8 years, 2 months ago (2012-10-04 11:20:41 UTC) #5
battre
yes, renaming this sounds good to me. http://codereview.chromium.org/10982044/diff/12001/chrome/test/data/extensions/api_test/webrequest/test_declarative.js File chrome/test/data/extensions/api_test/webrequest/test_declarative.js (right): http://codereview.chromium.org/10982044/diff/12001/chrome/test/data/extensions/api_test/webrequest/test_declarative.js#newcode59 chrome/test/data/extensions/api_test/webrequest/test_declarative.js:59: function getURLParties() ...
8 years, 2 months ago (2012-10-05 12:57:32 UTC) #6
vabr (Chromium)
Addressed Dominic's comment. Dominic and Jochen, PTAL. http://codereview.chromium.org/10982044/diff/12001/chrome/test/data/extensions/api_test/webrequest/test_declarative.js File chrome/test/data/extensions/api_test/webrequest/test_declarative.js (right): http://codereview.chromium.org/10982044/diff/12001/chrome/test/data/extensions/api_test/webrequest/test_declarative.js#newcode59 chrome/test/data/extensions/api_test/webrequest/test_declarative.js:59: function getURLParties() ...
8 years, 2 months ago (2012-10-05 16:13:26 UTC) #7
jochen (gone - plz use gerrit)
http://codereview.chromium.org/10982044/diff/23004/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc File chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc (right): http://codereview.chromium.org/10982044/diff/23004/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc#newcode618 chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc:618: const bool is_first_party = if the first_party_for_cookies().is_empty(), it's also ...
8 years, 2 months ago (2012-10-08 07:30:35 UTC) #8
battre
Still LGTM after addressing Jochen's comment. http://codereview.chromium.org/10982044/diff/23004/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc File chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc (right): http://codereview.chromium.org/10982044/diff/23004/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc#newcode207 chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc:207: for (size_t i ...
8 years, 2 months ago (2012-10-15 07:19:51 UTC) #9
vabr (Chromium)
Jochen, Thanks for your suggestion. PTAL. Thanks all, Vaclav http://codereview.chromium.org/10982044/diff/23004/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc File chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc (right): http://codereview.chromium.org/10982044/diff/23004/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc#newcode618 chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc:618: ...
8 years, 2 months ago (2012-10-15 12:01:43 UTC) #10
jochen (gone - plz use gerrit)
3rd party cookie check lgtm
8 years, 2 months ago (2012-10-15 13:08:52 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/10982044/35002
8 years, 2 months ago (2012-10-15 13:52:09 UTC) #12
commit-bot: I haz the power
Presubmit check for 10982044-35002 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 2 months ago (2012-10-15 13:52:16 UTC) #13
vabr (Chromium)
Adding Yoyo to TBR for chrome/common/extensions/api/declarative_web_request.json OWNERS rubber stamp.
8 years, 2 months ago (2012-10-15 13:53:49 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/10982044/35002
8 years, 2 months ago (2012-10-15 13:54:05 UTC) #15
commit-bot: I haz the power
8 years, 2 months ago (2012-10-15 15:54:17 UTC) #16
Change committed as 161861

Powered by Google App Engine
This is Rietveld 408576698