• Nate Fischer's avatar
    AW: move getSafeBrowsingPrivacyPolicyUrl to UI thread · 6a66c00f
    Nate Fischer authored
    This is a follow-up to http://crrev/c/958229.
    
    This moves the implementation of getSafeBrowsingPrivacyPolicyUrl() to
    the UI thread, and adds a DCHECK to assert this. This was done under
    boliu@'s recommendation, since AwBrowserContext seems like it should be
    used mainly on the UI thread only (based on how content::BrowserContext
    is used).
    
    We still permit apps to call WebView#getSafeBrowsingPrivacyPolicyUrl()
    on any thread, since it is a static method. We accommodate this by
    blocking and running on the UI thread.
    
    Test: run_webview_instrumentation_test_apk -f SafeBrowsingTest#testGetSafeBrowsingPrivacyPolicyUrl
    Change-Id: I275825d6a49e08247e2839ec4a93272ce4204c98
    Reviewed-on: https://chromium-review.googlesource.com/958040Reviewed-by: default avatarBo <boliu@chromium.org>
    Commit-Queue: Nate Fischer <ntfschr@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#542901}
    6a66c00f
aw_contents_statics.cc 5.11 KB