Cleanup GpuDataManagerImpl[Private] code.
1. BlockSwiftShader() and SwiftShaderAllowed() don't need to be publicly exposed. 2. UnlockedSession is just a copy of AutoUnlock at this point. The added functionality for |owner_| being null was removed. Replace usage with AutoUnlock. 3. GpuDataManagerPrivateImpl::Create() isn't needed. Delete it and use std::make_unique<> instead. 4. GpuDataManagerPrivateImpl initialize variables at definition instead of in constructor initializer list. 5. Remove UnlockedSession before doing something that might notify GpuDataManagerObservers. Observers are already in a ThreadSafeObserverList and are notified by PostTask. 6. GpuDataManagerImplPrivate::ProcessCrashed() doesn't need to run on browser UI thread. The observers are already notified by PostTask. 7. ScopedGpuDataManagerImpl[Private] doesn't need to hold a raw pointer. 8. Use base::NoDestructor<> instead of base::Singleton<>. Bug: none Change-Id: I8bd0829c9fb3b6c11c935872d81bca0971f31629 Reviewed-on: https://chromium-review.googlesource.com/1100974Reviewed-by:Zhenyao Mo <zmo@chromium.org> Commit-Queue: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#567432}
Showing
Please register or sign in to comment