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

Issue 2351803002: Switching ExtensionSpecialStoragePolicy::IsStorageDurable to use DurableStoragePermissionContext. (Closed)

Created:
4 years, 3 months ago by dougt
Modified:
4 years, 2 months ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org, markusheintz_, msramek+watch_chromium.org, raymes+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Switching IsStorageDurable() to use DurableStoragePermissionContext. ExtensionSpecialStoragePolicy was using cookies_settings to figure out if the given origin was allowed to use durable storage. In order to make this work, the cookies_settings had to use a lower level api (HostContentSettingsMap) to avoid layer violations. We found that we could remove the cookies_settings::IsStorageDurable() and, instead, just have the ExtensionSpecialStoragePolicy access the PermissionManager. BUG=539538 R=raymes, jochen, pfeldman Committed: https://crrev.com/4a19a66d254415f7afb67d6f3c6e6354f280109d Cr-Commit-Position: refs/heads/master@{#424165}

Patch Set 1 #

Patch Set 2 #

Patch Set 3 : Fixed unit test #

Patch Set 4 : more unit test fixes. #

Patch Set 5 : Make sure the profile is set in the constructor to avoid threadsafety concerns. #

Patch Set 6 : Update test to reflect that durable storage is only available on secure origins. #

Total comments: 1

Patch Set 7 : Test for null in policy constructor for test #

Patch Set 8 : Using PermissionManager::Get(). #

Total comments: 4

Patch Set 9 : Fix up for pfeldman's comments #

Total comments: 2

Patch Set 10 : git cl try #

Patch Set 11 : Switching IsStorageDurable() to use DurableStoragePermissionContext. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -40 lines) Patch
M chrome/browser/browsing_data/cookies_tree_model_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -7 lines 0 comments Download
M chrome/browser/extensions/extension_special_storage_policy.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_special_storage_policy.cc View 1 2 3 4 5 6 7 8 7 chunks +16 lines, -9 lines 0 comments Download
M chrome/browser/extensions/extension_special_storage_policy_unittest.cc View 1 2 3 4 5 2 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 chunk +1 line, -2 lines 0 comments Download
M components/content_settings/core/browser/cookie_settings.h View 1 chunk +0 lines, -2 lines 0 comments Download
M components/content_settings/core/browser/cookie_settings.cc View 1 chunk +0 lines, -10 lines 0 comments Download

Messages

Total messages: 70 (55 generated)
dgrogan
Seems reasonable, as long as you can get the unit tests to make sense, but ...
4 years, 3 months ago (2016-09-19 20:52:43 UTC) #10
raymes
Sorry for being slow. Thanks for doing this, overall seems good. https://codereview.chromium.org/2351803002/diff/100001/chrome/browser/extensions/extension_special_storage_policy.cc File chrome/browser/extensions/extension_special_storage_policy.cc (right): ...
4 years, 3 months ago (2016-09-21 07:23:32 UTC) #28
dougt
4 years, 3 months ago (2016-09-21 21:12:56 UTC) #37
raymes
lgtm
4 years, 3 months ago (2016-09-21 23:50:18 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/2351803002/140001
4 years, 3 months ago (2016-09-23 16:39:22 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/265729)
4 years, 3 months ago (2016-09-23 16:49:45 UTC) #42
pfeldman
some friendly style nits for you. https://codereview.chromium.org/2351803002/diff/140001/chrome/browser/extensions/extension_special_storage_policy.cc File chrome/browser/extensions/extension_special_storage_policy.cc (right): https://codereview.chromium.org/2351803002/diff/140001/chrome/browser/extensions/extension_special_storage_policy.cc#newcode119 chrome/browser/extensions/extension_special_storage_policy.cc:119: if (cookie_settings_ == ...
4 years, 3 months ago (2016-09-23 17:12:21 UTC) #44
dougt
jochen, please take a look.
4 years, 2 months ago (2016-10-07 16:12:04 UTC) #52
msramek
Drive by comment! (otherwise browsing_data/ LGTM) https://codereview.chromium.org/2351803002/diff/160001/chrome/browser/browsing_data/cookies_tree_model_unittest.cc File chrome/browser/browsing_data/cookies_tree_model_unittest.cc (right): https://codereview.chromium.org/2351803002/diff/160001/chrome/browser/browsing_data/cookies_tree_model_unittest.cc#newcode85 chrome/browser/browsing_data/cookies_tree_model_unittest.cc:85: const char kExtensionScheme[] ...
4 years, 2 months ago (2016-10-07 16:17:22 UTC) #54
dougt
https://codereview.chromium.org/2351803002/diff/160001/chrome/browser/browsing_data/cookies_tree_model_unittest.cc File chrome/browser/browsing_data/cookies_tree_model_unittest.cc (right): https://codereview.chromium.org/2351803002/diff/160001/chrome/browser/browsing_data/cookies_tree_model_unittest.cc#newcode85 chrome/browser/browsing_data/cookies_tree_model_unittest.cc:85: const char kExtensionScheme[] = "extensionscheme"; On 2016/10/07 16:17:21, msramek ...
4 years, 2 months ago (2016-10-08 02:19:52 UTC) #59
jochen (gone - plz use gerrit)
lgtm please reformat the CL description according to https://www.chromium.org/developers/contributing-code#TOC-Writing-change-list-descriptions
4 years, 2 months ago (2016-10-10 12:43:34 UTC) #60
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/2351803002/200001
4 years, 2 months ago (2016-10-10 15:36:58 UTC) #63
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 2 months ago (2016-10-10 16:24:28 UTC) #67
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/4a19a66d254415f7afb67d6f3c6e6354f280109d Cr-Commit-Position: refs/heads/master@{#424165}
4 years, 2 months ago (2016-10-10 16:26:47 UTC) #69
dougt
4 years, 2 months ago (2016-10-18 20:45:25 UTC) #70
Message was sent while issue was closed.
A revert of this CL (patchset #11 id:200001) has been created in
https://codereview.chromium.org/2426133002/ by dougt@chromium.org.

The reason for reverting is: Caused issue 656495..

Powered by Google App Engine
This is Rietveld 408576698