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

Issue 1701063002: CookieStore: Remove reference counting. (Closed)

Created:
4 years, 10 months ago by mmenke
Modified:
4 years, 9 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@threadsafe
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CookieStore: Remove reference counting. This has caused a number of issues in the past, and having defined lifecycles for objects makes code easier to reason about and maintain. BUG=472744 TBR=alexclarke@chromium.org, creis@chromium.org Committed: https://crrev.com/606c59ca3b9bba3f4a7b1206cb6b1b3c0a8e2c9b Cr-Commit-Position: refs/heads/master@{#379588}

Patch Set 1 #

Patch Set 2 : Update #

Patch Set 3 : Fixes #

Patch Set 4 : Fix ios, chromecast #

Patch Set 5 : Fix #

Total comments: 2

Patch Set 6 : Fix leak #

Total comments: 9

Patch Set 7 : Response to comments #

Patch Set 8 : +std::move #

Patch Set 9 : Small fix #

Total comments: 10

Patch Set 10 : Fix leaks #

Patch Set 11 : Response to comments, merge (oops!) #

Patch Set 12 : Fix BrowsingDataRemover tests #

Total comments: 2

Patch Set 13 : Fix includes #

Total comments: 2

Patch Set 14 : More IWYU fixes #

Total comments: 11

Patch Set 15 : Response to comments #

Patch Set 16 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+861 lines, -830 lines) Patch
M android_webview/browser/net/aw_cookie_store_wrapper.h View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M android_webview/browser/net/aw_cookie_store_wrapper.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M android_webview/browser/net/aw_cookie_store_wrapper_unittest.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M android_webview/browser/net/aw_url_request_context_getter.h View 1 2 2 chunks +0 lines, -2 lines 0 comments Download
M android_webview/browser/net/aw_url_request_context_getter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -4 lines 0 comments Download
M android_webview/native/cookie_manager.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +19 lines, -9 lines 0 comments Download
M chrome/browser/io_thread.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/io_thread.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.cc View 1 2 chunks +6 lines, -9 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 4 chunks +18 lines, -25 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.cc View 1 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/sessions/session_data_deleter.cc View 1 2 3 4 5 6 8 chunks +46 lines, -32 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_test.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +0 lines, -22 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -1 line 0 comments Download
M chromecast/browser/url_request_context_factory.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M chromecast/browser/url_request_context_factory.cc View 1 2 3 4 chunks +6 lines, -9 lines 0 comments Download
M components/policy/core/common/cloud/system_policy_request_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +7 lines, -3 lines 0 comments Download
M components/policy/core/common/cloud/system_policy_request_context.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/net/quota_policy_cookie_store.cc View 1 2 3 4 5 6 3 chunks +8 lines, -7 lines 0 comments Download
M content/public/browser/cookie_store_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -1 line 0 comments Download
M headless/lib/browser/headless_url_request_context_getter.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -0 lines 0 comments Download
M ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +17 lines, -20 lines 0 comments Download
M ios/chrome/browser/browser_state/chrome_browser_state_io_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/browser_state/chrome_browser_state_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -3 lines 0 comments Download
M ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.mm View 1 2 chunks +4 lines, -2 lines 0 comments Download
M ios/chrome/browser/ios_chrome_io_thread.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/ios_chrome_io_thread.mm View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/net/cookie_util.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/net/cookie_util.mm View 1 2 4 chunks +8 lines, -6 lines 0 comments Download
M ios/chrome/browser/safe_browsing/safe_browsing_service.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -2 lines 0 comments Download
M ios/crnet/crnet_environment.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M ios/crnet/crnet_environment.mm View 1 2 chunks +3 lines, -3 lines 0 comments Download
M ios/net/cookies/cookie_store_ios.h View 1 2 3 6 chunks +8 lines, -5 lines 0 comments Download
M ios/net/cookies/cookie_store_ios.mm View 1 2 20 chunks +60 lines, -50 lines 0 comments Download
M ios/net/cookies/cookie_store_ios_unittest.mm View 1 2 3 4 5 6 7 12 chunks +21 lines, -20 lines 0 comments Download
M ios/web/shell/shell_url_request_context_getter.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -3 lines 0 comments Download
M net/cookies/cookie_monster.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M net/cookies/cookie_monster.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +5 lines, -0 lines 0 comments Download
M net/cookies/cookie_monster_perftest.cc View 1 2 8 chunks +10 lines, -8 lines 0 comments Download
M net/cookies/cookie_monster_store_test.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +7 lines, -5 lines 0 comments Download
M net/cookies/cookie_monster_store_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +7 lines, -6 lines 0 comments Download
M net/cookies/cookie_monster_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 48 chunks +110 lines, -90 lines 0 comments Download
M net/cookies/cookie_store.h View 1 4 chunks +4 lines, -4 lines 0 comments Download
M net/cookies/cookie_store.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M net/cookies/cookie_store_test_helpers.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M net/cookies/cookie_store_test_helpers.cc View 1 1 chunk +3 lines, -4 lines 0 comments Download
M net/cookies/cookie_store_unittest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 chunks +374 lines, -419 lines 0 comments Download
M net/url_request/url_request_context.h View 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_context.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M net/url_request/url_request_context_builder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_context_builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +6 lines, -5 lines 0 comments Download
M net/url_request/url_request_context_getter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M net/url_request/url_request_context_storage.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_context_storage.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -3 lines 0 comments Download
M net/url_request/url_request_http_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -2 lines 0 comments Download
M net/url_request/url_request_test_util.cc View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 49 (19 generated)
mmenke
Randy: Mind reviewing? I've sent my other cookie store CLs to Mike, but I'm not ...
4 years, 9 months ago (2016-02-29 20:30:12 UTC) #9
Randy Smith (Not in Mondays)
Sure, no problem; this way I can take some vicarious enjoyment in watching it go ...
4 years, 9 months ago (2016-02-29 21:11:46 UTC) #10
mmenke
On 2016/02/29 21:11:46, Randy Smith - Not in Fridays wrote: > Sure, no problem; this ...
4 years, 9 months ago (2016-02-29 21:34:54 UTC) #11
Randy Smith (Not in Mondays)
I've done an initial review of non-test code in net/, content/, and chrome/, and it ...
4 years, 9 months ago (2016-02-29 22:37:46 UTC) #12
mmenke
https://codereview.chromium.org/1701063002/diff/180001/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc (left): https://codereview.chromium.org/1701063002/diff/180001/chrome/browser/profiles/profile_impl_io_data.cc#oldcode490 chrome/browser/profiles/profile_impl_io_data.cc:490: if (!cookie_store.get()) { On 2016/02/29 22:37:45, Randy Smith - ...
4 years, 9 months ago (2016-02-29 23:00:29 UTC) #13
mmenke
https://codereview.chromium.org/1701063002/diff/220001/content/browser/net/quota_policy_cookie_store.cc File content/browser/net/quota_policy_cookie_store.cc (right): https://codereview.chromium.org/1701063002/diff/220001/content/browser/net/quota_policy_cookie_store.cc#newcode188 content/browser/net/quota_policy_cookie_store.cc:188: return make_scoped_ptr(cookie_monster.release()); On 2016/02/29 23:00:29, mmenke wrote: > On ...
4 years, 9 months ago (2016-03-01 01:40:47 UTC) #14
Randy Smith (Not in Mondays)
Scanned all call sites, and all test code in content/, chrome/ and net/. Still looking ...
4 years, 9 months ago (2016-03-01 20:48:43 UTC) #15
mmenke
Thanks for the review, and calling out the ugliness around ownership - I agree we ...
4 years, 9 months ago (2016-03-01 22:44:45 UTC) #16
mmenke
I'm probably erring on the side of too many reviewers here, but here goes... [+torne]: ...
4 years, 9 months ago (2016-03-02 20:54:20 UTC) #19
Randy Smith (Not in Mondays)
LGTM.
4 years, 9 months ago (2016-03-02 21:39:41 UTC) #20
davidben
content lgtm. https://codereview.chromium.org/1701063002/diff/360001/content/public/browser/cookie_store_factory.h File content/public/browser/cookie_store_factory.h (left): https://codereview.chromium.org/1701063002/diff/360001/content/public/browser/cookie_store_factory.h#oldcode12 content/public/browser/cookie_store_factory.h:12: #include "base/memory/ref_counted.h" I think you still need ...
4 years, 9 months ago (2016-03-02 21:41:15 UTC) #21
mmenke
https://codereview.chromium.org/1701063002/diff/360001/content/public/browser/cookie_store_factory.h File content/public/browser/cookie_store_factory.h (left): https://codereview.chromium.org/1701063002/diff/360001/content/public/browser/cookie_store_factory.h#oldcode12 content/public/browser/cookie_store_factory.h:12: #include "base/memory/ref_counted.h" On 2016/03/02 21:41:15, davidben wrote: > I ...
4 years, 9 months ago (2016-03-02 21:46:29 UTC) #22
Nicolas Zea
sync LGTM https://codereview.chromium.org/1701063002/diff/380001/chrome/browser/sync/test/integration/sync_test.cc File chrome/browser/sync/test/integration/sync_test.cc (right): https://codereview.chromium.org/1701063002/diff/380001/chrome/browser/sync/test/integration/sync_test.cc#newcode87 chrome/browser/sync/test/integration/sync_test.cc:87: #include "net/url_request/url_request_context.h" remove the request context and ...
4 years, 9 months ago (2016-03-02 22:33:18 UTC) #23
mmenke
https://codereview.chromium.org/1701063002/diff/380001/chrome/browser/sync/test/integration/sync_test.cc File chrome/browser/sync/test/integration/sync_test.cc (right): https://codereview.chromium.org/1701063002/diff/380001/chrome/browser/sync/test/integration/sync_test.cc#newcode87 chrome/browser/sync/test/integration/sync_test.cc:87: #include "net/url_request/url_request_context.h" On 2016/03/02 22:33:18, Nicolas Zea wrote: > ...
4 years, 9 months ago (2016-03-02 22:37:10 UTC) #24
lcwu1
chromecast lgtm
4 years, 9 months ago (2016-03-02 23:20:45 UTC) #25
sky
https://codereview.chromium.org/1701063002/diff/400001/chrome/browser/sessions/session_data_deleter.cc File chrome/browser/sessions/session_data_deleter.cc (right): https://codereview.chromium.org/1701063002/diff/400001/chrome/browser/sessions/session_data_deleter.cc#newcode94 chrome/browser/sessions/session_data_deleter.cc:94: url_request_context_getter)); Is URLRequestContextGetter thread safe? https://codereview.chromium.org/1701063002/diff/400001/chrome/browser/sessions/session_data_deleter.cc#newcode117 chrome/browser/sessions/session_data_deleter.cc:117: // Shouldn't ...
4 years, 9 months ago (2016-03-03 00:58:57 UTC) #26
mmenke
https://codereview.chromium.org/1701063002/diff/400001/chrome/browser/sessions/session_data_deleter.cc File chrome/browser/sessions/session_data_deleter.cc (right): https://codereview.chromium.org/1701063002/diff/400001/chrome/browser/sessions/session_data_deleter.cc#newcode94 chrome/browser/sessions/session_data_deleter.cc:94: url_request_context_getter)); On 2016/03/03 00:58:56, sky wrote: > Is URLRequestContextGetter ...
4 years, 9 months ago (2016-03-03 01:14:40 UTC) #27
sky
Ok, LGTM
4 years, 9 months ago (2016-03-03 04:28:09 UTC) #28
Mike West
net/cookies and chrome/browser/browsing_data LGTM, thanks!
4 years, 9 months ago (2016-03-03 09:18:05 UTC) #29
droger
ios/ LGTM
4 years, 9 months ago (2016-03-03 13:22:06 UTC) #30
Torne
android_webview LGTM
4 years, 9 months ago (2016-03-05 01:02:08 UTC) #32
Thiemo Nagel
https://codereview.chromium.org/1701063002/diff/400001/components/policy/core/common/cloud/system_policy_request_context.h File components/policy/core/common/cloud/system_policy_request_context.h (right): https://codereview.chromium.org/1701063002/diff/400001/components/policy/core/common/cloud/system_policy_request_context.h#newcode28 components/policy/core/common/cloud/system_policy_request_context.h:28: // Overridden from net::URLRequestContextGetter: Could you please document that ...
4 years, 9 months ago (2016-03-07 14:03:42 UTC) #33
mmenke
https://codereview.chromium.org/1701063002/diff/400001/components/policy/core/common/cloud/system_policy_request_context.h File components/policy/core/common/cloud/system_policy_request_context.h (right): https://codereview.chromium.org/1701063002/diff/400001/components/policy/core/common/cloud/system_policy_request_context.h#newcode28 components/policy/core/common/cloud/system_policy_request_context.h:28: // Overridden from net::URLRequestContextGetter: On 2016/03/07 14:03:42, Thiemo Nagel ...
4 years, 9 months ago (2016-03-07 14:29:20 UTC) #34
Thiemo Nagel
components/policy LGTM https://codereview.chromium.org/1701063002/diff/400001/components/policy/core/common/cloud/system_policy_request_context.h File components/policy/core/common/cloud/system_policy_request_context.h (right): https://codereview.chromium.org/1701063002/diff/400001/components/policy/core/common/cloud/system_policy_request_context.h#newcode28 components/policy/core/common/cloud/system_policy_request_context.h:28: // Overridden from net::URLRequestContextGetter: On 2016/03/07 14:29:20, ...
4 years, 9 months ago (2016-03-07 17:01:21 UTC) #35
mmenke
[+creis] For content/, now that David's no longer an owner. TBRing last two owners (alexclarke ...
4 years, 9 months ago (2016-03-07 17:53:28 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1701063002/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1701063002/440001
4 years, 9 months ago (2016-03-07 17:54:14 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1701063002/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1701063002/440001
4 years, 9 months ago (2016-03-07 18:00:10 UTC) #44
commit-bot: I haz the power
Committed patchset #16 (id:440001)
4 years, 9 months ago (2016-03-07 18:21:05 UTC) #46
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/606c59ca3b9bba3f4a7b1206cb6b1b3c0a8e2c9b Cr-Commit-Position: refs/heads/master@{#379588}
4 years, 9 months ago (2016-03-07 18:22:34 UTC) #48
Charlie Reis
4 years, 9 months ago (2016-03-07 19:17:12 UTC) #49
Message was sent while issue was closed.
Yep, content/ LGTM.

Powered by Google App Engine
This is Rietveld 408576698