DescriptionFinalize 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 #
Messages
Total messages: 16 (7 generated)
|