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

Issue 2655443003: Unify the "get" and "set" cookie access settings. (Closed)

Created:
3 years, 11 months ago by falken
Modified:
3 years, 10 months ago
CC:
cbentzel+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, extensions-reviews_chromium.org, jam, jochen+watch_chromium.org, markusheintz_, marq+watch_chromium.org, mlamouri+watch-permissions_chromium.org, mlamouri+watch-content_chromium.org, msramek+watch_chromium.org, noyau+watch_chromium.org, Peter Beverloo, pkl (ping after 24h if needed), raymes+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactoring: Unify the "get" and "set" cookie access settings. This is just code cleanup, no behavior change is expected. The underlying "get" and "set" cookie access checks are done in StaticCookiePolicy, but CanGetCookies() and CanSetCookie() were identical code, since the commit https://crrev.com/c90ddfcfd61ae1fb403814e7794ca3a86aa548b2. Since the checks were identical, this patch unifies them into a single function to simplify the API and callsites. I'm using bug 350870 just to help link this commit with the above-mentioned c90ddfcfd61a. BUG=350870 TBR=jochen,rogerta for mechanical-only changes Review-Url: https://codereview.chromium.org/2655443003 Cr-Commit-Position: refs/heads/master@{#446576} Committed: https://chromium.googlesource.com/chromium/src/+/7169140ae183cec72446399946a4cd0b79ea6dec

Patch Set 1 #

Patch Set 2 : fix android #

Total comments: 6

Patch Set 3 : rebase #

Patch Set 4 : comments #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -291 lines) Patch
M android_webview/browser/aw_cookie_access_policy.cc View 1 1 chunk +4 lines, -5 lines 0 comments Download
M chrome/browser/browsing_data/cookies_tree_model_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 7 chunks +10 lines, -11 lines 0 comments Download
M chrome/browser/content_settings/cookie_settings_factory_unittest.cc View 2 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map_unittest.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/content_settings/content_settings_api.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/api/content_settings/content_settings_apitest.cc View 3 chunks +4 lines, -7 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 3 4 3 chunks +3 lines, -9 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/storage/durable_storage_permission_context.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/content_settings/content_setting_bubble_model.cc View 1 chunk +1 line, -2 lines 0 comments Download
M components/content_settings/core/browser/cookie_settings.h View 1 2 3 2 chunks +5 lines, -22 lines 0 comments Download
M components/content_settings/core/browser/cookie_settings.cc View 3 chunks +13 lines, -48 lines 0 comments Download
M components/content_settings/core/browser/cookie_settings_unittest.cc View 6 chunks +32 lines, -63 lines 0 comments Download
M components/signin/core/browser/signin_header_helper.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/shell/browser/shell_network_delegate.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M ios/chrome/browser/net/ios_chrome_network_delegate.cc View 3 chunks +3 lines, -8 lines 0 comments Download
M net/base/static_cookie_policy.h View 1 2 3 1 chunk +3 lines, -7 lines 0 comments Download
M net/base/static_cookie_policy.cc View 1 chunk +1 line, -23 lines 0 comments Download
M net/base/static_cookie_policy_unittest.cc View 2 chunks +22 lines, -49 lines 0 comments Download

Messages

Total messages: 45 (25 generated)
falken
ptal.
3 years, 11 months ago (2017-01-24 10:32:42 UTC) #11
Mike West
It's entirely possible we'll have to revisit removing this in the somewhat near future, because ...
3 years, 10 months ago (2017-01-25 10:25:27 UTC) #12
falken
Thanks, adding some owners. bnc: net/ msramek: chrome/browser/browsing_data/, chrome/browser/content_settings, components/content_settings
3 years, 10 months ago (2017-01-25 14:08:26 UTC) #15
Bence
net/ LGTM.
3 years, 10 months ago (2017-01-25 14:12:48 UTC) #16
msramek
browsing_data/, content_settings/ LGTM I appreciate that the code is now clearer on what the cookie ...
3 years, 10 months ago (2017-01-25 14:41:30 UTC) #17
falken
msramek: Thanks, but a question: https://codereview.chromium.org/2655443003/diff/20001/components/content_settings/core/browser/cookie_settings.cc File components/content_settings/core/browser/cookie_settings.cc (right): https://codereview.chromium.org/2655443003/diff/20001/components/content_settings/core/browser/cookie_settings.cc#newcode164 components/content_settings/core/browser/cookie_settings.cc:164: *cookie_setting = block ? ...
3 years, 10 months ago (2017-01-25 14:55:51 UTC) #18
msramek
https://codereview.chromium.org/2655443003/diff/20001/components/content_settings/core/browser/cookie_settings.cc File components/content_settings/core/browser/cookie_settings.cc (right): https://codereview.chromium.org/2655443003/diff/20001/components/content_settings/core/browser/cookie_settings.cc#newcode164 components/content_settings/core/browser/cookie_settings.cc:164: *cookie_setting = block ? CONTENT_SETTING_BLOCK : setting; On 2017/01/25 ...
3 years, 10 months ago (2017-01-25 15:03:23 UTC) #19
falken
https://codereview.chromium.org/2655443003/diff/20001/components/content_settings/core/browser/cookie_settings.cc File components/content_settings/core/browser/cookie_settings.cc (right): https://codereview.chromium.org/2655443003/diff/20001/components/content_settings/core/browser/cookie_settings.cc#newcode164 components/content_settings/core/browser/cookie_settings.cc:164: *cookie_setting = block ? CONTENT_SETTING_BLOCK : setting; On 2017/01/25 ...
3 years, 10 months ago (2017-01-25 15:05:40 UTC) #20
falken
Adding more owners. rdevlin.cronin: chrome/browser/extensions/, extensions/ droger: ios/chrome/browser/net/ boliu: android_webview/ mef: chrome/browser/net/chrome_network_delegate.cc
3 years, 10 months ago (2017-01-25 15:21:50 UTC) #22
Devlin
extensions lgtm
3 years, 10 months ago (2017-01-25 16:04:23 UTC) #25
boliu
lgtm android_webview rs lgtm
3 years, 10 months ago (2017-01-25 16:38:51 UTC) #28
mef
Could you elaborate on this CL? I was under impression that CanGetCookie and CanSetCookie is ...
3 years, 10 months ago (2017-01-25 16:56:13 UTC) #29
Ryan Sleevi
On 2017/01/25 16:56:13, mef wrote: > Could you elaborate on this CL? > > I ...
3 years, 10 months ago (2017-01-25 17:08:19 UTC) #30
falken
On 2017/01/25 17:08:19, Ryan Sleevi wrote: > On 2017/01/25 16:56:13, mef wrote: > > Could ...
3 years, 10 months ago (2017-01-26 01:17:34 UTC) #31
droger
ios lgtm
3 years, 10 months ago (2017-01-26 13:18:06 UTC) #32
mef
On 2017/01/26 01:17:34, falken wrote: > On 2017/01/25 17:08:19, Ryan Sleevi wrote: > > On ...
3 years, 10 months ago (2017-01-26 22:49:49 UTC) #33
falken
Thanks, I've also updated the CL description. I will TBR owners for the remaining purely ...
3 years, 10 months ago (2017-01-27 01:22:56 UTC) #36
falken
TBR'ing owners for the remaining mechanical only changes. jochen: chrome/browser/renderer_host/chrome_render_message_filter.cc chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc chrome/browser/storage/durable_storage_permission_context.cc chrome/browser/ui/content_settings/content_setting_bubble_model.cc rogerta: components/signin/core/browser/signin_header_helper.cc
3 years, 10 months ago (2017-01-27 01:24:58 UTC) #38
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/2655443003/80001
3 years, 10 months ago (2017-01-27 01:34:10 UTC) #42
commit-bot: I haz the power
3 years, 10 months ago (2017-01-27 03:38:43 UTC) #45
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/7169140ae183cec72446399946a4...

Powered by Google App Engine
This is Rietveld 408576698