• Erik Chen's avatar
    Prepare heap profiling for integration with Android WebView. · cd79b4e1
    Erik Chen authored
    This CL is a refactor with no intended behavior change outside of tests.
    
    Test behavior change:
    * TestDriver::CheckOrStartProfiling now waits for the allocator shim to be
      initialized even if profiling was enabled for the current process via command
      line flags. This is because initialization is asynchronous.
    * TestDriver::ValidateRendererAllocations no longer makes any checks if the
      renderer is not being profiled, since on Android WebView there may not even be
      a renderer process in this case.
    
    Refactor:
    * Moves the C++ side of the android test shim into components/heap_profiling, so
      that the logic can be shared with Android Webview.
    * Renames the test shim from TestAndroidShim to HeapProfilingTestShim.
    * Removes redundant checks in TestDriver::ValidateRendererAllocations.
    
    Change-Id: I4755f6169b0f9c556a86005916aa9150dec6853b
    BUG: 827545
    Reviewed-on: https://chromium-review.googlesource.com/1012542Reviewed-by: default avatarNico Weber <thakis@chromium.org>
    Commit-Queue: Erik Chen <erikchen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#551242}
    cd79b4e1
BUILD.gn 52.9 KB