Skip to content
  • paulmiller's avatar
    Prepare to call GMS APIs from WebView · 85990128
    paulmiller authored
    - Switch setMetricsSettingListener from a listener to a 1-time query.
    - Replace tryEnableGms with canUseGms. (tryEnableGms will actually be
      removed in a follow-up, since overloading implementations elsewhere
      must be removed first.)
    - Fix the race condition between native AwMetricsServiceClient
      initialization and Java metrics setting query. The Java side will wait
      for native initialization before switching on metrics.
    - Move the native AwMetricsServiceClient implementation to native/,
      replacing AwMetricsServiceSwitch, so it can signal the Java
      AwMetricsServiceClient when it's ready.
    - Fix AwTestBase, which was incorrectly creating AwBrowserContext on the
      test thread. That was preventing us from using assertOnUiThread.
    - ...which requires fixing AwStrictModeTest, which was going out of its
      way to create AwBrowserContext on the UI thread, as runOnMainSync
      doesn't allow redundant invocations.
    - Some miscellaneous comment & whitespace cleanup.
    
    BUG=676523
    
    Review-Url: https://codereview.chromium.org/2611883002
    Cr-Commit-Position: refs/heads/master@{#443776}
    85990128