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

Issue 814993003: Finalize thread-safety design for SafeBrowsingDatabase. (Closed)

Created:
6 years ago by gab
Modified:
5 years, 10 months ago
Reviewers:
mattm
CC:
chromium-reviews, grt+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@a5_threadSafeStoreManager
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Finalize thread-safety design for SafeBrowsingDatabase. By introducing SafeBrowsingDatabase::DatabaseStateManager: SafeBrowsingDatabase::ThreadSafeStateManager's NonThreadSafe twin to manage the DB only state and ensure it's only accessed from the DB's main thread. Also turn scoped_ptr<SafeBrowsingStore> into const scoped_ptr<SafeBrowsingStore>: making it impossible to swap the existing SafeBrowsingStores; thread-safety being otherwise ensured by SafeBrowsingStore's NonThreadSafe impls. This only leaves |reset_factory_| behind as an unchecked member, but it's usage is very restricted and anyone using it further should know to be careful (added extra documentation to highlight this). BUG=440517 Committed: https://crrev.com/2d7b2b2d867cd4dfd348fe8fccb235bba842dc1b Cr-Commit-Position: refs/heads/master@{#315998}

Patch Set 1 : #

Patch Set 2 : merge up to r309688 #

Patch Set 3 : merge up to r315989 #

Patch Set 4 : fix compile post-merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+180 lines, -119 lines) Patch
M chrome/browser/safe_browsing/safe_browsing_database.h View 1 2 2 chunks +109 lines, -45 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_database.cc View 1 2 3 23 chunks +71 lines, -74 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
gab
Hey Matt, this is the follow-up to https://codereview.chromium.org/794273002/diff/40001/chrome/browser/safe_browsing/safe_browsing_database.h#newcode605 Thanks! Gab
6 years ago (2014-12-23 21:40:40 UTC) #4
gab
Hey Matt, please take a look and let me know if you still think this ...
5 years, 10 months ago (2015-01-30 12:46:35 UTC) #5
gab
On 2015/01/30 12:46:35, gab wrote: > Hey Matt, please take a look and let me ...
5 years, 10 months ago (2015-02-10 13:48:44 UTC) #6
mattm
Oops, sorry about that. lgtm
5 years, 10 months ago (2015-02-10 21:33:36 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/814993003/80001
5 years, 10 months ago (2015-02-12 16:40:37 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/58865)
5 years, 10 months ago (2015-02-12 16:54:32 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/814993003/100001
5 years, 10 months ago (2015-02-12 17:01:57 UTC) #14
commit-bot: I haz the power
Committed patchset #4 (id:100001)
5 years, 10 months ago (2015-02-12 18:07:50 UTC) #15
commit-bot: I haz the power
5 years, 10 months ago (2015-02-12 18:08:21 UTC) #16
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/2d7b2b2d867cd4dfd348fe8fccb235bba842dc1b
Cr-Commit-Position: refs/heads/master@{#315998}

Powered by Google App Engine
This is Rietveld 408576698