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

Issue 9572001: Do cookie checks in NetworkDelegate instead of the URLRequest::Delegate. (Closed)

Created:
8 years, 9 months ago by jochen (gone - plz use gerrit)
Modified:
8 years, 9 months ago
CC:
chromium-reviews, MAD, nkostylev+watch_chromium.org, dhollowa+watch_chromium.org, mihaip+watch_chromium.org, ajwong+watch_chromium.org, stevenjb+watch_chromium.org, GeorgeY, ncarter (slow), jar (doing other things), Ilya Sherman, joi+watch-content_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, tim (not reviewing), Avi (use Gerrit), creis+watch_chromium.org, Raghu Simha, cbentzel+watch_chromium.org, akalin, tfarina, Aaron Boodman, dyu1, James Su, davemoore+watch_chromium.org
Visibility:
Public.

Description

Do cookie checks in NetworkDelegate instead of the URLRequest::Delegate. As a side effect, requests going through URLFetcher now also have to pass cookie checks. Requests from the URLFetcher can be optionally annotated with a render view, so the user can be notified about blocked cookies. This plumbing is done for the alternate nav url fetcher, and the template url fetcher. BUG=116322 TEST=manual/pyauto Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=125831

Patch Set 1 #

Patch Set 2 : clang fix #

Total comments: 21

Patch Set 3 : new approach #

Patch Set 4 : TestShellNetworkDelegate #

Total comments: 26

Patch Set 5 : updates #

Patch Set 6 : fix chromeos #

Total comments: 3

Patch Set 7 : patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+600 lines, -243 lines) Patch
M chrome/browser/alternate_nav_url_fetcher.cc View 1 2 3 4 2 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/chromeos/imageburner/burn_manager.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/webrequest/webrequest_api_unittest.cc View 4 chunks +24 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_warning_set.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/io_thread.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.h View 1 2 3 chunks +13 lines, -4 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 3 4 4 chunks +59 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/search_engines/template_url_fetcher.h View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/search_engines/template_url_fetcher.cc View 1 2 3 4 6 chunks +15 lines, -2 lines 0 comments Download
M chrome/browser/search_engines/template_url_fetcher_unittest.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/search_engines/search_engine_tab_helper.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_url_fetcher.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host.h View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 1 chunk +0 lines, -30 lines 0 comments Download
M content/browser/renderer_host/resource_request_info_impl.cc View 1 2 3 4 3 chunks +23 lines, -0 lines 0 comments Download
M content/common/net/url_fetcher_impl.h View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M content/common/net/url_fetcher_impl.cc View 1 2 3 4 8 chunks +33 lines, -6 lines 0 comments Download
M content/common/net/url_fetcher_impl_unittest.cc View 1 2 3 4 2 chunks +5 lines, -3 lines 0 comments Download
A content/common/net/url_request_user_data.h View 1 2 3 4 1 chunk +28 lines, -0 lines 0 comments Download
A content/common/net/url_request_user_data.cc View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/browser/resource_request_info.h View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M content/public/common/url_fetcher.h View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download
M content/test/test_url_fetcher_factory.h View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M content/test/test_url_fetcher_factory.cc View 1 2 3 4 2 chunks +6 lines, -5 lines 0 comments Download
M net/base/network_delegate.h View 1 2 4 chunks +23 lines, -0 lines 0 comments Download
M net/base/network_delegate.cc View 1 2 3 4 2 chunks +19 lines, -0 lines 0 comments Download
M net/proxy/network_delegate_error_observer_unittest.cc View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M net/url_request/url_request.h View 1 2 1 chunk +0 lines, -13 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 2 chunks +11 lines, -15 lines 0 comments Download
M net/url_request/url_request_test_util.h View 1 2 3 4 8 chunks +20 lines, -19 lines 0 comments Download
M net/url_request/url_request_test_util.cc View 1 2 3 4 4 chunks +41 lines, -42 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 23 chunks +113 lines, -54 lines 0 comments Download
M webkit/appcache/appcache_update_job.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M webkit/tools/test_shell/simple_resource_loader_bridge.cc View 1 2 3 7 chunks +87 lines, -27 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
jochen (gone - plz use gerrit)
darin/chris: fyi John/Will: please review the changes the URLFetcherImpl I added content/public/common/content_url_request_user_data.* Both ResourceDispatcherHost and ...
8 years, 9 months ago (2012-03-01 16:05:10 UTC) #1
michaeln
http://codereview.chromium.org/9572001/diff/6001/webkit/appcache/appcache_service.h File webkit/appcache/appcache_service.h (right): http://codereview.chromium.org/9572001/diff/6001/webkit/appcache/appcache_service.h#newcode112 webkit/appcache/appcache_service.h:112: // updates. Should only be accessed on the UI ...
8 years, 9 months ago (2012-03-01 17:47:01 UTC) #2
jochen (gone - plz use gerrit)
http://codereview.chromium.org/9572001/diff/6001/webkit/appcache/appcache_service.h File webkit/appcache/appcache_service.h (right): http://codereview.chromium.org/9572001/diff/6001/webkit/appcache/appcache_service.h#newcode112 webkit/appcache/appcache_service.h:112: // updates. Should only be accessed on the UI ...
8 years, 9 months ago (2012-03-01 18:41:00 UTC) #3
jam
I started reviewing this but after stepping back a bit I think this can be ...
8 years, 9 months ago (2012-03-01 19:30:42 UTC) #4
jochen (gone - plz use gerrit)
http://codereview.chromium.org/9572001/diff/6001/content/public/common/url_fetcher.h File content/public/common/url_fetcher.h (right): http://codereview.chromium.org/9572001/diff/6001/content/public/common/url_fetcher.h#newcode163 content/public/common/url_fetcher.h:163: content::ContentURLRequestUserData* user_data) = 0; On 2012/03/01 19:30:42, John Abd-El-Malek ...
8 years, 9 months ago (2012-03-01 19:39:10 UTC) #5
michaeln
> > void AppCachePolicy::AddUserDataForUpdateRequest(job, req); > > Ideally, I want to attach the process_id/routing_id at ...
8 years, 9 months ago (2012-03-01 19:47:11 UTC) #6
willchan no longer on Chromium
http://codereview.chromium.org/9572001/diff/6001/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): http://codereview.chromium.org/9572001/diff/6001/chrome/browser/net/chrome_network_delegate.cc#newcode20 chrome/browser/net/chrome_network_delegate.cc:20: #include "net/base/cookie_monster.h" What's this for? http://codereview.chromium.org/9572001/diff/6001/chrome/browser/net/chrome_network_delegate.cc#newcode197 chrome/browser/net/chrome_network_delegate.cc:197: // NULL ...
8 years, 9 months ago (2012-03-01 20:30:09 UTC) #7
willchan no longer on Chromium
On 2012/03/01 19:47:11, michaeln wrote: > > > void AppCachePolicy::AddUserDataForUpdateRequest(job, req); > > > > ...
8 years, 9 months ago (2012-03-01 21:13:55 UTC) #8
michaeln
Jochen pinged me offline and we chatted some about this. I think (hope) he's going ...
8 years, 9 months ago (2012-03-02 01:51:57 UTC) #9
jam
last iteration is much smaller and easier to review, thanks! what about my comment #4? ...
8 years, 9 months ago (2012-03-02 15:53:40 UTC) #10
jochen (gone - plz use gerrit)
On 2012/03/02 15:53:40, John Abd-El-Malek wrote: > last iteration is much smaller and easier to ...
8 years, 9 months ago (2012-03-02 15:58:37 UTC) #11
willchan no longer on Chromium
I took a quick look and this seems more like what I had in mind. ...
8 years, 9 months ago (2012-03-02 22:17:54 UTC) #12
michaeln
https://chromiumcodereview.appspot.com/9572001/diff/14009/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): https://chromiumcodereview.appspot.com/9572001/diff/14009/chrome/browser/net/chrome_network_delegate.cc#newcode202 chrome/browser/net/chrome_network_delegate.cc:202: request->url(), request->first_party_for_cookies()); Do we need to update appcache_update_job.cc to ...
8 years, 9 months ago (2012-03-03 18:59:36 UTC) #13
jochen (gone - plz use gerrit)
https://chromiumcodereview.appspot.com/9572001/diff/14009/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): https://chromiumcodereview.appspot.com/9572001/diff/14009/chrome/browser/net/chrome_network_delegate.cc#newcode202 chrome/browser/net/chrome_network_delegate.cc:202: request->url(), request->first_party_for_cookies()); On 2012/03/03 18:59:37, michaeln wrote: > Do ...
8 years, 9 months ago (2012-03-05 08:17:36 UTC) #14
cbentzel
This seems fine. It opens the door for additional cleanup - removing the cookie methods ...
8 years, 9 months ago (2012-03-05 12:56:11 UTC) #15
willchan no longer on Chromium
On Mon, Mar 5, 2012 at 4:56 AM, <cbentzel@chromium.org> wrote: > This seems fine. It ...
8 years, 9 months ago (2012-03-05 18:31:54 UTC) #16
jam
On 2012/03/02 15:58:37, jochen wrote: > On 2012/03/02 15:53:40, John Abd-El-Malek wrote: > > last ...
8 years, 9 months ago (2012-03-05 19:11:02 UTC) #17
willchan no longer on Chromium
The parts I own LGTM, I just sent some nits and what not. https://chromiumcodereview.appspot.com/9572001/diff/6001/content/public/common/content_url_request_user_data.h File ...
8 years, 9 months ago (2012-03-06 02:59:00 UTC) #18
jochen (gone - plz use gerrit)
On 2012/03/05 19:11:02, John Abd-El-Malek wrote: > On 2012/03/02 15:58:37, jochen wrote: > > On ...
8 years, 9 months ago (2012-03-06 18:39:40 UTC) #19
jochen (gone - plz use gerrit)
http://codereview.chromium.org/9572001/diff/14009/content/browser/renderer_host/resource_dispatcher_host.cc File content/browser/renderer_host/resource_dispatcher_host.cc (left): http://codereview.chromium.org/9572001/diff/14009/content/browser/renderer_host/resource_dispatcher_host.cc#oldcode1436 content/browser/renderer_host/resource_dispatcher_host.cc:1436: return content::GetContentClient()->browser()->AllowGetCookie( On 2012/03/05 19:11:03, John Abd-El-Malek wrote: > ...
8 years, 9 months ago (2012-03-06 18:39:54 UTC) #20
willchan no longer on Chromium
http://codereview.chromium.org/9572001/diff/14009/content/browser/renderer_host/resource_dispatcher_host.cc File content/browser/renderer_host/resource_dispatcher_host.cc (left): http://codereview.chromium.org/9572001/diff/14009/content/browser/renderer_host/resource_dispatcher_host.cc#oldcode1436 content/browser/renderer_host/resource_dispatcher_host.cc:1436: return content::GetContentClient()->browser()->AllowGetCookie( On 2012/03/06 18:39:54, jochen wrote: > On ...
8 years, 9 months ago (2012-03-06 18:42:29 UTC) #21
jam
On 2012/03/06 18:39:40, jochen wrote: > On 2012/03/05 19:11:02, John Abd-El-Malek wrote: > > On ...
8 years, 9 months ago (2012-03-07 02:01:49 UTC) #22
michaeln
Just to clarify... once this is committed will it result in all requests configured to ...
8 years, 9 months ago (2012-03-07 23:32:29 UTC) #23
jochen (gone - plz use gerrit)
On 2012/03/07 02:01:49, John Abd-El-Malek wrote: > how about just a static function somewhere in ...
8 years, 9 months ago (2012-03-08 12:58:23 UTC) #24
jochen (gone - plz use gerrit)
On 2012/03/07 23:32:29, michaeln wrote: > Just to clarify... once this is committed will it ...
8 years, 9 months ago (2012-03-08 12:59:28 UTC) #25
jochen (gone - plz use gerrit)
http://codereview.chromium.org/9572001/diff/14009/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): http://codereview.chromium.org/9572001/diff/14009/chrome/browser/net/chrome_network_delegate.cc#newcode202 chrome/browser/net/chrome_network_delegate.cc:202: request->url(), request->first_party_for_cookies()); On 2012/03/05 08:17:37, jochen wrote: > On ...
8 years, 9 months ago (2012-03-08 13:00:02 UTC) #26
jam
On 2012/03/08 12:58:23, jochen wrote: > On 2012/03/07 02:01:49, John Abd-El-Malek wrote: > > how ...
8 years, 9 months ago (2012-03-08 16:30:57 UTC) #27
darin (slow to review)
LGTM for src/webkit/
8 years, 9 months ago (2012-03-08 17:53:37 UTC) #28
michaeln
http://codereview.chromium.org/9572001/diff/31018/webkit/appcache/appcache_update_job.cc File webkit/appcache/appcache_update_job.cc (right): http://codereview.chromium.org/9572001/diff/31018/webkit/appcache/appcache_update_job.cc#newcode108 webkit/appcache/appcache_update_job.cc:108: request_->set_first_party_for_cookies(job_->manifest_url_); thnx!
8 years, 9 months ago (2012-03-08 20:12:57 UTC) #29
Peter Kasting
chrome/browser/search_engines LGTM http://codereview.chromium.org/9572001/diff/31018/chrome/browser/search_engines/template_url_fetcher.h File chrome/browser/search_engines/template_url_fetcher.h (right): http://codereview.chromium.org/9572001/diff/31018/chrome/browser/search_engines/template_url_fetcher.h#newcode43 chrome/browser/search_engines/template_url_fetcher.h:43: content::WebContents* web_contents, Nit: Can you add a ...
8 years, 9 months ago (2012-03-08 20:46:27 UTC) #30
commit-bot: I haz the power
8 years, 9 months ago (2012-03-09 10:54:50 UTC) #31

Powered by Google App Engine
This is Rietveld 408576698