[Browser/WebTaskEnvironment] Mass-migrate away from Test(Browser|Web)ThreadBundle

This is
 1) s/TestBrowserThreadBundle/BrowserTaskEnvironment/ on src/
 2) s/([^/])\b\w*thread_bundle(_)?/\1task_environment\2/ on files modified in (1)
 3) git cl format
 4) Manually fix up remainder "ThreadBundle" and "thread_bundle" found via
    string search on the whole of src/.

For ease of review:
 * Step #3 is the diff between patch sets 1..2
 * Step #4 is the diff between patch sets 2..3

[email protected]
(for post-review owners bypass per mechanical change)

Bug: 992483
Change-Id: I4945141f6d78bdc6c98444198e5012ddc8e5bff0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1758440
Reviewed-by: Gabriel Charette <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: Gabriel Charette <[email protected]>
Auto-Submit: Gabriel Charette <[email protected]>
Cr-Commit-Position: refs/heads/master@{#688755}
diff --git a/chrome/browser/after_startup_task_utils_unittest.cc b/chrome/browser/after_startup_task_utils_unittest.cc
index 4d3e9dc..d64d6d2 100644
--- a/chrome/browser/after_startup_task_utils_unittest.cc
+++ b/chrome/browser/after_startup_task_utils_unittest.cc
@@ -128,7 +128,7 @@
     loop->Quit();
   }
 
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(AfterStartupTaskTest, IsStartupComplete) {
diff --git a/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc b/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc
index 3ff522fb..d7cff1a 100644
--- a/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc
+++ b/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc
@@ -79,7 +79,7 @@
 
   std::unique_ptr<TestingProfile> profile_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   BookmarkModel* model_;
   MockObserver observer_;
diff --git a/chrome/browser/android/chrome_backup_agent_unittest.cc b/chrome/browser/android/chrome_backup_agent_unittest.cc
index 4e9ad2c..269b4bc 100644
--- a/chrome/browser/android/chrome_backup_agent_unittest.cc
+++ b/chrome/browser/android/chrome_backup_agent_unittest.cc
@@ -47,7 +47,7 @@
     registry_->RegisterBooleanPref("dummy", false);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::vector<std::string> expected_pref_names_;
   TestingProfileManager testing_profile_manager_;
   TestingProfile* testing_profile_;
diff --git a/chrome/browser/android/customtabs/detached_resource_request_unittest.cc b/chrome/browser/android/customtabs/detached_resource_request_unittest.cc
index 609edf9..c4b6442 100644
--- a/chrome/browser/android/customtabs/detached_resource_request_unittest.cc
+++ b/chrome/browser/android/customtabs/detached_resource_request_unittest.cc
@@ -193,7 +193,7 @@
 class DetachedResourceRequestTest : public ::testing::Test {
  public:
   DetachedResourceRequestTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {}
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD) {}
   ~DetachedResourceRequestTest() override = default;
 
   void SetUp() override {
@@ -288,7 +288,7 @@
 
  private:
   std::unique_ptr<TestingProfile> profile_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<content::TestHostResolver> host_resolver_;
   std::unique_ptr<net::EmbeddedTestServer> test_server_;
 };
diff --git a/chrome/browser/android/download/available_offline_content_provider_unittest.cc b/chrome/browser/android/download/available_offline_content_provider_unittest.cc
index 3c244b08..83d15615 100644
--- a/chrome/browser/android/download/available_offline_content_provider_unittest.cc
+++ b/chrome/browser/android/download/available_offline_content_provider_unittest.cc
@@ -144,7 +144,7 @@
     return std::make_tuple(list_visible_by_prefs, std::move(suggestions));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_ =
       std::make_unique<base::test::ScopedFeatureList>();
diff --git a/chrome/browser/android/explore_sites/ntp_json_fetcher_unittest.cc b/chrome/browser/android/explore_sites/ntp_json_fetcher_unittest.cc
index 5a1637b..2f98a38 100644
--- a/chrome/browser/android/explore_sites/ntp_json_fetcher_unittest.cc
+++ b/chrome/browser/android/explore_sites/ntp_json_fetcher_unittest.cc
@@ -24,7 +24,7 @@
 class NTPJsonFetcherTest : public testing::Test {
  public:
   NTPJsonFetcherTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         https_server_(net::EmbeddedTestServer::TYPE_HTTPS) {}
 
   void SetUp() {
@@ -107,7 +107,7 @@
 
   std::unique_ptr<NTPCatalog> catalog_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile browser_context_;
   net::EmbeddedTestServer https_server_;
 
diff --git a/chrome/browser/android/feed/history/feed_history_helper_unittest.cc b/chrome/browser/android/feed/history/feed_history_helper_unittest.cc
index 2c329c7..5bf90cb 100644
--- a/chrome/browser/android/feed/history/feed_history_helper_unittest.cc
+++ b/chrome/browser/android/feed/history/feed_history_helper_unittest.cc
@@ -57,7 +57,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   history::HistoryService* history_service_;
   TestingProfile profile_;
   std::unique_ptr<FeedHistoryHelper> feed_history_helper_;
diff --git a/chrome/browser/android/history_report/data_observer_unittest.cc b/chrome/browser/android/history_report/data_observer_unittest.cc
index 85b5c4f9..4cbf92a 100644
--- a/chrome/browser/android/history_report/data_observer_unittest.cc
+++ b/chrome/browser/android/history_report/data_observer_unittest.cc
@@ -83,7 +83,8 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;  // To set up BrowserThreads.
+  content::BrowserTaskEnvironment
+      task_environment_;  // To set up BrowserThreads.
 
   base::ScopedTempDir temp_dir_;
   std::unique_ptr<MockDeltaFileService> delta_file_service_;
diff --git a/chrome/browser/android/locale/locale_template_url_loader_unittest.cc b/chrome/browser/android/locale/locale_template_url_loader_unittest.cc
index d41a7ce..1210d86 100644
--- a/chrome/browser/android/locale/locale_template_url_loader_unittest.cc
+++ b/chrome/browser/android/locale/locale_template_url_loader_unittest.cc
@@ -53,7 +53,8 @@
   TemplateURLService* model() { return test_util_->model(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;  // To set up BrowserThreads.
+  content::BrowserTaskEnvironment
+      task_environment_;  // To set up BrowserThreads.
   std::unique_ptr<LocaleTemplateUrlLoader> loader_;
   std::unique_ptr<TemplateURLServiceTestUtil> test_util_;
 
diff --git a/chrome/browser/android/password_ui_view_android_unittest.cc b/chrome/browser/android/password_ui_view_android_unittest.cc
index d97493c9..040265f 100644
--- a/chrome/browser/android/password_ui_view_android_unittest.cc
+++ b/chrome/browser/android/password_ui_view_android_unittest.cc
@@ -106,7 +106,7 @@
     ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager testing_profile_manager_;
   TestingProfile* testing_profile_;
   JNIEnv* env_;
diff --git a/chrome/browser/android/search_permissions/search_permissions_service_unittest.cc b/chrome/browser/android/search_permissions/search_permissions_service_unittest.cc
index ce1d178..6e34df9c 100644
--- a/chrome/browser/android/search_permissions/search_permissions_service_unittest.cc
+++ b/chrome/browser/android/search_permissions/search_permissions_service_unittest.cc
@@ -161,7 +161,7 @@
 
  private:
   std::unique_ptr<TestingProfile> profile_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // This is owned by the SearchPermissionsService which is owned by the
   // profile.
diff --git a/chrome/browser/android/signin/signin_manager_android_unittest.cc b/chrome/browser/android/signin/signin_manager_android_unittest.cc
index 36c96e4..693f1b6d 100644
--- a/chrome/browser/android/signin/signin_manager_android_unittest.cc
+++ b/chrome/browser/android/signin/signin_manager_android_unittest.cc
@@ -98,7 +98,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   TestingProfile* profile_;  // Owned by |profile_manager_|.
 
diff --git a/chrome/browser/android/webapk/webapk_icon_hasher_unittest.cc b/chrome/browser/android/webapk/webapk_icon_hasher_unittest.cc
index 1b6dce26..b2e01534 100644
--- a/chrome/browser/android/webapk/webapk_icon_hasher_unittest.cc
+++ b/chrome/browser/android/webapk/webapk_icon_hasher_unittest.cc
@@ -73,7 +73,7 @@
 class WebApkIconHasherTest : public ::testing::Test {
  public:
   WebApkIconHasherTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
   ~WebApkIconHasherTest() override {}
 
  protected:
@@ -82,7 +82,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   network::TestURLLoaderFactory test_url_loader_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(WebApkIconHasherTest);
diff --git a/chrome/browser/android/webapk/webapk_installer_unittest.cc b/chrome/browser/android/webapk/webapk_installer_unittest.cc
index 8f88933..fbefc5ae 100644
--- a/chrome/browser/android/webapk/webapk_installer_unittest.cc
+++ b/chrome/browser/android/webapk/webapk_installer_unittest.cc
@@ -270,7 +270,7 @@
       WebApkResponseBuilder;
 
   WebApkInstallerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
   ~WebApkInstallerTest() override {}
 
   void SetUp() override {
@@ -338,7 +338,7 @@
   }
 
   std::unique_ptr<TestingProfile> profile_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   net::EmbeddedTestServer test_server_;
 
   // Builds response to the WebAPK creation request.
diff --git a/chrome/browser/app_controller_mac_unittest.mm b/chrome/browser/app_controller_mac_unittest.mm
index 3327cc8..e7a3475 100644
--- a/chrome/browser/app_controller_mac_unittest.mm
+++ b/chrome/browser/app_controller_mac_unittest.mm
@@ -39,7 +39,7 @@
     PlatformTest::TearDown();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   TestingProfile* profile_;
 };
diff --git a/chrome/browser/apps/app_shim/extension_app_shim_handler_mac_unittest.cc b/chrome/browser/apps/app_shim/extension_app_shim_handler_mac_unittest.cc
index 94c39470..b2af989 100644
--- a/chrome/browser/apps/app_shim/extension_app_shim_handler_mac_unittest.cc
+++ b/chrome/browser/apps/app_shim/extension_app_shim_handler_mac_unittest.cc
@@ -399,7 +399,7 @@
     handler_->OnShimSetHidden(host, hidden);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   MockDelegate* delegate_;
   std::unique_ptr<TestingExtensionAppShimHandler> handler_;
   base::FilePath profile_path_a_;
diff --git a/chrome/browser/apps/user_type_filter_unittest.cc b/chrome/browser/apps/user_type_filter_unittest.cc
index 652c69e..a27cdf5b 100644
--- a/chrome/browser/apps/user_type_filter_unittest.cc
+++ b/chrome/browser/apps/user_type_filter_unittest.cc
@@ -69,7 +69,7 @@
 
  private:
   // To support context of browser threads.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(UserTypeFilterTest);
 };
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client_unittest.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client_unittest.cc
index fd037b2..e902877 100644
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client_unittest.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client_unittest.cc
@@ -63,7 +63,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<ChromeAutocompleteProviderClient> client_;
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier_unittest.cc b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier_unittest.cc
index 6fa9716..5e3daf8a 100644
--- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier_unittest.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier_unittest.cc
@@ -26,7 +26,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<ChromeAutocompleteSchemeClassifier> scheme_classifier_;
 };
diff --git a/chrome/browser/autocomplete/search_provider_unittest.cc b/chrome/browser/autocomplete/search_provider_unittest.cc
index e4ee882..b50bb4b 100644
--- a/chrome/browser/autocomplete/search_provider_unittest.cc
+++ b/chrome/browser/autocomplete/search_provider_unittest.cc
@@ -279,7 +279,7 @@
   const base::string16 keyword_term_;
   GURL keyword_url_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   network::TestURLLoaderFactory test_url_loader_factory_;
   TestingProfile profile_;
diff --git a/chrome/browser/autocomplete/shortcuts_provider_extension_unittest.cc b/chrome/browser/autocomplete/shortcuts_provider_extension_unittest.cc
index e59730d..e30ba12 100644
--- a/chrome/browser/autocomplete/shortcuts_provider_extension_unittest.cc
+++ b/chrome/browser/autocomplete/shortcuts_provider_extension_unittest.cc
@@ -57,7 +57,7 @@
   void SetUp() override;
   void TearDown() override;
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   ChromeAutocompleteProviderClient client_;
   scoped_refptr<ShortcutsBackend> backend_;
diff --git a/chrome/browser/availability/availability_prober_unittest.cc b/chrome/browser/availability/availability_prober_unittest.cc
index 4ce3d34..a4cbcbb 100644
--- a/chrome/browser/availability/availability_prober_unittest.cc
+++ b/chrome/browser/availability/availability_prober_unittest.cc
@@ -88,7 +88,7 @@
 class AvailabilityProberTest : public testing::Test {
  public:
   AvailabilityProberTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
         test_shared_loader_factory_(
             base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
                 &test_url_loader_factory_)),
@@ -129,17 +129,17 @@
             AvailabilityProber::ClientName::kLitepages, kTestUrl,
             AvailabilityProber::HttpMethod::kGet, headers, retry_policy,
             timeout_policy, TRAFFIC_ANNOTATION_FOR_TESTS, 1,
-            kCacheRevalidateAfter, thread_bundle_.GetMockTickClock(),
-            thread_bundle_.GetMockClock());
+            kCacheRevalidateAfter, task_environment_.GetMockTickClock(),
+            task_environment_.GetMockClock());
     prober->SetOnCompleteCallback(base::BindRepeating(
         &AvailabilityProberTest::OnProbeComplete, base::Unretained(this)));
     return prober;
   }
 
-  void RunUntilIdle() { thread_bundle_.RunUntilIdle(); }
+  void RunUntilIdle() { task_environment_.RunUntilIdle(); }
 
   void FastForward(base::TimeDelta delta) {
-    thread_bundle_.FastForwardBy(delta);
+    task_environment_.FastForwardBy(delta);
   }
 
   void MakeResponseAndWait(net::HttpStatusCode http_status,
@@ -198,7 +198,7 @@
   base::Optional<bool> callback_result() { return callback_result_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   network::TestURLLoaderFactory test_url_loader_factory_;
   scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_;
   TestDelegate test_delegate_;
diff --git a/chrome/browser/background/background_contents_service_unittest.cc b/chrome/browser/background/background_contents_service_unittest.cc
index b1435f69..188e321 100644
--- a/chrome/browser/background/background_contents_service_unittest.cc
+++ b/chrome/browser/background/background_contents_service_unittest.cc
@@ -61,7 +61,7 @@
     return url;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<base::CommandLine> command_line_;
 };
 
diff --git a/chrome/browser/background/background_mode_manager_unittest.cc b/chrome/browser/background/background_mode_manager_unittest.cc
index 301a72262..32ddd52 100644
--- a/chrome/browser/background/background_mode_manager_unittest.cc
+++ b/chrome/browser/background/background_mode_manager_unittest.cc
@@ -181,7 +181,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<base::CommandLine> command_line_;
 
   std::unique_ptr<TestingProfileManager> profile_manager_;
@@ -270,7 +270,7 @@
 
  private:
   // Required for extension service.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // BackgroundModeManager actually affects Chrome start/stop state,
   // tearing down our thread bundle before we've had chance to clean
diff --git a/chrome/browser/background_fetch/background_fetch_delegate_impl_unittest.cc b/chrome/browser/background_fetch/background_fetch_delegate_impl_unittest.cc
index 340d5462..b299b88 100644
--- a/chrome/browser/background_fetch/background_fetch_delegate_impl_unittest.cc
+++ b/chrome/browser/background_fetch/background_fetch_delegate_impl_unittest.cc
@@ -51,7 +51,7 @@
  protected:
   // This is used to specify the main thread type of the tests as the UI
   // thread.
-  content::TestBrowserThreadBundle threads_;
+  content::BrowserTaskEnvironment threads_;
 
   std::unique_ptr<ukm::TestAutoSetUkmRecorder> recorder_;
   BackgroundFetchDelegateImpl* delegate_;
diff --git a/chrome/browser/background_sync/background_sync_controller_impl_unittest.cc b/chrome/browser/background_sync/background_sync_controller_impl_unittest.cc
index 01ad1c0..e24ef85e 100644
--- a/chrome/browser/background_sync/background_sync_controller_impl_unittest.cc
+++ b/chrome/browser/background_sync/background_sync_controller_impl_unittest.cc
@@ -52,7 +52,7 @@
 class BackgroundSyncControllerImplTest : public testing::Test {
  protected:
   BackgroundSyncControllerImplTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {
     ResetFieldTrialList();
 #if defined(OS_ANDROID)
     BackgroundSyncLauncherAndroid::SetPlayServicesVersionCheckDisabledForTests(
@@ -93,7 +93,7 @@
     return registration;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<BackgroundSyncControllerImpl> controller_;
   std::unique_ptr<base::FieldTrialList> field_trial_list_;
diff --git a/chrome/browser/badging/badge_manager_unittest.cc b/chrome/browser/badging/badge_manager_unittest.cc
index 5ec4287f..b83a1ce 100644
--- a/chrome/browser/badging/badge_manager_unittest.cc
+++ b/chrome/browser/badging/badge_manager_unittest.cc
@@ -83,7 +83,7 @@
  private:
   TestBadgeManagerDelegate* delegate_;
   BadgeManager* badge_manager_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
   DISALLOW_COPY_AND_ASSIGN(BadgeManagerUnittest);
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc
index e6cb33a..a976b49 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_unittest.cc
@@ -118,7 +118,7 @@
   const GURL url2_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
index 8a5b8a54..7eddb0f 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
@@ -149,7 +149,7 @@
 // Tests bookmark_html_writer by populating a BookmarkModel, writing it out by
 // way of bookmark_html_writer, then using the importer to read it back in.
 TEST_F(BookmarkHTMLWriterTest, Test) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   TestingProfile profile;
   ASSERT_TRUE(profile.CreateHistoryService(true, false));
diff --git a/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc b/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc
index 4575c36..64c4a7c 100644
--- a/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc
+++ b/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc
@@ -37,7 +37,7 @@
 TEST(ManagedBookmarkServiceNoPolicyTest, EmptyManagedNode) {
   // Verifies that the managed node is empty and invisible when the policy is
   // not set.
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile profile;
 
   // Make sure the policy isn't set.
@@ -151,7 +151,7 @@
     return dict->GetString("url", &url) && node->url() == url;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   sync_preferences::TestingPrefServiceSyncable* prefs_;
   bookmarks::MockBookmarkModelObserver observer_;
diff --git a/chrome/browser/browser_about_handler_unittest.cc b/chrome/browser/browser_about_handler_unittest.cc
index 0bc304f..ebba1d9 100644
--- a/chrome/browser/browser_about_handler_unittest.cc
+++ b/chrome/browser/browser_about_handler_unittest.cc
@@ -47,7 +47,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(BrowserAboutHandlerTest, WillHandleBrowserAboutURL) {
diff --git a/chrome/browser/browser_switcher/browser_switcher_prefs_unittest.cc b/chrome/browser/browser_switcher/browser_switcher_prefs_unittest.cc
index 27ba428..9790bf4 100644
--- a/chrome/browser/browser_switcher/browser_switcher_prefs_unittest.cc
+++ b/chrome/browser/browser_switcher/browser_switcher_prefs_unittest.cc
@@ -77,7 +77,7 @@
   BrowserSwitcherPrefs* prefs() { return prefs_.get(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   sync_preferences::TestingPrefServiceSyncable prefs_backend_;
 
diff --git a/chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.cc
index 65f9c22..439d88d 100644
--- a/chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.cc
@@ -23,13 +23,13 @@
 class CannedBrowsingDataAppCacheHelperTest : public testing::Test {
  public:
   CannedBrowsingDataAppCacheHelperTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {}
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD) {}
 
   void TearDown() override {
     // Make sure we run all pending tasks on IO thread before testing
     // profile is destructed.
     content::RunAllPendingInMessageLoop(content::BrowserThread::IO);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
  protected:
@@ -49,7 +49,7 @@
                         }) != collection.end();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/browsing_data/browsing_data_cache_storage_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_cache_storage_helper_unittest.cc
index 0a8f0b16..ef354c3a 100644
--- a/chrome/browser/browsing_data/browsing_data_cache_storage_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_cache_storage_helper_unittest.cc
@@ -22,7 +22,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/browsing_data/browsing_data_cookie_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_cookie_helper_unittest.cc
index e840667..6194325 100644
--- a/chrome/browser/browsing_data/browsing_data_cookie_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_cookie_helper_unittest.cc
@@ -216,7 +216,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> testing_profile_;
 
   std::vector<CookieExpectation> cookie_expectations_;
diff --git a/chrome/browser/browsing_data/browsing_data_database_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_database_helper_unittest.cc
index a2124bf..2e5f645 100644
--- a/chrome/browser/browsing_data/browsing_data_database_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_database_helper_unittest.cc
@@ -14,7 +14,7 @@
 using storage::DatabaseIdentifier;
 
 class CannedBrowsingDataDatabaseHelperTest : public testing::Test {
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(CannedBrowsingDataDatabaseHelperTest, Empty) {
diff --git a/chrome/browser/browsing_data/browsing_data_file_system_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_file_system_helper_unittest.cc
index 4801b08..226c6a9d 100644
--- a/chrome/browser/browsing_data/browsing_data_file_system_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_file_system_helper_unittest.cc
@@ -190,7 +190,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
   // Temporary storage to pass information back from callbacks.
diff --git a/chrome/browser/browsing_data/browsing_data_indexed_db_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_indexed_db_helper_unittest.cc
index 0440132..b045f5e0 100644
--- a/chrome/browser/browsing_data/browsing_data_indexed_db_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_indexed_db_helper_unittest.cc
@@ -22,7 +22,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/browsing_data/browsing_data_local_storage_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_local_storage_helper_unittest.cc
index b74bf060..5586fa0 100644
--- a/chrome/browser/browsing_data/browsing_data_local_storage_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_local_storage_helper_unittest.cc
@@ -12,7 +12,7 @@
 namespace {
 
 class CannedBrowsingDataLocalStorageTest : public testing::Test {
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(CannedBrowsingDataLocalStorageTest, Empty) {
diff --git a/chrome/browser/browsing_data/browsing_data_media_license_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_media_license_helper_unittest.cc
index 1a6fec0..ffa1c37 100644
--- a/chrome/browser/browsing_data/browsing_data_media_license_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_media_license_helper_unittest.cc
@@ -263,7 +263,7 @@
     done_cb.Run();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   scoped_refptr<BrowsingDataMediaLicenseHelper> helper_;
 
diff --git a/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc
index 8b410d5..2a0e6dd 100644
--- a/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc
@@ -111,7 +111,7 @@
     fetching_completed_ = true;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<storage::QuotaManager> quota_manager_;
 
   base::ScopedTempDir dir_;
diff --git a/chrome/browser/browsing_data/browsing_data_service_worker_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_service_worker_helper_unittest.cc
index d6239aab..5ad7b8f 100644
--- a/chrome/browser/browsing_data/browsing_data_service_worker_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_service_worker_helper_unittest.cc
@@ -24,7 +24,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/browsing_data/browsing_data_shared_worker_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_shared_worker_helper_unittest.cc
index 46c315fe..59dfce5 100644
--- a/chrome/browser/browsing_data/browsing_data_shared_worker_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_shared_worker_helper_unittest.cc
@@ -19,7 +19,7 @@
   Profile* profile() { return &profile_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
index 80c45bd..6c5fe73 100644
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
@@ -1125,7 +1125,7 @@
 
     // Make sure the Network Service is started before making a NetworkContext.
     content::GetNetworkService();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
 
     auto network_context = std::make_unique<network::NetworkContext>(
         network::NetworkService::GetNetworkServiceForTesting(),
@@ -1231,7 +1231,7 @@
   // Cached pointer to BrowsingDataRemover for access to testing methods.
   content::BrowsingDataRemover* remover_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   network::mojom::NetworkContextPtr network_context_ptr_;
   network::NetworkContext* network_context_;
   std::unique_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/browsing_data/cookies_tree_model_unittest.cc b/chrome/browser/browsing_data/cookies_tree_model_unittest.cc
index e066b59..0d6127f 100644
--- a/chrome/browser/browsing_data/cookies_tree_model_unittest.cc
+++ b/chrome/browser/browsing_data/cookies_tree_model_unittest.cc
@@ -395,7 +395,7 @@
 #endif
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   scoped_refptr<MockBrowsingDataCookieHelper>
       mock_browsing_data_cookie_helper_;
diff --git a/chrome/browser/browsing_data/counters/bookmark_counter_unittest.cc b/chrome/browser/browsing_data/counters/bookmark_counter_unittest.cc
index 6bf077b..81aa64a 100644
--- a/chrome/browser/browsing_data/counters/bookmark_counter_unittest.cc
+++ b/chrome/browser/browsing_data/counters/bookmark_counter_unittest.cc
@@ -57,7 +57,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<base::RunLoop> run_loop_;
 
diff --git a/chrome/browser/browsing_data/counters/browsing_data_counter_utils_unittest.cc b/chrome/browser/browsing_data/counters/browsing_data_counter_utils_unittest.cc
index 2c4fde8c..0e59847 100644
--- a/chrome/browser/browsing_data/counters/browsing_data_counter_utils_unittest.cc
+++ b/chrome/browser/browsing_data/counters/browsing_data_counter_utils_unittest.cc
@@ -36,7 +36,7 @@
   TestingProfile* GetProfile() { return &profile_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/browsing_data/counters/hosted_apps_counter_unittest.cc b/chrome/browser/browsing_data/counters/hosted_apps_counter_unittest.cc
index 96cd5f1..c4991c34 100644
--- a/chrome/browser/browsing_data/counters/hosted_apps_counter_unittest.cc
+++ b/chrome/browser/browsing_data/counters/hosted_apps_counter_unittest.cc
@@ -139,7 +139,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   extensions::ExtensionRegistry* extension_registry_;
 
diff --git a/chrome/browser/browsing_data/counters/site_data_counting_helper_unittest.cc b/chrome/browser/browsing_data/counters/site_data_counting_helper_unittest.cc
index 553f5fe..03555d42 100644
--- a/chrome/browser/browsing_data/counters/site_data_counting_helper_unittest.cc
+++ b/chrome/browser/browsing_data/counters/site_data_counting_helper_unittest.cc
@@ -103,7 +103,7 @@
   Profile* profile() { return profile_.get(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 };
 
diff --git a/chrome/browser/browsing_data/counters/site_settings_counter_unittest.cc b/chrome/browser/browsing_data/counters/site_settings_counter_unittest.cc
index dbed6a1..fb9a8b8 100644
--- a/chrome/browser/browsing_data/counters/site_settings_counter_unittest.cc
+++ b/chrome/browser/browsing_data/counters/site_settings_counter_unittest.cc
@@ -85,7 +85,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
   scoped_refptr<HostContentSettingsMap> map_;
diff --git a/chrome/browser/browsing_data/site_data_size_collector_unittest.cc b/chrome/browser/browsing_data/site_data_size_collector_unittest.cc
index 5c047e2..bf4f54eb 100644
--- a/chrome/browser/browsing_data/site_data_size_collector_unittest.cc
+++ b/chrome/browser/browsing_data/site_data_size_collector_unittest.cc
@@ -94,7 +94,7 @@
 
  protected:
   int64_t fetched_size_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   scoped_refptr<MockBrowsingDataCookieHelper>
       mock_browsing_data_cookie_helper_;
diff --git a/chrome/browser/captive_portal/captive_portal_service_unittest.cc b/chrome/browser/captive_portal/captive_portal_service_unittest.cc
index b4538583..dd20aab 100644
--- a/chrome/browser/captive_portal/captive_portal_service_unittest.cc
+++ b/chrome/browser/captive_portal/captive_portal_service_unittest.cc
@@ -280,7 +280,7 @@
   // after the test.
   const CaptivePortalService::TestingState old_captive_portal_testing_state_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Note that the construction order of these matters.
   std::unique_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/certificate_manager_model_unittest.cc b/chrome/browser/certificate_manager_model_unittest.cc
index d071c00..914a3a8 100644
--- a/chrome/browser/certificate_manager_model_unittest.cc
+++ b/chrome/browser/certificate_manager_model_unittest.cc
@@ -100,7 +100,7 @@
     run_loop.Run();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   crypto::ScopedTestNSSDB test_nssdb_;
   std::unique_ptr<net::NSSCertDatabase> nss_cert_db_;
   std::unique_ptr<FakeObserver> fake_observer_;
diff --git a/chrome/browser/chrome_content_browser_client_unittest.cc b/chrome/browser/chrome_content_browser_client_unittest.cc
index d4e68931..9846451 100644
--- a/chrome/browser/chrome_content_browser_client_unittest.cc
+++ b/chrome/browser/chrome_content_browser_client_unittest.cc
@@ -277,7 +277,7 @@
   base::FieldTrialList trial_list_;
   base::CommandLine command_line_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 const char BlinkSettingsFieldTrialTest::kDisallowFetchFieldTrialName[] =
diff --git a/chrome/browser/chromeos/android_sms/android_sms_app_manager_impl_unittest.cc b/chrome/browser/chromeos/android_sms/android_sms_app_manager_impl_unittest.cc
index bd6e664..c05283c 100644
--- a/chrome/browser/chromeos/android_sms/android_sms_app_manager_impl_unittest.cc
+++ b/chrome/browser/chromeos/android_sms/android_sms_app_manager_impl_unittest.cc
@@ -144,7 +144,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   TestingProfile profile_;
   std::unique_ptr<sync_preferences::TestingPrefServiceSyncable>
diff --git a/chrome/browser/chromeos/android_sms/android_sms_app_setup_controller_impl_unittest.cc b/chrome/browser/chromeos/android_sms/android_sms_app_setup_controller_impl_unittest.cc
index 6a2a7ca..507e4a0 100644
--- a/chrome/browser/chromeos/android_sms/android_sms_app_setup_controller_impl_unittest.cc
+++ b/chrome/browser/chromeos/android_sms/android_sms_app_setup_controller_impl_unittest.cc
@@ -184,7 +184,8 @@
   };
 
   AndroidSmsAppSetupControllerImplTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::TimeSource::MOCK_TIME),
+      : task_environment_(
+            content::BrowserTaskEnvironment::TimeSource::MOCK_TIME),
         host_content_settings_map_(
             HostContentSettingsMapFactory::GetForProfile(&profile_)) {}
 
@@ -254,7 +255,7 @@
                 install_requests.size());
       EXPECT_EQ(GetInstallOptionsForUrl(install_url), install_requests.back());
 
-      thread_bundle_.FastForwardBy(
+      task_environment_.FastForwardBy(
           AndroidSmsAppSetupControllerImpl::kInstallRetryDelay *
           (1 << retry_count));
     }
@@ -262,7 +263,7 @@
     // Send success code for last attempt.
     test_pending_app_manager_->SetInstallResultCode(
         web_app::InstallResultCode::kSuccess);
-    thread_bundle_.FastForwardBy(
+    task_environment_.FastForwardBy(
         AndroidSmsAppSetupControllerImpl::kInstallRetryDelay *
         (1 << (num_failure_tries - 1)));
 
@@ -423,7 +424,7 @@
     std::move(quit_closure).Run();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::Optional<bool> last_set_up_app_result_;
   base::Optional<bool> last_delete_cookie_result_;
diff --git a/chrome/browser/chromeos/android_sms/connection_manager_unittest.cc b/chrome/browser/chromeos/android_sms/connection_manager_unittest.cc
index e227c056..46ba5fcfc 100644
--- a/chrome/browser/chromeos/android_sms/connection_manager_unittest.cc
+++ b/chrome/browser/chromeos/android_sms/connection_manager_unittest.cc
@@ -173,7 +173,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   TestingProfile profile_;
   std::unique_ptr<content::FakeServiceWorkerContext>
diff --git a/chrome/browser/chromeos/android_sms/fcm_connection_establisher_unittest.cc b/chrome/browser/chromeos/android_sms/fcm_connection_establisher_unittest.cc
index f06a1e9..d5462aa 100644
--- a/chrome/browser/chromeos/android_sms/fcm_connection_establisher_unittest.cc
+++ b/chrome/browser/chromeos/android_sms/fcm_connection_establisher_unittest.cc
@@ -24,7 +24,7 @@
 class FcmConnectionEstablisherTest : public testing::Test {
  protected:
   FcmConnectionEstablisherTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
   ~FcmConnectionEstablisherTest() override = default;
 
   void VerifyTransferrableMessage(
@@ -39,7 +39,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   DISALLOW_COPY_AND_ASSIGN(FcmConnectionEstablisherTest);
 };
 
diff --git a/chrome/browser/chromeos/android_sms/streaming_connection_establisher_unittest.cc b/chrome/browser/chromeos/android_sms/streaming_connection_establisher_unittest.cc
index d19a7f4..03f8b15 100644
--- a/chrome/browser/chromeos/android_sms/streaming_connection_establisher_unittest.cc
+++ b/chrome/browser/chromeos/android_sms/streaming_connection_establisher_unittest.cc
@@ -22,11 +22,11 @@
 class StreamingConnectionEstablisherTest : public testing::Test {
  protected:
   StreamingConnectionEstablisherTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
   ~StreamingConnectionEstablisherTest() override = default;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   DISALLOW_COPY_AND_ASSIGN(StreamingConnectionEstablisherTest);
 };
 
diff --git a/chrome/browser/chromeos/arc/app_shortcuts/arc_app_shortcuts_menu_builder_unittest.cc b/chrome/browser/chromeos/arc/app_shortcuts/arc_app_shortcuts_menu_builder_unittest.cc
index 560218e..897d30a 100644
--- a/chrome/browser/chromeos/arc/app_shortcuts/arc_app_shortcuts_menu_builder_unittest.cc
+++ b/chrome/browser/chromeos/arc/app_shortcuts/arc_app_shortcuts_menu_builder_unittest.cc
@@ -53,7 +53,7 @@
   std::unique_ptr<TestingProfile> profile_;
   ArcAppTest arc_app_test_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(ArcAppShortcutsMenuBuilderTest);
 };
diff --git a/chrome/browser/chromeos/arc/app_shortcuts/arc_app_shortcuts_request_unittest.cc b/chrome/browser/chromeos/arc/app_shortcuts/arc_app_shortcuts_request_unittest.cc
index b3ce107a3..4ac54393 100644
--- a/chrome/browser/chromeos/arc/app_shortcuts/arc_app_shortcuts_request_unittest.cc
+++ b/chrome/browser/chromeos/arc/app_shortcuts/arc_app_shortcuts_request_unittest.cc
@@ -41,7 +41,7 @@
   std::unique_ptr<TestingProfile> profile_;
   ArcAppTest arc_app_test_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(ArcAppShortcutsRequestTest);
 };
diff --git a/chrome/browser/chromeos/arc/arc_migration_guide_notification_unittest.cc b/chrome/browser/chromeos/arc/arc_migration_guide_notification_unittest.cc
index 38dbdda..b68c35c 100644
--- a/chrome/browser/chromeos/arc/arc_migration_guide_notification_unittest.cc
+++ b/chrome/browser/chromeos/arc/arc_migration_guide_notification_unittest.cc
@@ -20,7 +20,7 @@
 using ::testing::Not;
 
 TEST_F(ArcMigrationGuideNotificationTest, BatteryPercent) {
-  content::TestBrowserThreadBundle browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile profile;
 
   // Set a high battery state.
diff --git a/chrome/browser/chromeos/arc/arc_play_store_enabled_preference_handler_unittest.cc b/chrome/browser/chromeos/arc/arc_play_store_enabled_preference_handler_unittest.cc
index f33a475..d427976 100644
--- a/chrome/browser/chromeos/arc/arc_play_store_enabled_preference_handler_unittest.cc
+++ b/chrome/browser/chromeos/arc/arc_play_store_enabled_preference_handler_unittest.cc
@@ -120,7 +120,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   user_manager::ScopedUserManager user_manager_enabler_;
   base::ScopedTempDir temp_dir_;
   std::unique_ptr<IdentityTestEnvironmentProfileAdaptor>
diff --git a/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc b/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
index 04e35860..1dd48674 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
@@ -128,7 +128,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<ArcServiceManager> arc_service_manager_;
   std::unique_ptr<ArcSessionManager> arc_session_manager_;
   user_manager::ScopedUserManager user_manager_enabler_;
@@ -164,7 +164,7 @@
 class ArcSessionManagerTestBase : public testing::Test {
  public:
   ArcSessionManagerTestBase()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         user_manager_enabler_(
             std::make_unique<chromeos::FakeChromeUserManager>()) {}
   ~ArcSessionManagerTestBase() override = default;
@@ -239,7 +239,7 @@
             std::make_unique<syncer::SyncErrorFactoryMock>());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<ArcServiceManager> arc_service_manager_;
   std::unique_ptr<ArcSessionManager> arc_session_manager_;
diff --git a/chrome/browser/chromeos/arc/arc_util_unittest.cc b/chrome/browser/chromeos/arc/arc_util_unittest.cc
index a179f3b..ca4a05b2 100644
--- a/chrome/browser/chromeos/arc/arc_util_unittest.cc
+++ b/chrome/browser/chromeos/arc/arc_util_unittest.cc
@@ -204,7 +204,7 @@
  private:
   std::unique_ptr<base::test::ScopedCommandLine> command_line_;
   base::test::ScopedFeatureList feature_list_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
   base::ScopedTempDir data_dir_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
diff --git a/chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge_unittest.cc b/chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge_unittest.cc
index 5610017..e0e3d0f 100644
--- a/chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge_unittest.cc
+++ b/chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge_unittest.cc
@@ -96,7 +96,7 @@
         user_manager::UserManager::Get());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   user_manager::ScopedUserManager scoped_user_manager_;
   std::unique_ptr<ArcServiceManager> arc_service_manager_;
   std::unique_ptr<ArcSessionManager> arc_session_manager_;
diff --git a/chrome/browser/chromeos/arc/boot_phase_monitor/arc_instance_throttle_unittest.cc b/chrome/browser/chromeos/arc/boot_phase_monitor/arc_instance_throttle_unittest.cc
index 0a450d5..eb69a09 100644
--- a/chrome/browser/chromeos/arc/boot_phase_monitor/arc_instance_throttle_unittest.cc
+++ b/chrome/browser/chromeos/arc/boot_phase_monitor/arc_instance_throttle_unittest.cc
@@ -90,7 +90,7 @@
     ArcInstanceThrottleTest* test_;
     DISALLOW_COPY_AND_ASSIGN(TestDelegateImpl);
   };
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<ArcServiceManager> arc_service_manager_;
   std::unique_ptr<ArcSessionManager> arc_session_manager_;
   std::unique_ptr<TestingProfile> testing_profile_;
diff --git a/chrome/browser/chromeos/arc/enterprise/cert_store/arc_cert_installer_unittest.cc b/chrome/browser/chromeos/arc/enterprise/cert_store/arc_cert_installer_unittest.cc
index baa1591..83d68fd 100644
--- a/chrome/browser/chromeos/arc/enterprise/cert_store/arc_cert_installer_unittest.cc
+++ b/chrome/browser/chromeos/arc/enterprise/cert_store/arc_cert_installer_unittest.cc
@@ -129,7 +129,7 @@
   MockRemoteCommandsQueueObserver* observer() { return &observer_; }
 
  private:
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // ArcServiceManager needs to be created before ArcPolicyBridge (since the
   // Bridge depends on the Manager), and it needs to be destroyed after Profile
diff --git a/chrome/browser/chromeos/arc/extensions/arc_support_message_host_unittest.cc b/chrome/browser/chromeos/arc/extensions/arc_support_message_host_unittest.cc
index a6fb824..6b51be9 100644
--- a/chrome/browser/chromeos/arc/extensions/arc_support_message_host_unittest.cc
+++ b/chrome/browser/chromeos/arc/extensions/arc_support_message_host_unittest.cc
@@ -86,7 +86,7 @@
 
  private:
   // Fake as if the current testing thread is UI thread.
-  content::TestBrowserThreadBundle bundle_;
+  content::BrowserTaskEnvironment bundle_;
 
   std::unique_ptr<TestClient> client_;
   std::unique_ptr<extensions::NativeMessageHost> message_host_;
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_async_file_util_unittest.cc b/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_async_file_util_unittest.cc
index 602110c..d70077f7 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_async_file_util_unittest.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_async_file_util_unittest.cc
@@ -83,7 +83,7 @@
         storage::kFileSystemTypeArcContent, path);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   FakeFileSystemInstance fake_file_system_;
 
   // Use the same initialization/destruction order as
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader_unittest.cc b/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader_unittest.cc
index af25248d..8479e4c 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader_unittest.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader_unittest.cc
@@ -96,7 +96,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   FakeFileSystemInstance fake_file_system_;
 
   // Use the same initialization/destruction order as
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_writer_unittest.cc b/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_writer_unittest.cc
index 8351510..397008929 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_writer_unittest.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_writer_unittest.cc
@@ -103,7 +103,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   FakeFileSystemInstance fake_file_system_;
 
   // Use the same initialization/destruction order as
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
index b3463898..f964162a 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc
@@ -198,7 +198,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   FakeFileSystemInstance fake_file_system_;
 
   // Use the same initialization/destruction order as
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge_unittest.cc b/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge_unittest.cc
index a358703e..7b0cf14 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge_unittest.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge_unittest.cc
@@ -83,7 +83,7 @@
 
  protected:
   base::ScopedTempDir temp_dir_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestServiceManagerContext service_manager_context_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
 
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_unittest.cc b/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_unittest.cc
index e752869..9a12ed70 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_unittest.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_unittest.cc
@@ -127,7 +127,7 @@
                             counter));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   FakeFileSystemInstance file_system_instance_;
 
   // Use the same initialization/destruction order as
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler_unittest.cc b/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler_unittest.cc
index 61bbe74..6f8b739 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler_unittest.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler_unittest.cc
@@ -160,7 +160,7 @@
                                                    callback.Get());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   std::unique_ptr<ArcSelectFilesHandler> arc_select_files_handler_;
   MockSelectFileDialogHolder* mock_dialog_holder_;
diff --git a/chrome/browser/chromeos/arc/fileapi/file_stream_forwarder_unittest.cc b/chrome/browser/chromeos/arc/fileapi/file_stream_forwarder_unittest.cc
index 531c3c21..c490179 100644
--- a/chrome/browser/chromeos/arc/fileapi/file_stream_forwarder_unittest.cc
+++ b/chrome/browser/chromeos/arc/fileapi/file_stream_forwarder_unittest.cc
@@ -66,7 +66,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir temp_dir_;
   base::FilePath dest_file_path_;
   base::ScopedFD dest_fd_;
diff --git a/chrome/browser/chromeos/arc/icon_decode_request.h b/chrome/browser/chromeos/arc/icon_decode_request.h
index 053a3e4c..7ca0a62 100644
--- a/chrome/browser/chromeos/arc/icon_decode_request.h
+++ b/chrome/browser/chromeos/arc/icon_decode_request.h
@@ -28,7 +28,7 @@
   // Icons are decoded at a separate process created by ImageDecoder. In unit
   // tests these tasks may not finish before the test exits, which causes a
   // failure in the base::MessageLoopCurrent::Get()->IsIdleForTesting() check
-  // in test_browser_thread_bundle.cc.
+  // in content::~BrowserTaskEnvironment().
   static void DisableSafeDecodingForTesting();
 
   // Starts image decoding. Safe asynchronous decoding is used unless
diff --git a/chrome/browser/chromeos/arc/input_method_manager/arc_input_method_manager_service_unittest.cc b/chrome/browser/chromeos/arc/input_method_manager/arc_input_method_manager_service_unittest.cc
index 35e206f..982c3fa 100644
--- a/chrome/browser/chromeos/arc/input_method_manager/arc_input_method_manager_service_unittest.cc
+++ b/chrome/browser/chromeos/arc/input_method_manager/arc_input_method_manager_service_unittest.cc
@@ -250,7 +250,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<ArcServiceManager> arc_service_manager_;
   std::unique_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/chromeos/arc/intent_helper/open_with_menu_unittest.cc b/chrome/browser/chromeos/arc/intent_helper/open_with_menu_unittest.cc
index 625d352a..7d57e73e4 100644
--- a/chrome/browser/chromeos/arc/intent_helper/open_with_menu_unittest.cc
+++ b/chrome/browser/chromeos/arc/intent_helper/open_with_menu_unittest.cc
@@ -166,7 +166,7 @@
 }
 
 TEST(OpenWithMenuTest, TestModelChanged) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   MockRenderViewContextMenu mock_menu(false);
   OpenWithMenu observer(nullptr, &mock_menu);
   mock_menu.SetObserver(&observer);
diff --git a/chrome/browser/chromeos/arc/notification/arc_supervision_transition_notification_unittest.cc b/chrome/browser/chromeos/arc/notification/arc_supervision_transition_notification_unittest.cc
index e79a240..48f7b1e 100644
--- a/chrome/browser/chromeos/arc/notification/arc_supervision_transition_notification_unittest.cc
+++ b/chrome/browser/chromeos/arc/notification/arc_supervision_transition_notification_unittest.cc
@@ -54,7 +54,7 @@
   std::unique_ptr<NotificationDisplayServiceTester> display_service_;
   ArcAppTest arc_app_test_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(ArcSupervisionTransitionNotificationTest);
 };
diff --git a/chrome/browser/chromeos/arc/pip/arc_pip_bridge_unittest.cc b/chrome/browser/chromeos/arc/pip/arc_pip_bridge_unittest.cc
index 6012392..a0a6433e 100644
--- a/chrome/browser/chromeos/arc/pip/arc_pip_bridge_unittest.cc
+++ b/chrome/browser/chromeos/arc/pip/arc_pip_bridge_unittest.cc
@@ -47,7 +47,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile testing_profile_;
   std::unique_ptr<ArcBridgeService> arc_bridge_service_;
   std::unique_ptr<ArcPipBridge> bridge_;
diff --git a/chrome/browser/chromeos/arc/policy/arc_policy_bridge_unittest.cc b/chrome/browser/chromeos/arc/policy/arc_policy_bridge_unittest.cc
index d5f59dd..49067cd 100644
--- a/chrome/browser/chromeos/arc/policy/arc_policy_bridge_unittest.cc
+++ b/chrome/browser/chromeos/arc/policy/arc_policy_bridge_unittest.cc
@@ -220,7 +220,7 @@
   TestingProfile* profile() { return profile_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   data_decoder::TestingJsonParser::ScopedFactoryOverride factory_override_;
   content::TestServiceManagerContext service_manager_context_;
   std::unique_ptr<user_manager::ScopedUserManager> user_manager_enabler_;
diff --git a/chrome/browser/chromeos/arc/tts/arc_tts_service_unittest.cc b/chrome/browser/chromeos/arc/tts/arc_tts_service_unittest.cc
index 76f0efc..4323fc1 100644
--- a/chrome/browser/chromeos/arc/tts/arc_tts_service_unittest.cc
+++ b/chrome/browser/chromeos/arc/tts/arc_tts_service_unittest.cc
@@ -94,7 +94,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<ArcServiceManager> arc_service_manager_;
   std::unique_ptr<TestingProfile> testing_profile_;
   std::unique_ptr<TestableTtsController> tts_controller_;
diff --git a/chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service_unittest.cc b/chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service_unittest.cc
index 8b84c4e..2c2d616 100644
--- a/chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service_unittest.cc
+++ b/chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service_unittest.cc
@@ -61,7 +61,7 @@
 class ArcWallpaperServiceTest : public testing::Test {
  public:
   ArcWallpaperServiceTest()
-      : thread_bundle_(std::make_unique<content::TestBrowserThreadBundle>()),
+      : task_environment_(std::make_unique<content::BrowserTaskEnvironment>()),
         user_manager_(new chromeos::FakeChromeUserManager()),
         user_manager_enabler_(base::WrapUnique(user_manager_)) {}
   ~ArcWallpaperServiceTest() override = default;
@@ -119,7 +119,7 @@
   TestWallpaperController test_wallpaper_controller_;
 
  private:
-  std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
+  std::unique_ptr<content::BrowserTaskEnvironment> task_environment_;
   chromeos::FakeChromeUserManager* const user_manager_ = nullptr;
   user_manager::ScopedUserManager user_manager_enabler_;
   arc::ArcServiceManager arc_service_manager_;
diff --git a/chrome/browser/chromeos/assistant/assistant_util_unittest.cc b/chrome/browser/chromeos/assistant/assistant_util_unittest.cc
index 8bd09f73..dcd2289 100644
--- a/chrome/browser/chromeos/assistant/assistant_util_unittest.cc
+++ b/chrome/browser/chromeos/assistant/assistant_util_unittest.cc
@@ -185,7 +185,7 @@
  private:
   std::unique_ptr<base::test::ScopedCommandLine> command_line_;
   base::test::ScopedFeatureList feature_list_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir data_dir_;
   std::unique_ptr<IdentityTestEnvironmentProfileAdaptor>
       identity_test_env_adaptor_;
diff --git a/chrome/browser/chromeos/attestation/attestation_ca_client_unittest.cc b/chrome/browser/chromeos/attestation/attestation_ca_client_unittest.cc
index 271eae3..135d19e 100644
--- a/chrome/browser/chromeos/attestation/attestation_ca_client_unittest.cc
+++ b/chrome/browser/chromeos/attestation/attestation_ca_client_unittest.cc
@@ -82,7 +82,7 @@
     base::RunLoop().RunUntilIdle();
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   network::TestURLLoaderFactory test_url_loader_factory_;
   scoped_refptr<network::SharedURLLoaderFactory>
diff --git a/chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc b/chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc
index 9dc86390..838fe84 100644
--- a/chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc
+++ b/chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc
@@ -38,7 +38,7 @@
     base::RunLoop().RunUntilIdle();
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedCrosSettingsTestHelper settings_helper_;
   StrictMock<MockMachineCertificateUploader> certificate_uploader_;
 };
diff --git a/chrome/browser/chromeos/attestation/enrollment_certificate_uploader_impl_unittest.cc b/chrome/browser/chromeos/attestation/enrollment_certificate_uploader_impl_unittest.cc
index 3a40919..e0eff2e 100644
--- a/chrome/browser/chromeos/attestation/enrollment_certificate_uploader_impl_unittest.cc
+++ b/chrome/browser/chromeos/attestation/enrollment_certificate_uploader_impl_unittest.cc
@@ -98,7 +98,7 @@
     base::RunLoop().RunUntilIdle();
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedCrosSettingsTestHelper settings_helper_;
   FakeCryptohomeClient cryptohome_client_;
   StrictMock<MockAttestationFlow> attestation_flow_;
diff --git a/chrome/browser/chromeos/attestation/machine_certificate_uploader_impl_unittest.cc b/chrome/browser/chromeos/attestation/machine_certificate_uploader_impl_unittest.cc
index 7657341c..c3321290a 100644
--- a/chrome/browser/chromeos/attestation/machine_certificate_uploader_impl_unittest.cc
+++ b/chrome/browser/chromeos/attestation/machine_certificate_uploader_impl_unittest.cc
@@ -136,7 +136,7 @@
     return serialized;
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedCrosSettingsTestHelper settings_helper_;
   FakeCryptohomeClient cryptohome_client_;
   StrictMock<MockAttestationFlow> attestation_flow_;
diff --git a/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc b/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc
index 82913cb..e7eb6c22 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc
+++ b/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc
@@ -180,7 +180,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   StrictMock<MockAttestationFlow> mock_attestation_flow_;
   cryptohome::MockAsyncMethodCaller mock_async_caller_;
   chromeos::FakeCryptohomeClient fake_cryptohome_client_;
diff --git a/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager_unittest.cc b/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager_unittest.cc
index 7f14c6cc..d53c0ac 100644
--- a/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager_unittest.cc
+++ b/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager_unittest.cc
@@ -127,7 +127,7 @@
     testing::Mock::VerifyAndClearExpectations(mock_user_manager());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   AccountId account_id_;
   std::unique_ptr<TestingProfile> profile_;
 
diff --git a/chrome/browser/chromeos/base/file_flusher_unittest.cc b/chrome/browser/chromeos/base/file_flusher_unittest.cc
index bcb5139..7da0cda 100644
--- a/chrome/browser/chromeos/base/file_flusher_unittest.cc
+++ b/chrome/browser/chromeos/base/file_flusher_unittest.cc
@@ -79,7 +79,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir temp_dir_;
   std::map<base::FilePath, int> flush_counts_;
 
diff --git a/chrome/browser/chromeos/child_accounts/event_based_status_reporting_service_unittest.cc b/chrome/browser/chromeos/child_accounts/event_based_status_reporting_service_unittest.cc
index a1b0fb3..dc11c6d 100644
--- a/chrome/browser/chromeos/child_accounts/event_based_status_reporting_service_unittest.cc
+++ b/chrome/browser/chromeos/child_accounts/event_based_status_reporting_service_unittest.cc
@@ -138,7 +138,7 @@
   void SetConnectionType(network::mojom::ConnectionType type) {
     network::TestNetworkConnectionTracker::GetInstance()->SetConnectionType(
         type);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   arc::mojom::AppHost* app_host() { return arc_test_.arc_app_list_prefs(); }
@@ -169,7 +169,7 @@
   base::HistogramTester histogram_tester_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ArcAppTest arc_test_;
   std::unique_ptr<TestingProfile> profile_;
   TestingConsumerStatusReportingService*
diff --git a/chrome/browser/chromeos/child_accounts/time_limit_notifier_unittest.cc b/chrome/browser/chromeos/child_accounts/time_limit_notifier_unittest.cc
index 2a8b64b..79b4d13 100644
--- a/chrome/browser/chromeos/child_accounts/time_limit_notifier_unittest.cc
+++ b/chrome/browser/chromeos/child_accounts/time_limit_notifier_unittest.cc
@@ -53,7 +53,7 @@
   }
 
   scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
-  content::TestBrowserThreadBundle bundle_;
+  content::BrowserTaskEnvironment bundle_;
   TestingProfile profile_;
   NotificationDisplayServiceTester notification_tester_;
   TimeLimitNotifier notifier_;
diff --git a/chrome/browser/chromeos/crostini/crostini_ansible_management_service_unittest.cc b/chrome/browser/chromeos/crostini/crostini_ansible_management_service_unittest.cc
index 43bbc01b..3bc579b 100644
--- a/chrome/browser/chromeos/crostini/crostini_ansible_management_service_unittest.cc
+++ b/chrome/browser/chromeos/crostini/crostini_ansible_management_service_unittest.cc
@@ -49,7 +49,7 @@
     fake_cicerone_client_->InstallLinuxPackageProgress(signal);
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<CrostiniAnsibleManagementService>
       crostini_ansible_management_service_;
diff --git a/chrome/browser/chromeos/crostini/crostini_export_import_unittest.cc b/chrome/browser/chromeos/crostini/crostini_export_import_unittest.cc
index fab4ebb..ab79af0 100644
--- a/chrome/browser/chromeos/crostini/crostini_export_import_unittest.cc
+++ b/chrome/browser/chromeos/crostini/crostini_export_import_unittest.cc
@@ -107,7 +107,7 @@
     // shutdown GuestOsSharePath to ensure watchers are destroyed, otherwise
     // they can trigger and execute against a destroyed service.
     guest_os::GuestOsSharePath::GetForProfile(profile())->Shutdown();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     base::DeleteFile(tarball_, false);
     profile_.reset();
   }
@@ -124,7 +124,7 @@
   ContainerId container_id_;
   base::FilePath tarball_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(CrostiniExportImportTest);
@@ -134,7 +134,7 @@
 TEST_F(CrostiniExportImportTest, TestDeprecatedExportSuccess) {
   crostini_export_import_->FileSelected(
       tarball_, 0, reinterpret_cast<void*>(ExportImportType::EXPORT));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   CrostiniExportImportNotification* notification =
       crostini_export_import_->GetNotificationForTesting(container_id_);
   ASSERT_NE(notification, nullptr);
@@ -175,14 +175,14 @@
   EXPECT_EQ(notification->status(),
             CrostiniExportImportNotification::Status::DONE);
   // CrostiniExportImport should've created the exported file.
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(base::PathExists(tarball_));
 }
 
 TEST_F(CrostiniExportImportTest, TestExportSuccess) {
   crostini_export_import_->FileSelected(
       tarball_, 0, reinterpret_cast<void*>(ExportImportType::EXPORT));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   CrostiniExportImportNotification* notification =
       crostini_export_import_->GetNotificationForTesting(container_id_);
   ASSERT_NE(notification, nullptr);
@@ -233,14 +233,14 @@
   EXPECT_EQ(notification->status(),
             CrostiniExportImportNotification::Status::DONE);
   // CrostiniExportImport should've created the exported file.
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(base::PathExists(tarball_));
 }
 
 TEST_F(CrostiniExportImportTest, TestExportFail) {
   crostini_export_import_->FileSelected(
       tarball_, 0, reinterpret_cast<void*>(ExportImportType::EXPORT));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   CrostiniExportImportNotification* notification =
       crostini_export_import_->GetNotificationForTesting(container_id_);
 
@@ -250,14 +250,14 @@
   EXPECT_EQ(notification->status(),
             CrostiniExportImportNotification::Status::FAILED);
   // CrostiniExportImport should cleanup the file if an export fails.
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(base::PathExists(tarball_));
 }
 
 TEST_F(CrostiniExportImportTest, TestExportCancelled) {
   crostini_export_import_->FileSelected(
       tarball_, 0, reinterpret_cast<void*>(ExportImportType::EXPORT));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   CrostiniExportImportNotification* notification =
       crostini_export_import_->GetNotificationForTesting(container_id_);
   ASSERT_NE(notification, nullptr);
@@ -291,14 +291,14 @@
       vm_tools::cicerone::ExportLxdContainerProgressSignal_Status_CANCELLED);
   EXPECT_FALSE(
       crostini_export_import_->GetNotificationForTesting(container_id_));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(base::PathExists(tarball_));
 }
 
 TEST_F(CrostiniExportImportTest, TestExportDoneBeforeCancelled) {
   crostini_export_import_->FileSelected(
       tarball_, 0, reinterpret_cast<void*>(ExportImportType::EXPORT));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   CrostiniExportImportNotification* notification =
       crostini_export_import_->GetNotificationForTesting(container_id_);
   ASSERT_NE(notification, nullptr);
@@ -319,14 +319,14 @@
       vm_tools::cicerone::ExportLxdContainerProgressSignal_Status_DONE);
   EXPECT_FALSE(
       crostini_export_import_->GetNotificationForTesting(container_id_));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(base::PathExists(tarball_));
 }
 
 TEST_F(CrostiniExportImportTest, TestImportSuccess) {
   crostini_export_import_->FileSelected(
       tarball_, 0, reinterpret_cast<void*>(ExportImportType::IMPORT));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   CrostiniExportImportNotification* notification =
       crostini_export_import_->GetNotificationForTesting(container_id_);
   ASSERT_NE(notification, nullptr);
@@ -372,7 +372,7 @@
 TEST_F(CrostiniExportImportTest, TestImportFail) {
   crostini_export_import_->FileSelected(
       tarball_, 0, reinterpret_cast<void*>(ExportImportType::IMPORT));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   CrostiniExportImportNotification* notification =
       crostini_export_import_->GetNotificationForTesting(container_id_);
 
@@ -389,7 +389,7 @@
 TEST_F(CrostiniExportImportTest, TestImportCancelled) {
   crostini_export_import_->FileSelected(
       tarball_, 0, reinterpret_cast<void*>(ExportImportType::IMPORT));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   CrostiniExportImportNotification* notification =
       crostini_export_import_->GetNotificationForTesting(container_id_);
   ASSERT_NE(notification, nullptr);
@@ -423,7 +423,7 @@
 TEST_F(CrostiniExportImportTest, TestImportDoneBeforeCancelled) {
   crostini_export_import_->FileSelected(
       tarball_, 0, reinterpret_cast<void*>(ExportImportType::IMPORT));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   CrostiniExportImportNotification* notification =
       crostini_export_import_->GetNotificationForTesting(container_id_);
   ASSERT_NE(notification, nullptr);
@@ -448,7 +448,7 @@
 TEST_F(CrostiniExportImportTest, TestImportFailArchitecture) {
   crostini_export_import_->FileSelected(
       tarball_, 0, reinterpret_cast<void*>(ExportImportType::IMPORT));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   CrostiniExportImportNotification* notification =
       crostini_export_import_->GetNotificationForTesting(container_id_);
 
@@ -470,7 +470,7 @@
 TEST_F(CrostiniExportImportTest, TestImportFailSpace) {
   crostini_export_import_->FileSelected(
       tarball_, 0, reinterpret_cast<void*>(ExportImportType::IMPORT));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   CrostiniExportImportNotification* notification =
       crostini_export_import_->GetNotificationForTesting(container_id_);
 
diff --git a/chrome/browser/chromeos/crostini/crostini_manager_unittest.cc b/chrome/browser/chromeos/crostini/crostini_manager_unittest.cc
index fb8a6a86..5477a1f 100644
--- a/chrome/browser/chromeos/crostini/crostini_manager_unittest.cc
+++ b/chrome/browser/chromeos/crostini/crostini_manager_unittest.cc
@@ -141,8 +141,7 @@
   }
 
   CrostiniManagerTest()
-      : test_browser_thread_bundle_(
-            content::TestBrowserThreadBundle::REAL_IO_THREAD) {
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD) {
     chromeos::DBusThreadManager::Initialize();
     fake_cicerone_client_ = static_cast<chromeos::FakeCiceroneClient*>(
         chromeos::DBusThreadManager::Get()->GetCiceroneClient());
@@ -195,7 +194,7 @@
   device::FakeUsbDeviceManager fake_usb_manager_;
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<user_manager::ScopedUserManager> scoped_user_manager_;
   base::test::ScopedFeatureList scoped_feature_list_;
   DISALLOW_COPY_AND_ASSIGN(CrostiniManagerTest);
diff --git a/chrome/browser/chromeos/crostini/crostini_mime_types_service_unittest.cc b/chrome/browser/chromeos/crostini/crostini_mime_types_service_unittest.cc
index 94f17db..3c26738 100644
--- a/chrome/browser/chromeos/crostini/crostini_mime_types_service_unittest.cc
+++ b/chrome/browser/chromeos/crostini/crostini_mime_types_service_unittest.cc
@@ -45,7 +45,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   CrostiniTestHelper crostini_test_helper_;
 
diff --git a/chrome/browser/chromeos/crostini/crostini_package_notification_unittest.cc b/chrome/browser/chromeos/crostini/crostini_package_notification_unittest.cc
index 6fc7996..e24dac3 100644
--- a/chrome/browser/chromeos/crostini/crostini_package_notification_unittest.cc
+++ b/chrome/browser/chromeos/crostini/crostini_package_notification_unittest.cc
@@ -35,11 +35,10 @@
 
   void SetUp() override {
     DBusThreadManager::Initialize();
-    test_browser_thread_bundle_ =
-        std::make_unique<content::TestBrowserThreadBundle>(
-            base::test::TaskEnvironment::MainThreadType::UI,
-            base::test::TaskEnvironment::ThreadPoolExecutionMode::ASYNC,
-            content::TestBrowserThreadBundle::REAL_IO_THREAD);
+    task_environment_ = std::make_unique<content::BrowserTaskEnvironment>(
+        base::test::TaskEnvironment::MainThreadType::UI,
+        base::test::TaskEnvironment::ThreadPoolExecutionMode::ASYNC,
+        content::BrowserTaskEnvironment::REAL_IO_THREAD);
 
     profile_ = std::make_unique<TestingProfile>();
     crostini_test_helper_ =
@@ -51,12 +50,12 @@
     service_.reset();
     crostini_test_helper_.reset();
     profile_.reset();
-    test_browser_thread_bundle_.reset();
+    task_environment_.reset();
     DBusThreadManager::Shutdown();
   }
 
  protected:
-  std::unique_ptr<content::TestBrowserThreadBundle> test_browser_thread_bundle_;
+  std::unique_ptr<content::BrowserTaskEnvironment> task_environment_;
   std::unique_ptr<CrostiniTestHelper> crostini_test_helper_;
   std::unique_ptr<CrostiniPackageService> service_;
   std::unique_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/chromeos/crostini/crostini_package_service_unittest.cc b/chrome/browser/chromeos/crostini/crostini_package_service_unittest.cc
index 4f70aca..1879406b 100644
--- a/chrome/browser/chromeos/crostini/crostini_package_service_unittest.cc
+++ b/chrome/browser/chromeos/crostini/crostini_package_service_unittest.cc
@@ -165,11 +165,10 @@
         DBusThreadManager::Get()->GetSeneschalClient());
     ASSERT_TRUE(fake_seneschal_client_);
 
-    test_browser_thread_bundle_ =
-        std::make_unique<content::TestBrowserThreadBundle>(
-            base::test::TaskEnvironment::MainThreadType::UI,
-            base::test::TaskEnvironment::ThreadPoolExecutionMode::ASYNC,
-            content::TestBrowserThreadBundle::REAL_IO_THREAD);
+    task_environment_ = std::make_unique<content::BrowserTaskEnvironment>(
+        base::test::TaskEnvironment::MainThreadType::UI,
+        base::test::TaskEnvironment::ThreadPoolExecutionMode::ASYNC,
+        content::BrowserTaskEnvironment::REAL_IO_THREAD);
     profile_ = std::make_unique<TestingProfile>(
         base::FilePath("/home/chronos/u-0123456789abcdef"));
     crostini_test_helper_ =
@@ -210,7 +209,7 @@
     notification_display_service_tester_.reset();
     crostini_test_helper_.reset();
     profile_.reset();
-    test_browser_thread_bundle_.reset();
+    task_environment_.reset();
     DBusThreadManager::Shutdown();
   }
 
@@ -336,7 +335,7 @@
   FakeCiceroneClient* fake_cicerone_client_ = nullptr;
   FakeSeneschalClient* fake_seneschal_client_ = nullptr;
 
-  std::unique_ptr<content::TestBrowserThreadBundle> test_browser_thread_bundle_;
+  std::unique_ptr<content::BrowserTaskEnvironment> task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<CrostiniTestHelper> crostini_test_helper_;
   std::unique_ptr<NotificationDisplayServiceTester>
diff --git a/chrome/browser/chromeos/crostini/crostini_registry_service_unittest.cc b/chrome/browser/chromeos/crostini/crostini_registry_service_unittest.cc
index 90c34c6..9fde176c 100644
--- a/chrome/browser/chromeos/crostini/crostini_registry_service_unittest.cc
+++ b/chrome/browser/chromeos/crostini/crostini_registry_service_unittest.cc
@@ -59,7 +59,7 @@
   base::SimpleTestClock test_clock_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   CrostiniTestHelper crostini_test_helper_;
 
diff --git a/chrome/browser/chromeos/crostini/crostini_reporting_util_unittest.cc b/chrome/browser/chromeos/crostini/crostini_reporting_util_unittest.cc
index 9578f50..f5b1ca0 100644
--- a/chrome/browser/chromeos/crostini/crostini_reporting_util_unittest.cc
+++ b/chrome/browser/chromeos/crostini/crostini_reporting_util_unittest.cc
@@ -34,7 +34,7 @@
     profile_.GetPrefs()->SetBoolean(prefs::kReportCrostiniUsageEnabled, true);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::SimpleTestClock test_clock_;
   TestingProfile profile_;
   component_updater::MockComponentUpdateService update_service_;
diff --git a/chrome/browser/chromeos/customization/customization_document_unittest.cc b/chrome/browser/chromeos/customization/customization_document_unittest.cc
index 878136a..9804eacf 100644
--- a/chrome/browser/chromeos/customization/customization_document_unittest.cc
+++ b/chrome/browser/chromeos/customization/customization_document_unittest.cc
@@ -289,7 +289,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   system::ScopedFakeStatisticsProvider fake_statistics_provider_;
   ScopedCrosSettingsTestHelper scoped_cros_settings_test_helper_;
   TestingPrefServiceSimple local_state_;
diff --git a/chrome/browser/chromeos/drive/download_handler_unittest.cc b/chrome/browser/chromeos/drive/download_handler_unittest.cc
index 42e5f2a..5323543 100644
--- a/chrome/browser/chromeos/drive/download_handler_unittest.cc
+++ b/chrome/browser/chromeos/drive/download_handler_unittest.cc
@@ -108,7 +108,7 @@
 
  protected:
   base::ScopedTempDir temp_dir_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<DownloadHandlerTestDownloadManager> download_manager_;
   std::unique_ptr<DownloadHandlerTestDownloadManager>
diff --git a/chrome/browser/chromeos/drive/drive_file_stream_reader_unittest.cc b/chrome/browser/chromeos/drive/drive_file_stream_reader_unittest.cc
index 23155665..731d56c 100644
--- a/chrome/browser/chromeos/drive/drive_file_stream_reader_unittest.cc
+++ b/chrome/browser/chromeos/drive/drive_file_stream_reader_unittest.cc
@@ -47,8 +47,7 @@
 class LocalReaderProxyTest : public ::testing::Test {
  protected:
   LocalReaderProxyTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
-  }
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
   void SetUp() override {
     ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
@@ -59,7 +58,7 @@
     ASSERT_TRUE(worker_thread_->Start());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::ScopedTempDir temp_dir_;
   base::FilePath file_path_;
@@ -109,10 +108,9 @@
 class NetworkReaderProxyTest : public ::testing::Test {
  protected:
   NetworkReaderProxyTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
-  }
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(NetworkReaderProxyTest, EmptyFile) {
@@ -301,8 +299,7 @@
 class DriveFileStreamReaderTest : public ::testing::Test {
  protected:
   DriveFileStreamReaderTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
-  }
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
   void SetUp() override {
     worker_thread_ =
@@ -327,7 +324,7 @@
                       base::Unretained(this));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<base::Thread> worker_thread_;
 
diff --git a/chrome/browser/chromeos/drive/drive_integration_service_unittest.cc b/chrome/browser/chromeos/drive/drive_integration_service_unittest.cc
index da60d2e..baf98aa3 100644
--- a/chrome/browser/chromeos/drive/drive_integration_service_unittest.cc
+++ b/chrome/browser/chromeos/drive/drive_integration_service_unittest.cc
@@ -24,7 +24,7 @@
   void SetUp() override { ASSERT_TRUE(profile_manager_.SetUp()); }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestServiceManagerContext context_;
   // DriveIntegrationService depends on DriveNotificationManager which depends
   // on InvalidationService. On Chrome OS, the InvalidationServiceFactory
diff --git a/chrome/browser/chromeos/drive/file_system_util_unittest.cc b/chrome/browser/chromeos/drive/file_system_util_unittest.cc
index 8291470..7417155 100644
--- a/chrome/browser/chromeos/drive/file_system_util_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system_util_unittest.cc
@@ -32,7 +32,7 @@
 namespace {
 
 // Sets up ProfileManager for testing and marks the current thread as UI by
-// TestBrowserThreadBundle. We need the thread since Profile objects must be
+// BrowserTaskEnvironment. We need the thread since Profile objects must be
 // touched from UI and hence has CHECK/DCHECKs for it.
 class ProfileRelatedFileSystemUtilTest : public testing::Test {
  protected:
@@ -46,7 +46,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager testing_profile_manager_;
 };
 
diff --git a/chrome/browser/chromeos/drive/fileapi/fileapi_worker_unittest.cc b/chrome/browser/chromeos/drive/fileapi/fileapi_worker_unittest.cc
index 92e395b29..33da241 100644
--- a/chrome/browser/chromeos/drive/fileapi/fileapi_worker_unittest.cc
+++ b/chrome/browser/chromeos/drive/fileapi/fileapi_worker_unittest.cc
@@ -126,7 +126,7 @@
 
 class FileApiWorkerTest : public testing::Test {
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(FileApiWorkerTest, RunFileSystemCallbackSuccess) {
diff --git a/chrome/browser/chromeos/drive/fileapi/webkit_file_stream_reader_impl_unittest.cc b/chrome/browser/chromeos/drive/fileapi/webkit_file_stream_reader_impl_unittest.cc
index 4d9d0cb..0281ed0 100644
--- a/chrome/browser/chromeos/drive/fileapi/webkit_file_stream_reader_impl_unittest.cc
+++ b/chrome/browser/chromeos/drive/fileapi/webkit_file_stream_reader_impl_unittest.cc
@@ -37,8 +37,7 @@
   // Because the testee should live on IO thread, the main thread is
   // reused as IO thread, and UI thread will be run on background.
   WebkitFileStreamReaderImplTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
-  }
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
   void SetUp() override {
     worker_thread_ =
@@ -63,7 +62,7 @@
                       base::Unretained(this));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<base::Thread> worker_thread_;
 
diff --git a/chrome/browser/chromeos/drive/write_on_cache_file_unittest.cc b/chrome/browser/chromeos/drive/write_on_cache_file_unittest.cc
index 9a98be40..dcec5ed 100644
--- a/chrome/browser/chromeos/drive/write_on_cache_file_unittest.cc
+++ b/chrome/browser/chromeos/drive/write_on_cache_file_unittest.cc
@@ -59,7 +59,7 @@
 }  // namespace
 
 TEST(WriteOnCacheFileTest, PrepareFileForWritingSuccess) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestFileSystem test_file_system;
 
   FileError error = FILE_ERROR_FAILED;
@@ -80,7 +80,7 @@
 }
 
 TEST(WriteOnCacheFileTest, PrepareFileForWritingCreateFail) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestFileSystem test_file_system;
 
   FileError error = FILE_ERROR_FAILED;
diff --git a/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc b/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc
index 9a86e42b..7405181 100644
--- a/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc
+++ b/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc
@@ -164,7 +164,7 @@
   void VerifyAndResetVisitorCallExpectations();
   void SetForceInstallListPolicy();
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir temp_dir_;
   base::FilePath cache_dir_;
   policy::MockCloudPolicyStore store_;
@@ -186,7 +186,7 @@
 
 DeviceLocalAccountExternalPolicyLoaderTest::
     DeviceLocalAccountExternalPolicyLoaderTest()
-    : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+    : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
       test_shared_loader_factory_(
           base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
               &test_url_loader_factory_)) {}
diff --git a/chrome/browser/chromeos/extensions/external_cache_impl_unittest.cc b/chrome/browser/chromeos/extensions/external_cache_impl_unittest.cc
index 0bc700a5..61c53dee 100644
--- a/chrome/browser/chromeos/extensions/external_cache_impl_unittest.cc
+++ b/chrome/browser/chromeos/extensions/external_cache_impl_unittest.cc
@@ -46,7 +46,7 @@
                               public ExternalCacheDelegate {
  public:
   ExternalCacheImplTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD),
         test_shared_loader_factory_(
             base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
                 &test_url_loader_factory_)) {}
@@ -119,7 +119,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   network::TestURLLoaderFactory test_url_loader_factory_;
   scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_;
diff --git a/chrome/browser/chromeos/extensions/install_limiter_unittest.cc b/chrome/browser/chromeos/extensions/install_limiter_unittest.cc
index 59ef028..a06f4bd 100644
--- a/chrome/browser/chromeos/extensions/install_limiter_unittest.cc
+++ b/chrome/browser/chromeos/extensions/install_limiter_unittest.cc
@@ -33,7 +33,7 @@
   ~InstallLimiterTest() override = default;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   chromeos::ScopedStubInstallAttributes test_install_attributes_;
   user_manager::ScopedUserManager scoped_user_manager_;
 
diff --git a/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_extension_ui_handler_unittest.cc b/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_extension_ui_handler_unittest.cc
index 3a8296d..e3c0f38e 100644
--- a/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_extension_ui_handler_unittest.cc
+++ b/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_extension_ui_handler_unittest.cc
@@ -180,7 +180,7 @@
         ui_handler_->Show(extension, kUrl, kCanBeClosedByUser, &error));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestServiceManagerContext context_;
   const extensions::ScopedCurrentChannel scoped_current_channel_;
 
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc
index 3ed416f4..1469fbf 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc
@@ -30,7 +30,7 @@
 class WallpaperPrivateApiUnittest : public testing::Test {
  public:
   WallpaperPrivateApiUnittest()
-      : thread_bundle_(std::make_unique<content::TestBrowserThreadBundle>()),
+      : task_environment_(std::make_unique<content::BrowserTaskEnvironment>()),
         fake_user_manager_(new chromeos::FakeChromeUserManager()),
         scoped_user_manager_(base::WrapUnique(fake_user_manager_)) {}
 
@@ -51,7 +51,7 @@
   }
 
  private:
-  std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
+  std::unique_ptr<content::BrowserTaskEnvironment> task_environment_;
 
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
 
diff --git a/chrome/browser/chromeos/external_metrics_unittest.cc b/chrome/browser/chromeos/external_metrics_unittest.cc
index 7079d36..447f3e6 100644
--- a/chrome/browser/chromeos/external_metrics_unittest.cc
+++ b/chrome/browser/chromeos/external_metrics_unittest.cc
@@ -32,7 +32,7 @@
 
   base::ScopedTempDir dir_;
   scoped_refptr<ExternalMetrics> external_metrics_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(ExternalMetricsTest, CustomInterval) {
diff --git a/chrome/browser/chromeos/file_manager/documents_provider_root_manager_unittest.cc b/chrome/browser/chromeos/file_manager/documents_provider_root_manager_unittest.cc
index 8600c2d1..14dd144f 100644
--- a/chrome/browser/chromeos/file_manager/documents_provider_root_manager_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/documents_provider_root_manager_unittest.cc
@@ -105,7 +105,7 @@
   std::unique_ptr<DocumentsProviderRootManager> root_manager_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   arc::FakeFileSystemInstance file_system_instance_;
   std::unique_ptr<arc::ArcServiceManager> arc_service_manager_;
   std::unique_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/chromeos/file_manager/file_tasks_notifier_unittest.cc b/chrome/browser/chromeos/file_manager/file_tasks_notifier_unittest.cc
index 79b5308..d6104e0 100644
--- a/chrome/browser/chromeos/file_manager/file_tasks_notifier_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/file_tasks_notifier_unittest.cc
@@ -173,7 +173,7 @@
   const base::FilePath& my_files() { return my_files_; }
 
  private:
-  content::TestBrowserThreadBundle threads_;
+  content::BrowserTaskEnvironment threads_;
   FakeDriveFs fake_drivefs_;
   mojo::Binding<drivefs::mojom::DriveFs> drivefs_binding_;
   std::unique_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc b/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc
index 4841ed8..2fb82a0 100644
--- a/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc
@@ -421,7 +421,7 @@
     base::RunLoop run_loop_;
   };
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
   chromeos::ScopedTestUserManager test_user_manager_;
   TestingProfile test_profile_;
diff --git a/chrome/browser/chromeos/file_manager/file_watcher_unittest.cc b/chrome/browser/chromeos/file_manager/file_watcher_unittest.cc
index 486a76b..58326791 100644
--- a/chrome/browser/chromeos/file_manager/file_watcher_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/file_watcher_unittest.cc
@@ -25,13 +25,12 @@
   // Use IO_MAINLOOP so FilePathWatcher works in the fake FILE thread, which
   // is actually shared with the main thread.
   FileManagerFileWatcherTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
-  }
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
-  void FlushMessageLoopTasks() { thread_bundle_.RunUntilIdle(); }
+  void FlushMessageLoopTasks() { task_environment_.RunUntilIdle(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(FileManagerFileWatcherTest, AddAndRemoveOneExtensionId) {
diff --git a/chrome/browser/chromeos/file_manager/fileapi_util_unittest.cc b/chrome/browser/chromeos/file_manager/fileapi_util_unittest.cc
index 3aa205f..271179a 100644
--- a/chrome/browser/chromeos/file_manager/fileapi_util_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/fileapi_util_unittest.cc
@@ -38,7 +38,7 @@
 TEST(FileManagerFileAPIUtilTest,
      ConvertSelectedFileInfoListToFileChooserFileInfoList) {
   // Prepare the test environment.
-  content::TestBrowserThreadBundle threads;
+  content::BrowserTaskEnvironment threads;
   content::TestServiceManagerContext service_manager_context;
   TestingProfileManager profile_manager(TestingBrowserProcess::GetGlobal());
   ASSERT_TRUE(profile_manager.SetUp());
diff --git a/chrome/browser/chromeos/file_manager/path_util_unittest.cc b/chrome/browser/chromeos/file_manager/path_util_unittest.cc
index 668c6091..306c0c5 100644
--- a/chrome/browser/chromeos/file_manager/path_util_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/path_util_unittest.cc
@@ -68,7 +68,7 @@
   void TearDown() override { profile_.reset(); }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
  private:
@@ -728,7 +728,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   arc::FakeFileSystemInstance fake_file_system_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   std::unique_ptr<user_manager::ScopedUserManager> user_manager_enabler_;
diff --git a/chrome/browser/chromeos/file_manager/volume_manager_unittest.cc b/chrome/browser/chromeos/file_manager/volume_manager_unittest.cc
index 2f447589..6764fcb 100644
--- a/chrome/browser/chromeos/file_manager/volume_manager_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/volume_manager_unittest.cc
@@ -256,7 +256,7 @@
     main_profile_.reset();
     disk_mount_manager_.reset();
     chromeos::PowerManagerClient::Shutdown();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   Profile* profile() const { return main_profile_->profile(); }
@@ -264,7 +264,7 @@
     return main_profile_->volume_manager();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestServiceManagerContext context_;
   std::unique_ptr<FakeDiskMountManager> disk_mount_manager_;
   std::unique_ptr<ProfileEnvironment> main_profile_;
diff --git a/chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_stream_reader_unittest.cc b/chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_stream_reader_unittest.cc
index 3d03005..f04afc32 100644
--- a/chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_stream_reader_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_stream_reader_unittest.cc
@@ -89,7 +89,7 @@
   FileSystemProviderBufferingFileStreamReaderTest() {}
   ~FileSystemProviderBufferingFileStreamReaderTest() override {}
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(FileSystemProviderBufferingFileStreamReaderTest, Read) {
diff --git a/chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_stream_writer_unittest.cc b/chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_stream_writer_unittest.cc
index 1486bfb83..9788e53c 100644
--- a/chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_stream_writer_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_stream_writer_unittest.cc
@@ -112,7 +112,7 @@
 
   ~FileSystemProviderBufferingFileStreamWriterTest() override {}
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<net::StringIOBuffer> short_text_buffer_;
   scoped_refptr<net::StringIOBuffer> long_text_buffer_;
 };
diff --git a/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc b/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc
index acf17f2..dbdade18 100644
--- a/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc
@@ -117,7 +117,7 @@
     ASSERT_TRUE(wrong_file_url_.is_valid());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir data_dir_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   TestingProfile* profile_;     // Owned by TestingProfileManager.
diff --git a/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_writer_unittest.cc b/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_writer_unittest.cc
index f0eb1e5..046e498 100644
--- a/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_writer_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/fileapi/file_stream_writer_unittest.cc
@@ -95,7 +95,7 @@
     ASSERT_TRUE(wrong_file_url_.is_valid());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir data_dir_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   TestingProfile* profile_;  // Owned by TestingProfileManager.
diff --git a/chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util_unittest.cc b/chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util_unittest.cc
index 7cb7aa9..e67dca4 100644
--- a/chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util_unittest.cc
@@ -156,7 +156,7 @@
         file_system_context_.get());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir data_dir_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   TestingProfile* profile_;  // Owned by TestingProfileManager.
diff --git a/chrome/browser/chromeos/file_system_provider/mount_path_util_unittest.cc b/chrome/browser/chromeos/file_system_provider/mount_path_util_unittest.cc
index 0ca812335..adfd219d 100644
--- a/chrome/browser/chromeos/file_system_provider/mount_path_util_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/mount_path_util_unittest.cc
@@ -81,7 +81,7 @@
         FakeExtensionProvider::Create(kExtensionId));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   TestingProfile* profile_;  // Owned by TestingProfileManager.
   std::unique_ptr<user_manager::ScopedUserManager> user_manager_enabler_;
diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system_unittest.cc b/chrome/browser/chromeos/file_system_provider/provided_file_system_unittest.cc
index d08615e..351b42a 100644
--- a/chrome/browser/chromeos/file_system_provider/provided_file_system_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/provided_file_system_unittest.cc
@@ -267,7 +267,7 @@
         base::WrapUnique(new StubNotificationManager));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<FakeEventRouter> event_router_;
   std::unique_ptr<ProvidedFileSystemInfo> file_system_info_;
diff --git a/chrome/browser/chromeos/file_system_provider/queue_unittest.cc b/chrome/browser/chromeos/file_system_provider/queue_unittest.cc
index 91d778a2..b7b4f1f 100644
--- a/chrome/browser/chromeos/file_system_provider/queue_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/queue_unittest.cc
@@ -43,7 +43,7 @@
   FileSystemProviderQueueTest() {}
   ~FileSystemProviderQueueTest() override {}
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(FileSystemProviderQueueTest, NewToken) {
diff --git a/chrome/browser/chromeos/file_system_provider/registry_unittest.cc b/chrome/browser/chromeos/file_system_provider/registry_unittest.cc
index bdb197f..482796c 100644
--- a/chrome/browser/chromeos/file_system_provider/registry_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/registry_unittest.cc
@@ -118,7 +118,7 @@
     fake_watcher_.last_tag = "hello-world";
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   TestingProfile* profile_;
   std::unique_ptr<RegistryInterface> registry_;
diff --git a/chrome/browser/chromeos/file_system_provider/request_manager_unittest.cc b/chrome/browser/chromeos/file_system_provider/request_manager_unittest.cc
index 6d48a889..b3c7b62f 100644
--- a/chrome/browser/chromeos/file_system_provider/request_manager_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/request_manager_unittest.cc
@@ -331,7 +331,7 @@
                                               notification_manager_.get()));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<FakeNotificationManager> notification_manager_;
   std::unique_ptr<RequestManager> request_manager_;
diff --git a/chrome/browser/chromeos/file_system_provider/scoped_file_opener_unittest.cc b/chrome/browser/chromeos/file_system_provider/scoped_file_opener_unittest.cc
index 5872f22..7b5c6832 100644
--- a/chrome/browser/chromeos/file_system_provider/scoped_file_opener_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/scoped_file_opener_unittest.cc
@@ -74,7 +74,7 @@
 
 TEST(ScopedFileOpenerTest, AbortWhileOpening) {
   TestingProvidedFileSystem file_system;
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   OpenLog log;
   {
     ScopedFileOpener file_opener(&file_system, base::FilePath(),
@@ -93,7 +93,7 @@
 
 TEST(ScopedFileOpenerTest, CloseAfterOpening) {
   TestingProvidedFileSystem file_system;
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   OpenLog log;
   {
     ScopedFileOpener file_opener(&file_system, base::FilePath(),
@@ -114,7 +114,7 @@
 
 TEST(ScopedFileOpenerTest, CloseAfterAborting) {
   TestingProvidedFileSystem file_system;
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   OpenLog log;
   {
     ScopedFileOpener file_opener(&file_system, base::FilePath(),
diff --git a/chrome/browser/chromeos/file_system_provider/service_unittest.cc b/chrome/browser/chromeos/file_system_provider/service_unittest.cc
index cdf842e..d09360e 100644
--- a/chrome/browser/chromeos/file_system_provider/service_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/service_unittest.cc
@@ -119,7 +119,7 @@
     service_->Shutdown();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   TestingProfile* profile_;
   FakeChromeUserManager* user_manager_;
diff --git a/chrome/browser/chromeos/file_system_provider/throttled_file_system_unittest.cc b/chrome/browser/chromeos/file_system_provider/throttled_file_system_unittest.cc
index b4f0646..38852135 100644
--- a/chrome/browser/chromeos/file_system_provider/throttled_file_system_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/throttled_file_system_unittest.cc
@@ -65,7 +65,7 @@
         std::make_unique<FakeProvidedFileSystem>(file_system_info)));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<ThrottledFileSystem> file_system_;
 };
 
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_loader_factory_unittest.cc b/chrome/browser/chromeos/fileapi/external_file_url_loader_factory_unittest.cc
index f835e44..bc6e678 100644
--- a/chrome/browser/chromeos/fileapi/external_file_url_loader_factory_unittest.cc
+++ b/chrome/browser/chromeos/fileapi/external_file_url_loader_factory_unittest.cc
@@ -49,7 +49,7 @@
 class ExternalFileURLLoaderFactoryTest : public testing::Test {
  protected:
   ExternalFileURLLoaderFactoryTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         integration_service_factory_callback_(base::BindRepeating(
             &ExternalFileURLLoaderFactoryTest::CreateDriveIntegrationService,
             base::Unretained(this))),
@@ -142,7 +142,7 @@
         drive_cache_dir_.GetPath(), fake_file_system_);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestServiceManagerContext context_;
   drive::DriveIntegrationServiceFactory::FactoryCallback
       integration_service_factory_callback_;
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc b/chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc
index 02062a2f..5266214 100644
--- a/chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc
+++ b/chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc
@@ -131,7 +131,7 @@
 class ExternalFileURLRequestJobTest : public testing::Test {
  protected:
   ExternalFileURLRequestJobTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         integration_service_factory_callback_(base::Bind(
             &ExternalFileURLRequestJobTest::CreateDriveIntegrationService,
             base::Unretained(this))),
@@ -246,7 +246,7 @@
 
   drive::FileSystemInterface* GetFileSystem() { return fake_file_system_; }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestServiceManagerContext context_;
   drive::DriveIntegrationServiceFactory::FactoryCallback
       integration_service_factory_callback_;
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc b/chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc
index fcf8af9..de18993 100644
--- a/chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc
+++ b/chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc
@@ -18,7 +18,7 @@
 namespace {
 
 // Sets up ProfileManager for testing and marks the current thread as UI by
-// TestBrowserThreadBundle. We need the thread since Profile objects must be
+// BrowserTaskEnvironment. We need the thread since Profile objects must be
 // touched from UI and hence has CHECK/DCHECKs for it.
 class ExternalFileURLUtilTest : public testing::Test {
  protected:
@@ -41,7 +41,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager testing_profile_manager_;
 };
 
diff --git a/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc b/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
index ea0bf35..e388982 100644
--- a/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
+++ b/chrome/browser/chromeos/fileapi/recent_arc_media_source_unittest.cc
@@ -139,7 +139,7 @@
 
   void EnableDefer() { runner_->SetShouldDefer(true); }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   arc::FakeFileSystemInstance fake_file_system_;
 
   // Use the same initialization/destruction order as
diff --git a/chrome/browser/chromeos/fileapi/recent_disk_source_unittest.cc b/chrome/browser/chromeos/fileapi/recent_disk_source_unittest.cc
index 692a589..14eb778 100644
--- a/chrome/browser/chromeos/fileapi/recent_disk_source_unittest.cc
+++ b/chrome/browser/chromeos/fileapi/recent_disk_source_unittest.cc
@@ -90,7 +90,7 @@
     return files;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   const GURL origin_;
   std::unique_ptr<TestingProfile> profile_;
   base::ScopedTempDir temp_dir_;
diff --git a/chrome/browser/chromeos/fileapi/recent_model_unittest.cc b/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
index 09f1485..45d7ec9 100644
--- a/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
+++ b/chrome/browser/chromeos/fileapi/recent_model_unittest.cc
@@ -94,7 +94,7 @@
     return files;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/chromeos/guest_os/guest_os_share_path_unittest.cc b/chrome/browser/chromeos/guest_os/guest_os_share_path_unittest.cc
index a02b6f1..66612ca4 100644
--- a/chrome/browser/chromeos/guest_os/guest_os_share_path_unittest.cc
+++ b/chrome/browser/chromeos/guest_os/guest_os_share_path_unittest.cc
@@ -234,7 +234,7 @@
     guest_os_share_path_->RegisterSharedPath(crostini::kCrostiniDefaultVmName,
                                              shared_path_);
     // Run threads now to allow watcher for shared_path_ to start.
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   void SetUp() override {
@@ -261,7 +261,7 @@
     // Shutdown GuestOsSharePath to schedule FilePathWatchers to be destroyed,
     // then run thread bundle to ensure they are.
     guest_os_share_path_->Shutdown();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     run_loop_.reset();
     scoped_user_manager_.reset();
     profile_.reset();
@@ -285,7 +285,7 @@
   chromeos::FakeSeneschalClient* fake_seneschal_client_;
   chromeos::FakeConciergeClient* fake_concierge_client_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<base::RunLoop> run_loop_;
   std::unique_ptr<TestingProfile> profile_;
   GuestOsSharePath* guest_os_share_path_;
diff --git a/chrome/browser/chromeos/hats/hats_finch_helper_unittest.cc b/chrome/browser/chromeos/hats/hats_finch_helper_unittest.cc
index 1a45ca3..a56e0c76 100644
--- a/chrome/browser/chromeos/hats/hats_finch_helper_unittest.cc
+++ b/chrome/browser/chromeos/hats/hats_finch_helper_unittest.cc
@@ -44,7 +44,7 @@
 
  private:
   // Must outlive |profile_|.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  protected:
   TestingProfile profile_;
diff --git a/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc b/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc
index 832798e..44d171dc 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc
+++ b/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc
@@ -189,7 +189,7 @@
   GURL options_page_;
   GURL input_view_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<ui::MockIMEInputContextHandler>
       mock_ime_input_context_handler_;
   std::unique_ptr<ChromeKeyboardControllerClientTestHelper>
diff --git a/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc b/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc
index 41cbbdc..5518872d 100644
--- a/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc
+++ b/chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc
@@ -69,7 +69,7 @@
                   language_prefs::kPreferredKeyboardLayout));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   sync_preferences::TestingPrefServiceSyncable* mock_user_prefs_;
   MockInputMethodManagerImpl mock_manager_;
   TestingProfileManager mock_profile_manager_;
diff --git a/chrome/browser/chromeos/kerberos/kerberos_ticket_expiry_notification_test.cc b/chrome/browser/chromeos/kerberos/kerberos_ticket_expiry_notification_test.cc
index afc17e7..98c9abf 100644
--- a/chrome/browser/chromeos/kerberos/kerberos_ticket_expiry_notification_test.cc
+++ b/chrome/browser/chromeos/kerberos/kerberos_ticket_expiry_notification_test.cc
@@ -53,7 +53,7 @@
             base::Unretained(this)));
   }
 
-  content::TestBrowserThreadBundle test_environment_{
+  content::BrowserTaskEnvironment test_environment_{
       base::test::TaskEnvironment::MainThreadType::UI};
   TestingProfileManager profile_manager_{TestingBrowserProcess::GetGlobal()};
   TestingProfile* profile_ = nullptr;
diff --git a/chrome/browser/chromeos/lock_screen_apps/app_manager_impl_unittest.cc b/chrome/browser/chromeos/lock_screen_apps/app_manager_impl_unittest.cc
index f9ac5f1..88fdc36c 100644
--- a/chrome/browser/chromeos/lock_screen_apps/app_manager_impl_unittest.cc
+++ b/chrome/browser/chromeos/lock_screen_apps/app_manager_impl_unittest.cc
@@ -440,7 +440,7 @@
   void OnNoteTakingChanged() { ++note_taking_changed_count_; }
 
   std::unique_ptr<base::test::ScopedCommandLine> command_line_;
-  content::TestBrowserThreadBundle threads_;
+  content::BrowserTaskEnvironment threads_;
 
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
   chromeos::ScopedTestUserManager user_manager_;
diff --git a/chrome/browser/chromeos/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc b/chrome/browser/chromeos/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc
index d0886ece..6c3977c 100644
--- a/chrome/browser/chromeos/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc
+++ b/chrome/browser/chromeos/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc
@@ -348,7 +348,7 @@
 
   base::ScopedTempDir user_data_dir_;
   ScopedTestingLocalState local_state_;
-  content::TestBrowserThreadBundle threads_;
+  content::BrowserTaskEnvironment threads_;
 
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
   chromeos::ScopedTestUserManager test_user_manager_;
diff --git a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
index 75b155be..4ef079c 100644
--- a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
+++ b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
@@ -458,7 +458,7 @@
     auth_->SetOwnerState(owner_check_finished, check_result);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   UserContext user_context_;
   UserContext user_context_with_transformed_key_;
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_extensions_external_loader_unittest.cc b/chrome/browser/chromeos/login/demo_mode/demo_extensions_external_loader_unittest.cc
index 572e407..2eb2a38b 100644
--- a/chrome/browser/chromeos/login/demo_mode/demo_extensions_external_loader_unittest.cc
+++ b/chrome/browser/chromeos/login/demo_mode/demo_extensions_external_loader_unittest.cc
@@ -217,7 +217,7 @@
 
   std::unique_ptr<DemoModeTestHelper> demo_mode_test_helper_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  private:
   scoped_refptr<network::WeakWrapperSharedURLLoaderFactory>
@@ -468,7 +468,7 @@
   loader->LoadApp(kTestExtensionId);
   // Verify that a downloader has started and is attempting to download an
   // update manifest.
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(1, test_url_loader_factory_.NumPending());
   // Return a manifest to the downloader.
   std::string manifest;
@@ -476,7 +476,7 @@
   ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir));
   EXPECT_TRUE(base::ReadFileToString(
       test_dir.Append(kTestExtensionUpdateManifest), &manifest));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(1, test_url_loader_factory_.NumPending());
   test_url_loader_factory_.AddResponse(
       test_url_loader_factory_.pending_requests()->at(0).request.url.spec(),
@@ -489,7 +489,7 @@
       .Wait();
 
   // Verify that the downloader is attempting to download a CRX file.
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(1, test_url_loader_factory_.NumPending());
   // Trigger downloading of the CRX file.
   test_url_loader_factory_.AddResponse(
@@ -548,7 +548,7 @@
   FakeChromeUserManager* user_manager_ = nullptr;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<user_manager::ScopedUserManager> scoped_user_manager_;
   std::unique_ptr<DemoModeTestHelper> demo_mode_test_helper_;
 
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover_unittest.cc b/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover_unittest.cc
index 78c2f17..af960af 100644
--- a/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover_unittest.cc
+++ b/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover_unittest.cc
@@ -160,7 +160,7 @@
   }
 
   TestingPrefServiceSimple local_state_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<DemoModeTestHelper> demo_mode_test_helper_;
 
@@ -246,7 +246,7 @@
   EXPECT_EQ(DemoModeResourcesRemover::Get(), remover.get());
 
   FakeCryptohomeClient::Get()->NotifyLowDiskSpace(1024 * 1024 * 1024);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(DemoModeResourcesExist());
 }
 
@@ -260,7 +260,7 @@
   EXPECT_FALSE(DemoModeResourcesRemover::Get());
 
   FakeCryptohomeClient::Get()->NotifyLowDiskSpace(1024 * 1024 * 1024);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 }
 
@@ -273,7 +273,7 @@
   EXPECT_EQ(DemoModeResourcesRemover::Get(), remover.get());
 
   FakeCryptohomeClient::Get()->NotifyLowDiskSpace(1024 * 1024 * 1024);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(DemoModeResourcesExist());
 
   // Reset the resources remover - subsequent attempts to create the remover
@@ -294,7 +294,7 @@
       DemoModeResourcesRemover::RemovalReason::kEnterpriseEnrolled,
       base::BindOnce(&RecordRemovalResult, &result));
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_TRUE(result.has_value());
   EXPECT_EQ(DemoModeResourcesRemover::RemovalResult::kSuccess, result.value());
@@ -312,7 +312,7 @@
       DemoModeResourcesRemover::RemovalReason::kLowDiskSpace,
       base::BindOnce(&RecordRemovalResult, &result));
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_TRUE(result.has_value());
   EXPECT_EQ(DemoModeResourcesRemover::RemovalResult::kNotFound, result.value());
@@ -352,7 +352,7 @@
       DemoModeResourcesRemover::RemovalReason::kLowDiskSpace,
       base::BindOnce(&RecordRemovalResult, &result_2));
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_FALSE(DemoModeResourcesExist());
   ASSERT_TRUE(result_1.has_value());
@@ -372,7 +372,7 @@
   remover->AttemptRemoval(
       DemoModeResourcesRemover::RemovalReason::kLowDiskSpace,
       DemoModeResourcesRemover::RemovalCallback());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_FALSE(DemoModeResourcesExist());
 
@@ -393,7 +393,7 @@
 
   AddAndLogInUser(TestUserType::kRegular, remover.get());
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(DemoModeResourcesExist());
 }
@@ -416,7 +416,7 @@
   AddAndLogInUser(TestUserType::kRegular, remover.get());
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Advance time so it's longer than removal threshold, but under the idle
@@ -424,7 +424,7 @@
   AdvanceTestTime(base::TimeDelta::FromSeconds(4));
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(DemoModeResourcesExist());
 }
 
@@ -454,7 +454,7 @@
 
   // The total usage was over the removal threshold, but it happened before
   // login - the resources should still be around.
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 }
 
@@ -476,21 +476,21 @@
   AddAndLogInUser(TestUserType::kRegular, remover.get());
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Over update interval, but under removal threshold.
   AdvanceTestTime(base::TimeDelta::FromSeconds(2));
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // This should get accumulated time over removal threshold.
   AdvanceTestTime(base::TimeDelta::FromSeconds(2));
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(DemoModeResourcesExist());
 }
 
@@ -512,7 +512,7 @@
   AddAndLogInUser(TestUserType::kRegular, remover.get());
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Advance to the time just under removal threshold in small increments
@@ -522,7 +522,7 @@
   AdvanceTestTime(base::TimeDelta::FromSeconds(3));
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Simulate longer idle period.
@@ -531,7 +531,7 @@
 
   // The resources should be still be here, as usage amount should not have been
   // incremented.
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Advance time little bit more, so it's over the removal threshold (and over
@@ -539,7 +539,7 @@
   AdvanceTestTime(base::TimeDelta::FromSeconds(3));
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(DemoModeResourcesExist());
 }
 
@@ -561,7 +561,7 @@
   AddAndLogInUser(TestUserType::kRegular, remover.get());
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Advance to the time just under removal threshold in small increments
@@ -572,7 +572,7 @@
   AdvanceTestTime(base::TimeDelta::FromSeconds(3));
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Simulate longer idle period.
@@ -581,7 +581,7 @@
 
   // The resources should be still be here, as usage amount should not have been
   // incremented.
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Advance time cummulatively over the update period.
@@ -591,7 +591,7 @@
   activity_detector_.HandleExternalUserActivity();
 
   // When combined the accumulated active usage was above the removal threshold.
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(DemoModeResourcesExist());
 }
 
@@ -613,7 +613,7 @@
   AddAndLogInUser(TestUserType::kRegular, remover.get());
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Advance to the time just under removal threshold in small increments, but
@@ -623,7 +623,7 @@
   AdvanceTestTime(base::TimeDelta::FromSeconds(3));
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Advance time so total is over the remova threshold, but in increment under
@@ -631,7 +631,7 @@
   AdvanceTestTime(base::TimeDelta::FromSeconds(3));
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Simulate longer idle period.
@@ -640,7 +640,7 @@
 
   // Activity after the idle period ended should have flushed previous pending
   // usage, and the resources should have been removed.
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(DemoModeResourcesExist());
 }
 
@@ -697,14 +697,14 @@
   AddAndLogInUser(TestUserType::kRegular, remover.get());
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Over update interval, but under removal threshold.
   AdvanceTestTime(base::TimeDelta::FromSeconds(2));
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   remover.reset();
@@ -722,7 +722,7 @@
   AdvanceTestTime(base::TimeDelta::FromSeconds(2));
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(DemoModeResourcesExist());
 }
 
@@ -745,14 +745,14 @@
   AddAndLogInUser(TestUserType::kRegular, remover.get());
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // Over update interval, but under removal threshold.
   AdvanceTestTime(base::TimeDelta::FromSeconds(3));
   activity_detector_.HandleExternalUserActivity();
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 
   // This is under update interval, but should get accumulated time over
@@ -773,7 +773,7 @@
           base::TimeDelta::FromSeconds(9) /*idle_threshold*/));
   AddAndLogInUser(TestUserType::kRegular, remover.get());
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(DemoModeResourcesExist());
 }
 
@@ -785,7 +785,7 @@
   ASSERT_TRUE(remover.get());
 
   AddAndLogInUser(TestUserType::kDerelictDemoKiosk, remover.get());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(DemoModeResourcesExist());
 }
@@ -810,7 +810,7 @@
 
   AdvanceTestTime(base::TimeDelta::FromSeconds(5));
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 }
 
@@ -822,7 +822,7 @@
 
   AddAndLogInUser(TestUserType::kRegular, remover.get());
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_FALSE(DemoModeResourcesExist());
 }
@@ -835,7 +835,7 @@
 
   AddAndLogInUser(TestUserType::kGuest, remover.get());
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(DemoModeResourcesExist());
 }
@@ -848,7 +848,7 @@
 
   AddAndLogInUser(TestUserType::kGuest, remover.get());
   FakeCryptohomeClient::Get()->NotifyLowDiskSpace(1024 * 1024 * 1024);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_FALSE(DemoModeResourcesExist());
 }
@@ -860,7 +860,7 @@
   ASSERT_TRUE(remover.get());
 
   AddAndLogInUser(TestUserType::kPublicAccount, remover.get());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_FALSE(DemoModeResourcesExist());
 }
@@ -872,7 +872,7 @@
   ASSERT_TRUE(remover.get());
 
   AddAndLogInUser(TestUserType::kKiosk, remover.get());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_FALSE(DemoModeResourcesExist());
 }
@@ -884,7 +884,7 @@
   ASSERT_TRUE(remover.get());
 
   AddAndLogInUser(TestUserType::kPublicAccount, remover.get());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(DemoModeResourcesExist());
 }
@@ -898,7 +898,7 @@
 
   AddAndLogInUser(TestUserType::kPublicAccount, remover.get());
   FakeCryptohomeClient::Get()->NotifyLowDiskSpace(1024 * 1024 * 1024);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_FALSE(DemoModeResourcesExist());
 }
@@ -923,7 +923,7 @@
 
   AdvanceTestTime(base::TimeDelta::FromSeconds(5));
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(DemoModeResourcesExist());
 }
 
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_resources_unittest.cc b/chrome/browser/chromeos/login/demo_mode/demo_resources_unittest.cc
index 519ee79..8efb71e45 100644
--- a/chrome/browser/chromeos/login/demo_mode/demo_resources_unittest.cc
+++ b/chrome/browser/chromeos/login/demo_mode/demo_resources_unittest.cc
@@ -84,7 +84,7 @@
   }
 
   FakeCrOSComponentManager* cros_component_manager_ = nullptr;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  private:
   BrowserProcessPlatformPartTestApi browser_process_platform_part_test_api_;
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_session_unittest.cc b/chrome/browser/chromeos/login/demo_mode/demo_session_unittest.cc
index 7fb2e861..fe6d58d 100644
--- a/chrome/browser/chromeos/login/demo_mode/demo_session_unittest.cc
+++ b/chrome/browser/chromeos/login/demo_mode/demo_session_unittest.cc
@@ -142,7 +142,7 @@
   }
 
   FakeCrOSComponentManager* cros_component_manager_ = nullptr;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<session_manager::SessionManager> session_manager_;
   std::unique_ptr<WallpaperControllerClient> wallpaper_controller_client_;
   TestWallpaperController test_wallpaper_controller_;
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular_unittest.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular_unittest.cc
index 5cc8ea27..f4aaf25 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular_unittest.cc
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular_unittest.cc
@@ -127,7 +127,7 @@
   }
 
   // Must outlive TestingProfiles.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestingProfile> profile_;
   chromeos::FakeChromeUserManager* fake_chrome_user_manager_;
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_unittest.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_unittest.cc
index 6bf464fe..f6c9092b 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_unittest.cc
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_unittest.cc
@@ -198,7 +198,7 @@
 class EasyUnlockTpmKeyManagerTest : public testing::Test {
  public:
   EasyUnlockTpmKeyManagerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         user_manager_(new FakeChromeUserManager()),
         user_manager_enabler_(base::WrapUnique(user_manager_)),
         profile_manager_(TestingBrowserProcess::GetGlobal()) {}
@@ -340,7 +340,7 @@
   const AccountId test_account_id_ = AccountId::FromUserEmail(kTestUserId);
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // The NSS system slot used by EasyUnlockTPMKeyManagers in tests.
   std::unique_ptr<crypto::ScopedTestSystemNSSKeySlot> test_system_slot_;
diff --git a/chrome/browser/chromeos/login/enterprise_user_session_metrics_unittest.cc b/chrome/browser/chromeos/login/enterprise_user_session_metrics_unittest.cc
index eba0e69..d1caf94 100644
--- a/chrome/browser/chromeos/login/enterprise_user_session_metrics_unittest.cc
+++ b/chrome/browser/chromeos/login/enterprise_user_session_metrics_unittest.cc
@@ -40,7 +40,7 @@
   ~EnterpriseUserSessionMetricsTest() override = default;
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedTestingLocalState local_state_;
   std::unique_ptr<ScopedStubInstallAttributes> install_attributes_;
 
diff --git a/chrome/browser/chromeos/login/error_screens_histogram_helper_unittest.cc b/chrome/browser/chromeos/login/error_screens_histogram_helper_unittest.cc
index f77e8b8..0c2c9e8 100644
--- a/chrome/browser/chromeos/login/error_screens_histogram_helper_unittest.cc
+++ b/chrome/browser/chromeos/login/error_screens_histogram_helper_unittest.cc
@@ -19,7 +19,7 @@
     second_helper_.reset(new ErrorScreensHistogramHelper("TestScreen2"));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::HistogramTester histograms_;
   std::unique_ptr<ErrorScreensHistogramHelper> helper_;
   std::unique_ptr<ErrorScreensHistogramHelper> second_helper_;
diff --git a/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc b/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc
index 658837f..832a370 100644
--- a/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc
@@ -141,7 +141,7 @@
  private:
   std::unique_ptr<MockLoginDisplayHost> mock_login_display_host_;
   std::unique_ptr<MockLoginDisplay> mock_login_display_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedTestingLocalState local_state_;
 
   // Required by ExistingUserController:
diff --git a/chrome/browser/chromeos/login/lock/screen_locker_unittest.cc b/chrome/browser/chromeos/login/lock/screen_locker_unittest.cc
index 3036ab8c..04f688fe 100644
--- a/chrome/browser/chromeos/login/lock/screen_locker_unittest.cc
+++ b/chrome/browser/chromeos/login/lock/screen_locker_unittest.cc
@@ -112,7 +112,7 @@
 
  protected:
   // Needed for main loop and posting async tasks.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Needed to set up Service Manager and create mojo fakes.
   content::TestServiceManagerContext context_;
diff --git a/chrome/browser/chromeos/login/profile_auth_data_unittest.cc b/chrome/browser/chromeos/login/profile_auth_data_unittest.cc
index 38ba268..25f7488 100644
--- a/chrome/browser/chromeos/login/profile_auth_data_unittest.cc
+++ b/chrome/browser/chromeos/login/profile_auth_data_unittest.cc
@@ -109,7 +109,7 @@
   network::mojom::CookieManager* GetCookies(
       content::BrowserContext* browser_context);
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   network::NetworkService* network_service_;
   TestingProfileWithNetworkContext login_browser_context_;
diff --git a/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage_unittest.cc b/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage_unittest.cc
index 2bce1e34..cd41fa1 100644
--- a/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage_unittest.cc
+++ b/chrome/browser/chromeos/login/quick_unlock/fingerprint_storage_unittest.cc
@@ -32,7 +32,7 @@
                                      records_number);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
   DISALLOW_COPY_AND_ASSIGN(FingerprintStorageUnitTest);
diff --git a/chrome/browser/chromeos/login/quick_unlock/pin_storage_prefs_unittest.cc b/chrome/browser/chromeos/login/quick_unlock/pin_storage_prefs_unittest.cc
index c297231..8fe5f2f 100644
--- a/chrome/browser/chromeos/login/quick_unlock/pin_storage_prefs_unittest.cc
+++ b/chrome/browser/chromeos/login/quick_unlock/pin_storage_prefs_unittest.cc
@@ -32,7 +32,7 @@
         ->pin_storage_prefs();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
   DISALLOW_COPY_AND_ASSIGN(PinStoragePrefsUnitTest);
diff --git a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage_unittest.cc b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage_unittest.cc
index 8f52880..e808509c 100644
--- a/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage_unittest.cc
+++ b/chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage_unittest.cc
@@ -55,7 +55,7 @@
         ->auth_token_->Reset();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
   DISALLOW_COPY_AND_ASSIGN(QuickUnlockStorageUnitTest);
diff --git a/chrome/browser/chromeos/login/saml/in_session_password_change_manager_unittest.cc b/chrome/browser/chromeos/login/saml/in_session_password_change_manager_unittest.cc
index f3db53ce..ad56a3b 100644
--- a/chrome/browser/chromeos/login/saml/in_session_password_change_manager_unittest.cc
+++ b/chrome/browser/chromeos/login/saml/in_session_password_change_manager_unittest.cc
@@ -94,7 +94,7 @@
     EXPECT_FALSE(Notification().has_value());
   }
 
-  content::TestBrowserThreadBundle test_environment_{
+  content::BrowserTaskEnvironment test_environment_{
       base::test::TaskEnvironment::MainThreadType::UI,
       base::test::TaskEnvironment::TimeSource::MOCK_TIME};
   TestingProfileManager profile_manager_{TestingBrowserProcess::GetGlobal()};
diff --git a/chrome/browser/chromeos/login/saml/password_expiry_notification_unittest.cc b/chrome/browser/chromeos/login/saml/password_expiry_notification_unittest.cc
index 3b15f95..77cd8f5 100644
--- a/chrome/browser/chromeos/login/saml/password_expiry_notification_unittest.cc
+++ b/chrome/browser/chromeos/login/saml/password_expiry_notification_unittest.cc
@@ -47,7 +47,7 @@
         "saml.password-expiry-notification");
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   NotificationDisplayServiceTester display_service_tester_{&profile_};
 };
diff --git a/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_unittest.cc b/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_unittest.cc
index 2f9e351..2df63826 100644
--- a/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_unittest.cc
+++ b/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_unittest.cc
@@ -57,7 +57,7 @@
 
   TestingPrefServiceSimple* GetTestingLocalState();
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   extensions::QuotaService::ScopedDisablePurgeForTesting
       disable_purge_for_testing_;
 
@@ -93,7 +93,7 @@
   EXPECT_CALL(*user_manager_, RemoveSessionStateObserver(_)).Times(1);
   profile_.reset();
   // Finish any pending tasks before deleting the TestingBrowserProcess.
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   TestingBrowserProcess::DeleteInstance();
   base::PowerMonitor::ShutdownForTesting();
 }
diff --git a/chrome/browser/chromeos/login/screens/network_screen_unittest.cc b/chrome/browser/chromeos/login/screens/network_screen_unittest.cc
index 9383ab29..37625f9 100644
--- a/chrome/browser/chromeos/login/screens/network_screen_unittest.cc
+++ b/chrome/browser/chromeos/login/screens/network_screen_unittest.cc
@@ -68,7 +68,7 @@
   }
 
   // Test versions of core browser infrastructure.
-  content::TestBrowserThreadBundle threads_;
+  content::BrowserTaskEnvironment threads_;
 
   // More accessory objects needed by NetworkScreen.
   MockNetworkScreenView mock_view_;
diff --git a/chrome/browser/chromeos/login/screens/recommend_apps/recommend_apps_fetcher_impl_unittest.cc b/chrome/browser/chromeos/login/screens/recommend_apps/recommend_apps_fetcher_impl_unittest.cc
index 42a79df..cfe8ab2 100644
--- a/chrome/browser/chromeos/login/screens/recommend_apps/recommend_apps_fetcher_impl_unittest.cc
+++ b/chrome/browser/chromeos/login/screens/recommend_apps/recommend_apps_fetcher_impl_unittest.cc
@@ -346,7 +346,7 @@
     arc_features_callback_ = std::move(callback);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   service_manager::TestConnectorFactory connector_factory_;
 
diff --git a/chrome/browser/chromeos/login/screens/update_screen_unittest.cc b/chrome/browser/chromeos/login/screens/update_screen_unittest.cc
index 8f23ddd..feb7c686 100644
--- a/chrome/browser/chromeos/login/screens/update_screen_unittest.cc
+++ b/chrome/browser/chromeos/login/screens/update_screen_unittest.cc
@@ -117,7 +117,7 @@
   }
 
   // Test versions of core browser infrastructure.
-  content::TestBrowserThreadBundle threads_;
+  content::BrowserTaskEnvironment threads_;
   ScopedTestingLocalState local_state_;
 
   DISALLOW_COPY_AND_ASSIGN(UpdateScreenUnitTest);
diff --git a/chrome/browser/chromeos/login/session/user_session_manager_test.cc b/chrome/browser/chromeos/login/session/user_session_manager_test.cc
index e6ab480..f4f80291 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager_test.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager_test.cc
@@ -70,7 +70,7 @@
 
   // Allows UserSessionManager to request the NetworkConnectionTracker in its
   // constructor.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   user_manager::ScopedUserManager scoped_user_manager_{
       std::make_unique<user_manager::FakeUserManager>()};
diff --git a/chrome/browser/chromeos/login/ui/login_screen_extension_ui/login_screen_extension_ui_dialog_delegate_unittest.cc b/chrome/browser/chromeos/login/ui/login_screen_extension_ui/login_screen_extension_ui_dialog_delegate_unittest.cc
index 20a9477..61cdd61 100644
--- a/chrome/browser/chromeos/login/ui/login_screen_extension_ui/login_screen_extension_ui_dialog_delegate_unittest.cc
+++ b/chrome/browser/chromeos/login/ui/login_screen_extension_ui/login_screen_extension_ui_dialog_delegate_unittest.cc
@@ -34,7 +34,7 @@
 using LoginScreenExtensionUiDialogDelegateUnittest = testing::Test;
 
 TEST_F(LoginScreenExtensionUiDialogDelegateUnittest, Test) {
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   scoped_refptr<const extensions::Extension> extension =
       extensions::ExtensionBuilder(kExtensionName).SetID(kExtensionId).Build();
diff --git a/chrome/browser/chromeos/login/ui/login_screen_extension_ui/login_screen_extension_ui_web_dialog_view_unittest.cc b/chrome/browser/chromeos/login/ui/login_screen_extension_ui/login_screen_extension_ui_web_dialog_view_unittest.cc
index 312cea9..be8843e 100644
--- a/chrome/browser/chromeos/login/ui/login_screen_extension_ui/login_screen_extension_ui_web_dialog_view_unittest.cc
+++ b/chrome/browser/chromeos/login/ui/login_screen_extension_ui/login_screen_extension_ui_web_dialog_view_unittest.cc
@@ -24,7 +24,7 @@
   ~LoginScreenExtensionUiWebDialogViewUnittest() override = default;
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile;
 
  private:
diff --git a/chrome/browser/chromeos/login/users/multi_profile_user_controller_unittest.cc b/chrome/browser/chromeos/login/users/multi_profile_user_controller_unittest.cc
index 88d2b87..c3845d7 100644
--- a/chrome/browser/chromeos/login/users/multi_profile_user_controller_unittest.cc
+++ b/chrome/browser/chromeos/login/users/multi_profile_user_controller_unittest.cc
@@ -205,7 +205,7 @@
 
   TestingProfile* profile(int index) { return user_profiles_[index]; }
 
-  content::TestBrowserThreadBundle threads_;
+  content::BrowserTaskEnvironment threads_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   FakeChromeUserManager* fake_user_manager_;  // Not owned
   user_manager::ScopedUserManager user_manager_enabler_;
diff --git a/chrome/browser/chromeos/login/users/user_manager_unittest.cc b/chrome/browser/chromeos/login/users/user_manager_unittest.cc
index 9830a82..4b73aa6 100644
--- a/chrome/browser/chromeos/login/users/user_manager_unittest.cc
+++ b/chrome/browser/chromeos/login/users/user_manager_unittest.cc
@@ -158,7 +158,7 @@
   std::unique_ptr<WallpaperControllerClient> wallpaper_controller_client_;
   TestWallpaperController test_wallpaper_controller_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   ScopedCrosSettingsTestHelper settings_helper_;
   std::unique_ptr<ScopedTestingLocalState> local_state_;
diff --git a/chrome/browser/chromeos/net/network_portal_detector_impl_unittest.cc b/chrome/browser/chromeos/net/network_portal_detector_impl_unittest.cc
index e6f23fd..9a178eaf 100644
--- a/chrome/browser/chromeos/net/network_portal_detector_impl_unittest.cc
+++ b/chrome/browser/chromeos/net/network_portal_detector_impl_unittest.cc
@@ -289,7 +289,7 @@
     NetworkHandler::Initialize();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   Profile* profile_ = nullptr;
   std::unique_ptr<NetworkPortalDetectorImpl> network_portal_detector_;
   std::unique_ptr<base::HistogramSamples> original_samples_;
diff --git a/chrome/browser/chromeos/net/network_pref_state_observer_unittest.cc b/chrome/browser/chromeos/net/network_pref_state_observer_unittest.cc
index 1f0d8c6..bcca6a3 100644
--- a/chrome/browser/chromeos/net/network_pref_state_observer_unittest.cc
+++ b/chrome/browser/chromeos/net/network_pref_state_observer_unittest.cc
@@ -73,7 +73,7 @@
     return profile;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   FakeChromeUserManager* fake_user_manager_;
   user_manager::ScopedUserManager user_manager_enabler_;
   TestingProfileManager profile_manager_;
diff --git a/chrome/browser/chromeos/net/wake_on_wifi_manager_unittest.cc b/chrome/browser/chromeos/net/wake_on_wifi_manager_unittest.cc
index f73756e..ec124b89 100644
--- a/chrome/browser/chromeos/net/wake_on_wifi_manager_unittest.cc
+++ b/chrome/browser/chromeos/net/wake_on_wifi_manager_unittest.cc
@@ -34,7 +34,7 @@
 
  private:
   // Must outlive |profile_|.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  protected:
   StrictMock<MockNetworkDeviceHandler> mock_network_device_handler_;
diff --git a/chrome/browser/chromeos/network_change_manager_client_unittest.cc b/chrome/browser/chromeos/network_change_manager_client_unittest.cc
index ead84f1..66fb201 100644
--- a/chrome/browser/chromeos/network_change_manager_client_unittest.cc
+++ b/chrome/browser/chromeos/network_change_manager_client_unittest.cc
@@ -109,7 +109,7 @@
 TEST(NetworkChangeManagerClientTest,
      NetworkChangeNotifierConnectionTypeUpdated) {
   // Create a NetworkChangeNotifier with a non-NONE connection type.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<net::NetworkChangeNotifierPosix> network_change_notifier(
       static_cast<net::NetworkChangeNotifierPosix*>(
           net::NetworkChangeNotifier::Create().release()));
@@ -216,7 +216,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   NetworkState default_network_;
   std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier_;
   std::unique_ptr<NetworkChangeManagerClient> proxy_;
diff --git a/chrome/browser/chromeos/plugin_vm/plugin_vm_files_unittest.cc b/chrome/browser/chromeos/plugin_vm/plugin_vm_files_unittest.cc
index 12371c10..c7e8a00 100644
--- a/chrome/browser/chromeos/plugin_vm/plugin_vm_files_unittest.cc
+++ b/chrome/browser/chromeos/plugin_vm/plugin_vm_files_unittest.cc
@@ -43,7 +43,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<chromeos::ScopedSetRunningOnChromeOSForTesting> fake_release_;
   base::FilePath my_files_;
@@ -53,7 +53,7 @@
   EnsureDefaultSharedDirExists(profile_.get(),
                                base::BindOnce(&PluginVmFilesTest::Callback,
                                               base::Unretained(this), true));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 TEST_F(PluginVmFilesTest, DirAlreadyExists) {
@@ -61,7 +61,7 @@
   EnsureDefaultSharedDirExists(profile_.get(),
                                base::BindOnce(&PluginVmFilesTest::Callback,
                                               base::Unretained(this), true));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 TEST_F(PluginVmFilesTest, FileAlreadyExists) {
@@ -73,7 +73,7 @@
   EnsureDefaultSharedDirExists(profile_.get(),
                                base::BindOnce(&PluginVmFilesTest::Callback,
                                               base::Unretained(this), false));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 }  // namespace plugin_vm
diff --git a/chrome/browser/chromeos/plugin_vm/plugin_vm_image_manager_unittest.cc b/chrome/browser/chromeos/plugin_vm/plugin_vm_image_manager_unittest.cc
index 97f2c271..5abe6fa 100644
--- a/chrome/browser/chromeos/plugin_vm/plugin_vm_image_manager_unittest.cc
+++ b/chrome/browser/chromeos/plugin_vm/plugin_vm_image_manager_unittest.cc
@@ -125,7 +125,7 @@
 
   void ProcessImageUntilImporting() {
     manager_->StartDownload();
-    test_browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   void ProcessImageUntilConfigured() {
@@ -135,7 +135,7 @@
     manager_->SetDownloadedPluginVmImageArchiveForTesting(
         fake_downloaded_plugin_vm_image_archive_);
     manager_->StartImport();
-    test_browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   base::FilePath CreateZipFile() {
@@ -145,7 +145,7 @@
     return zip_file_path;
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<PluginVmTestHelper> plugin_vm_test_helper_;
   PluginVmImageManager* manager_;
@@ -192,12 +192,12 @@
   EXPECT_EQ(GURL(kUrl), params->request_params.url);
 
   // Finishing image processing.
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   // Faking downloaded file for testing.
   manager_->SetDownloadedPluginVmImageArchiveForTesting(
       fake_downloaded_plugin_vm_image_archive_);
   manager_->StartImport();
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 TEST_F(PluginVmImageManagerTest, OnlyOneImageIsProcessedTest) {
@@ -211,7 +211,7 @@
 
   EXPECT_TRUE(manager_->IsProcessingImage());
 
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   // Faking downloaded file for testing.
   manager_->SetDownloadedPluginVmImageArchiveForTesting(
       fake_downloaded_plugin_vm_image_archive_);
@@ -222,7 +222,7 @@
 
   EXPECT_TRUE(manager_->IsProcessingImage());
 
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_FALSE(manager_->IsProcessingImage());
 
@@ -260,7 +260,7 @@
   manager_->StartDownload();
   std::string guid = manager_->GetCurrentDownloadGuidForTesting();
   download_service_->SetFailedDownload(guid, false);
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_FALSE(manager_->IsProcessingImage());
 
@@ -276,7 +276,7 @@
 
   manager_->StartDownload();
   manager_->CancelDownload();
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   // Finishing image processing as it should really happen.
   manager_->OnDownloadCancelled();
 
@@ -292,7 +292,7 @@
   ProcessImageUntilImporting();
   // Should fail as fake downloaded file isn't set.
   manager_->StartImport();
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   histogram_tester_->ExpectUniqueSample(kPluginVmImageDownloadedSizeHistogram,
                                         kDownloadedPluginVmImageSizeInMb, 1);
@@ -313,7 +313,7 @@
       fake_downloaded_plugin_vm_image_archive_);
   manager_->StartImport();
   manager_->CancelImport();
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 TEST_F(PluginVmImageManagerTest, EmptyPluginVmImageUrlTest) {
diff --git a/chrome/browser/chromeos/plugin_vm/plugin_vm_manager_unittest.cc b/chrome/browser/chromeos/plugin_vm/plugin_vm_manager_unittest.cc
index 0dc556b..15f2430 100644
--- a/chrome/browser/chromeos/plugin_vm/plugin_vm_manager_unittest.cc
+++ b/chrome/browser/chromeos/plugin_vm/plugin_vm_manager_unittest.cc
@@ -70,7 +70,7 @@
     return chrome_launcher_controller_->GetShelfSpinnerController();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> testing_profile_;
   std::unique_ptr<PluginVmTestHelper> test_helper_;
   std::unique_ptr<NotificationDisplayServiceTester> display_service_;
@@ -86,7 +86,7 @@
 TEST_F(PluginVmManagerTest, LaunchPluginVmRequiresPluginVmAllowed) {
   EXPECT_FALSE(IsPluginVmAllowedForProfile(testing_profile_.get()));
   plugin_vm_manager_->LaunchPluginVm();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(VmPluginDispatcherClient().list_vms_called());
   EXPECT_FALSE(VmPluginDispatcherClient().start_vm_called());
   EXPECT_FALSE(VmPluginDispatcherClient().show_vm_called());
@@ -109,7 +109,7 @@
   VmPluginDispatcherClient().set_list_vms_response(list_vms_response);
 
   plugin_vm_manager_->LaunchPluginVm();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(VmPluginDispatcherClient().list_vms_called());
   EXPECT_TRUE(VmPluginDispatcherClient().start_vm_called());
   EXPECT_TRUE(VmPluginDispatcherClient().show_vm_called());
@@ -132,7 +132,7 @@
   VmPluginDispatcherClient().set_list_vms_response(list_vms_response);
 
   plugin_vm_manager_->LaunchPluginVm();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(VmPluginDispatcherClient().list_vms_called());
   EXPECT_FALSE(VmPluginDispatcherClient().start_vm_called());
   EXPECT_TRUE(VmPluginDispatcherClient().show_vm_called());
@@ -142,7 +142,7 @@
   EXPECT_EQ(plugin_vm_manager_->seneschal_server_handle(), 0ul);
 
   plugin_vm_manager_->StopPluginVm();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(VmPluginDispatcherClient().stop_vm_called());
 
   histogram_tester_->ExpectUniqueSample(kPluginVmLaunchResultHistogram,
@@ -166,7 +166,7 @@
   state_changed_signal.set_vm_state(
       vm_tools::plugin_dispatcher::VmState::VM_STATE_RUNNING);
   VmPluginDispatcherClient().NotifyVmStateChanged(state_changed_signal);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(ConciergeClient().get_vm_info_called());
   EXPECT_TRUE(base::DirectoryExists(
       file_manager::util::GetMyFilesFolderForProfile(testing_profile_.get())));
@@ -176,7 +176,7 @@
   state_changed_signal.set_vm_state(
       vm_tools::plugin_dispatcher::VmState::VM_STATE_STOPPED);
   VmPluginDispatcherClient().NotifyVmStateChanged(state_changed_signal);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(plugin_vm_manager_->seneschal_server_handle(), 0ul);
   EXPECT_FALSE(
       chrome_launcher_controller_->IsOpen(ash::ShelfID(kPluginVmAppId)));
@@ -185,13 +185,13 @@
   state_changed_signal.set_vm_state(
       vm_tools::plugin_dispatcher::VmState::VM_STATE_RUNNING);
   VmPluginDispatcherClient().NotifyVmStateChanged(state_changed_signal);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(plugin_vm_manager_->seneschal_server_handle(), 1ul);
 
   state_changed_signal.set_vm_state(
       vm_tools::plugin_dispatcher::VmState::VM_STATE_SUSPENDED);
   VmPluginDispatcherClient().NotifyVmStateChanged(state_changed_signal);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(plugin_vm_manager_->seneschal_server_handle(), 0ul);
 }
 
@@ -208,7 +208,7 @@
   VmPluginDispatcherClient().set_list_vms_response(list_vms_response);
 
   plugin_vm_manager_->LaunchPluginVm();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Spinner exists for first launch.
   EXPECT_TRUE(SpinnerController()->HasApp(kPluginVmAppId));
@@ -218,7 +218,7 @@
   test_helper_->CloseShelfItem();
 
   plugin_vm_manager_->LaunchPluginVm();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   // A second launch shouldn't show a spinner.
   EXPECT_FALSE(SpinnerController()->HasApp(kPluginVmAppId));
 }
@@ -242,7 +242,7 @@
       vm_tools::plugin_dispatcher::VmState::VM_STATE_SUSPENDING);
   VmPluginDispatcherClient().set_list_vms_response(list_vms_response);
   plugin_vm_manager_->LaunchPluginVm();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(VmPluginDispatcherClient().list_vms_called());
   EXPECT_FALSE(VmPluginDispatcherClient().start_vm_called());
@@ -253,7 +253,7 @@
   state_changed_signal.set_vm_state(
       vm_tools::plugin_dispatcher::VmState::VM_STATE_SUSPENDED);
   VmPluginDispatcherClient().NotifyVmStateChanged(state_changed_signal);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(VmPluginDispatcherClient().list_vms_called());
   EXPECT_TRUE(VmPluginDispatcherClient().start_vm_called());
@@ -276,7 +276,7 @@
   VmPluginDispatcherClient().set_start_vm_response(start_vm_response);
 
   plugin_vm_manager_->LaunchPluginVm();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(VmPluginDispatcherClient().show_vm_called());
 
   EXPECT_TRUE(display_service_->GetNotification(kInvalidLicenseNotificationId));
diff --git a/chrome/browser/chromeos/plugin_vm/plugin_vm_util_unittest.cc b/chrome/browser/chromeos/plugin_vm/plugin_vm_util_unittest.cc
index 466675a..98d5dd8 100644
--- a/chrome/browser/chromeos/plugin_vm/plugin_vm_util_unittest.cc
+++ b/chrome/browser/chromeos/plugin_vm/plugin_vm_util_unittest.cc
@@ -22,7 +22,7 @@
   PluginVmUtilTest() = default;
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> testing_profile_;
   std::unique_ptr<PluginVmTestHelper> test_helper_;
 
diff --git a/chrome/browser/chromeos/policy/affiliated_cloud_policy_invalidator_unittest.cc b/chrome/browser/chromeos/policy/affiliated_cloud_policy_invalidator_unittest.cc
index e1688ae..12611327 100644
--- a/chrome/browser/chromeos/policy/affiliated_cloud_policy_invalidator_unittest.cc
+++ b/chrome/browser/chromeos/policy/affiliated_cloud_policy_invalidator_unittest.cc
@@ -94,7 +94,7 @@
 // correctly and the highest handled invalidation version is preserved when
 // switching invalidation services.
 TEST_P(AffiliatedCloudPolicyInvalidatorTest, CreateUseDestroy) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   // Set up a CloudPolicyCore backed by a simple CloudPolicyStore that does no
   // signature verification and stores policy in memory.
diff --git a/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc b/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc
index dada62f..4f32dbe 100644
--- a/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc
+++ b/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc
@@ -186,7 +186,7 @@
   invalidation::FakeInvalidationService* profile_invalidation_service_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::test::ScopedFeatureList feature_list_;
   chromeos::FakeChromeUserManager* fake_user_manager_;
   user_manager::ScopedUserManager user_manager_enabler_;
diff --git a/chrome/browser/chromeos/policy/app_install_event_log_collector_unittest.cc b/chrome/browser/chromeos/policy/app_install_event_log_collector_unittest.cc
index 9ed3295..9abc6ce 100644
--- a/chrome/browser/chromeos/policy/app_install_event_log_collector_unittest.cc
+++ b/chrome/browser/chromeos/policy/app_install_event_log_collector_unittest.cc
@@ -176,7 +176,7 @@
   chromeos::ShillServiceClient::TestInterface* service_test_ = nullptr;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   FakeAppInstallEventLogCollectorDelegate delegate_;
   TestingPrefServiceSimple pref_service_;
diff --git a/chrome/browser/chromeos/policy/app_install_event_log_manager_unittest.cc b/chrome/browser/chromeos/policy/app_install_event_log_manager_unittest.cc
index 0c5bd0a..1bd3ec4 100644
--- a/chrome/browser/chromeos/policy/app_install_event_log_manager_unittest.cc
+++ b/chrome/browser/chromeos/policy/app_install_event_log_manager_unittest.cc
@@ -237,7 +237,7 @@
   }
 
   TestLogTaskRunnerWrapper log_task_runner_wrapper_;
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   extensions::QuotaService::ScopedDisablePurgeForTesting
       disable_purge_for_testing_;
   TestingProfile profile_;
diff --git a/chrome/browser/chromeos/policy/app_install_event_log_manager_wrapper_unittest.cc b/chrome/browser/chromeos/policy/app_install_event_log_manager_wrapper_unittest.cc
index 3cdaf16..5d05c03 100644
--- a/chrome/browser/chromeos/policy/app_install_event_log_manager_wrapper_unittest.cc
+++ b/chrome/browser/chromeos/policy/app_install_event_log_manager_wrapper_unittest.cc
@@ -122,7 +122,7 @@
                     ->IsDefaultValue());
   }
 
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 
   const base::FilePath log_file_path_;
diff --git a/chrome/browser/chromeos/policy/app_install_event_logger_unittest.cc b/chrome/browser/chromeos/policy/app_install_event_logger_unittest.cc
index ac9f269..142b4ae 100644
--- a/chrome/browser/chromeos/policy/app_install_event_logger_unittest.cc
+++ b/chrome/browser/chromeos/policy/app_install_event_logger_unittest.cc
@@ -96,7 +96,7 @@
 class AppInstallEventLoggerTest : public testing::Test {
  protected:
   AppInstallEventLoggerTest()
-      : browser_thread_bundle_(
+      : task_environment_(
             base::test::TaskEnvironment::MainThreadType::UI,
             base::test::TaskEnvironment::ThreadPoolExecutionMode::QUEUED) {}
 
@@ -124,7 +124,7 @@
 
   void TearDown() override {
     logger_.reset();
-    browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     chromeos::PowerManagerClient::Shutdown();
     chromeos::NetworkHandler::Shutdown();
     chromeos::DBusThreadManager::Shutdown();
@@ -162,7 +162,7 @@
     event_.set_event_type(em::AppInstallReportLogEvent::SUCCESS);
   }
 
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   TestingPrefServiceSimple pref_service_;
 
@@ -254,7 +254,7 @@
   EXPECT_CALL(*disk_mount_manager_, disks());
   EXPECT_CALL(delegate_,
               Add(std::set<std::string>{kPackageName}, MatchProto(event_)));
-  browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 // Adds an event without a timestamp, requesting that disk space information be
@@ -286,7 +286,7 @@
   EXPECT_CALL(delegate_, Add(std::set<std::string>{kPackageName},
                              MatchEventExceptTimestamp(event_)))
       .WillOnce(SaveTimestamp<1>(&timestamp));
-  browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_LE(before, timestamp);
   EXPECT_GE(after, timestamp);
@@ -345,7 +345,7 @@
   EXPECT_CALL(delegate_, Add(std::set<std::string>{kPackageName, kPackageName3},
                              MatchEventExceptTimestamp(event_)));
   EXPECT_CALL(*disk_mount_manager_, disks());
-  browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   Mock::VerifyAndClearExpectations(&delegate_);
 
   // To avoid extra logging.
diff --git a/chrome/browser/chromeos/policy/auto_enrollment_client_impl_unittest.cc b/chrome/browser/chromeos/policy/auto_enrollment_client_impl_unittest.cc
index d1797a9..9274c7f 100644
--- a/chrome/browser/chromeos/policy/auto_enrollment_client_impl_unittest.cc
+++ b/chrome/browser/chromeos/policy/auto_enrollment_client_impl_unittest.cc
@@ -334,7 +334,7 @@
     return static_cast<AutoEnrollmentClientImpl*>(client_.release());
   }
 
-  content::TestBrowserThreadBundle browser_threads_;
+  content::BrowserTaskEnvironment browser_threads_;
   ScopedTestingLocalState scoped_testing_local_state_;
   TestingPrefServiceSimple* local_state_;
   std::unique_ptr<MockDeviceManagementService> service_;
diff --git a/chrome/browser/chromeos/policy/dm_token_storage_unittest.cc b/chrome/browser/chromeos/policy/dm_token_storage_unittest.cc
index 21dcc23..d3a7b015 100644
--- a/chrome/browser/chromeos/policy/dm_token_storage_unittest.cc
+++ b/chrome/browser/chromeos/policy/dm_token_storage_unittest.cc
@@ -90,7 +90,7 @@
       closure.Run();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedTestingLocalState scoped_testing_local_state_;
   std::unique_ptr<DMTokenStorage> dm_token_storage_;
 };
diff --git a/chrome/browser/chromeos/policy/extension_cache_unittest.cc b/chrome/browser/chromeos/policy/extension_cache_unittest.cc
index 9955ce2..66be290 100644
--- a/chrome/browser/chromeos/policy/extension_cache_unittest.cc
+++ b/chrome/browser/chromeos/policy/extension_cache_unittest.cc
@@ -58,7 +58,7 @@
 
 class ExtensionCacheTest : public testing::Test {
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   chromeos::ScopedTestingCrosSettings scoped_testing_cros_settings_;
 };
 
diff --git a/chrome/browser/chromeos/policy/heartbeat_scheduler_unittest.cc b/chrome/browser/chromeos/policy/heartbeat_scheduler_unittest.cc
index 0b58e07..83e2375 100644
--- a/chrome/browser/chromeos/policy/heartbeat_scheduler_unittest.cc
+++ b/chrome/browser/chromeos/policy/heartbeat_scheduler_unittest.cc
@@ -161,7 +161,7 @@
         .Times(AnyNumber());
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   MockGCMDriver gcm_driver_;
   chromeos::ScopedTestingCrosSettings scoped_testing_cros_settings_;
   testing::NiceMock<policy::MockCloudPolicyClient> cloud_policy_client_;
diff --git a/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc b/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc
index a189f68d..13ee16f9 100644
--- a/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc
+++ b/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc
@@ -439,7 +439,7 @@
     return network_configuration_updater_.get();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<chromeos::onc::OncParsedCertificates> fake_certificates_;
   StrictMock<chromeos::MockManagedNetworkConfigurationHandler>
diff --git a/chrome/browser/chromeos/policy/remote_commands/device_command_start_crd_session_unittest.cc b/chrome/browser/chromeos/policy/remote_commands/device_command_start_crd_session_unittest.cc
index a4c71dc..1612b7fe 100644
--- a/chrome/browser/chromeos/policy/remote_commands/device_command_start_crd_session_unittest.cc
+++ b/chrome/browser/chromeos/policy/remote_commands/device_command_start_crd_session_unittest.cc
@@ -217,7 +217,7 @@
 
   base::TimeTicks test_start_time_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::RunLoop run_loop_;
 
  private:
diff --git a/chrome/browser/chromeos/policy/remote_commands/device_command_wipe_users_job_unittest.cc b/chrome/browser/chromeos/policy/remote_commands/device_command_wipe_users_job_unittest.cc
index c585269d..1681a9a 100644
--- a/chrome/browser/chromeos/policy/remote_commands/device_command_wipe_users_job_unittest.cc
+++ b/chrome/browser/chromeos/policy/remote_commands/device_command_wipe_users_job_unittest.cc
@@ -85,7 +85,7 @@
   DeviceCommandWipeUsersJobTest();
   ~DeviceCommandWipeUsersJobTest() override;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::RunLoop run_loop_;
 
   ScopedTestingLocalState local_state_;
diff --git a/chrome/browser/chromeos/policy/remote_commands/user_command_arc_job_unittest.cc b/chrome/browser/chromeos/policy/remote_commands/user_command_arc_job_unittest.cc
index 867720e..87246d5 100644
--- a/chrome/browser/chromeos/policy/remote_commands/user_command_arc_job_unittest.cc
+++ b/chrome/browser/chromeos/policy/remote_commands/user_command_arc_job_unittest.cc
@@ -54,7 +54,7 @@
   UserCommandArcJobTest();
   ~UserCommandArcJobTest() override;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // ArcServiceManager needs to be created before ArcPolicyBridge (since the
   // Bridge depends on the Manager), and it needs to be destroyed after Profile
diff --git a/chrome/browser/chromeos/policy/status_collector/child_status_collector_browsertest.cc b/chrome/browser/chromeos/policy/status_collector/child_status_collector_browsertest.cc
index 2e81c3a..d1a323f 100644
--- a/chrome/browser/chromeos/policy/status_collector/child_status_collector_browsertest.cc
+++ b/chrome/browser/chromeos/policy/status_collector/child_status_collector_browsertest.cc
@@ -378,7 +378,7 @@
   // Since this is a unit test running in browser_tests we must do additional
   // unit test setup and make a TestingBrowserProcess. Must be first member.
   TestingBrowserProcessInitializer initializer_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   ChromeContentClient content_client_;
   ChromeContentBrowserClient browser_content_client_;
diff --git a/chrome/browser/chromeos/policy/status_collector/device_status_collector_browsertest.cc b/chrome/browser/chromeos/policy/status_collector/device_status_collector_browsertest.cc
index 92857cff..870ff72a 100644
--- a/chrome/browser/chromeos/policy/status_collector/device_status_collector_browsertest.cc
+++ b/chrome/browser/chromeos/policy/status_collector/device_status_collector_browsertest.cc
@@ -664,7 +664,7 @@
   // Since this is a unit test running in browser_tests we must do additional
   // unit test setup and make a TestingBrowserProcess. Must be first member.
   TestingBrowserProcessInitializer initializer_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   ChromeContentClient content_client_;
   ChromeContentBrowserClient browser_content_client_;
diff --git a/chrome/browser/chromeos/policy/status_uploader_unittest.cc b/chrome/browser/chromeos/policy/status_uploader_unittest.cc
index 8568f93..02bed95b 100644
--- a/chrome/browser/chromeos/policy/status_uploader_unittest.cc
+++ b/chrome/browser/chromeos/policy/status_uploader_unittest.cc
@@ -182,7 +182,7 @@
                                             kDefaultStatusUploadDelay);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
   chromeos::ScopedTestingCrosSettings scoped_testing_cros_settings_;
   std::unique_ptr<MockDeviceStatusCollector> collector_;
diff --git a/chrome/browser/chromeos/policy/system_log_uploader_unittest.cc b/chrome/browser/chromeos/policy/system_log_uploader_unittest.cc
index 32cc01b6..b19a18d 100644
--- a/chrome/browser/chromeos/policy/system_log_uploader_unittest.cc
+++ b/chrome/browser/chromeos/policy/system_log_uploader_unittest.cc
@@ -260,7 +260,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   chromeos::ScopedCrosSettingsTestHelper settings_helper_;
   scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
   bool is_zipped_upload_;
diff --git a/chrome/browser/chromeos/policy/tpm_auto_update_mode_policy_handler_unittest.cc b/chrome/browser/chromeos/policy/tpm_auto_update_mode_policy_handler_unittest.cc
index c649b9e1..f16939c 100644
--- a/chrome/browser/chromeos/policy/tpm_auto_update_mode_policy_handler_unittest.cc
+++ b/chrome/browser/chromeos/policy/tpm_auto_update_mode_policy_handler_unittest.cc
@@ -73,7 +73,7 @@
   chromeos::TpmAutoUpdateUserNotification last_shown_notification_ =
       chromeos::TpmAutoUpdateUserNotification::kNone;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedTestingLocalState local_state_;
   chromeos::FakeChromeUserManager* user_manager_;
   user_manager::ScopedUserManager user_manager_enabler_;
diff --git a/chrome/browser/chromeos/policy/upload_job_unittest.cc b/chrome/browser/chromeos/policy/upload_job_unittest.cc
index f0636c4e..5463e5c2 100644
--- a/chrome/browser/chromeos/policy/upload_job_unittest.cc
+++ b/chrome/browser/chromeos/policy/upload_job_unittest.cc
@@ -186,8 +186,7 @@
 class UploadJobTestBase : public testing::Test, public UploadJob::Delegate {
  public:
   UploadJobTestBase()
-      : test_browser_thread_bundle_(
-            content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         access_token_manager_(&token_manager_delegate_) {}
 
   // policy::UploadJob::Delegate:
@@ -247,7 +246,7 @@
     return upload_job;
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::RunLoop run_loop_;
   net::EmbeddedTestServer test_server_;
   scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
index 3b78efd..f2ca77f 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
@@ -348,7 +348,7 @@
 
   // Required by the refresh scheduler that's created by the manager and
   // for the cleanup of URLRequestContextGetter in the |signin_profile_|.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Convenience policy objects.
   em::PolicyData policy_data_;
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder_unittest.cc b/chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder_unittest.cc
index cb34eca..531915b 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder_unittest.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder_unittest.cc
@@ -194,7 +194,7 @@
   // OnCloudPolicyServiceInitializationCompleted().
   void SimulateCloudPolicyServiceInitialized() { store_->NotifyStoreLoaded(); }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::HistogramTester histogram_tester_;
 
diff --git a/chrome/browser/chromeos/power/auto_screen_brightness/adapter_unittest.cc b/chrome/browser/chromeos/power/auto_screen_brightness/adapter_unittest.cc
index 8e614e1..0b3d4c0 100644
--- a/chrome/browser/chromeos/power/auto_screen_brightness/adapter_unittest.cc
+++ b/chrome/browser/chromeos/power/auto_screen_brightness/adapter_unittest.cc
@@ -130,7 +130,7 @@
 class AdapterTest : public testing::Test {
  public:
   AdapterTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
 
   ~AdapterTest() override = default;
 
@@ -139,7 +139,7 @@
     power_manager::SetBacklightBrightnessRequest request;
     request.set_percent(1);
     chromeos::PowerManagerClient::Get()->SetScreenBrightness(request);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
 
     chromeos::PowerManagerClient::Get()->AddObserver(&test_observer_);
 
@@ -163,7 +163,7 @@
     // Simulate the real clock that will not produce TimeTicks equal to 0.
     // This is because the Adapter will treat 0 TimeTicks are uninitialized
     // values.
-    thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+    task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
     sync_preferences::PrefServiceMockFactory factory;
     factory.set_user_prefs(base::WrapRefCounted(new TestingPrefStore()));
     scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
@@ -202,9 +202,9 @@
     adapter_ = Adapter::CreateForTesting(
         profile_.get(), &fake_als_reader_, &fake_brightness_monitor_,
         &fake_modeller_, &fake_model_config_loader_,
-        nullptr /* metrics_reporter */, thread_bundle_.GetMockTickClock());
+        nullptr /* metrics_reporter */, task_environment_.GetMockTickClock());
     adapter_->Init();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   // Sets up all required input for Adapter and then creates Adapter.
@@ -226,12 +226,12 @@
 
   void ReportSuspendDone() {
     chromeos::FakePowerManagerClient::Get()->SendSuspendDone();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   void ReportLidEvent(chromeos::PowerManagerClient::LidState state) {
     chromeos::FakePowerManagerClient::Get()->SetLidState(
-        state, thread_bundle_.NowTicks());
+        state, task_environment_.NowTicks());
   }
 
   // Returns a valid ModelConfig.
@@ -253,7 +253,7 @@
 
   void ReportAls(int als_value) {
     fake_als_reader_.ReportAmbientLightUpdate(als_value);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   void ReportUserBrightnessChangeRequest(double old_brightness_percent,
@@ -263,7 +263,7 @@
     fake_brightness_monitor_.ReportUserBrightnessChangeRequested();
     fake_brightness_monitor_.ReportUserBrightnessChanged(
         old_brightness_percent, new_brightness_percent);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   // Forwards time first and then reports Als.
@@ -271,13 +271,13 @@
     for (const int als_value : als_values) {
       // Forward 1 second to simulate the real AlsReader that samples data at
       // 1hz.
-      thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+      task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
       ReportAls(als_value);
     }
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   TestObserver test_observer_;
 
@@ -373,7 +373,7 @@
 
   fake_als_reader_.set_als_init_status(AlsReader::AlsInitStatus::kSuccess);
   fake_als_reader_.ReportReaderInitialized();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_EQ(adapter_->GetStatusForTesting(), Adapter::Status::kSuccess);
   EXPECT_TRUE(adapter_->GetGlobalCurveForTesting());
@@ -406,7 +406,7 @@
 
   fake_brightness_monitor_.set_status(BrightnessMonitor::Status::kSuccess);
   fake_brightness_monitor_.ReportBrightnessMonitorInitialized();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(adapter_->GetStatusForTesting(), Adapter::Status::kSuccess);
   EXPECT_TRUE(adapter_->GetGlobalCurveForTesting());
   EXPECT_EQ(*adapter_->GetGlobalCurveForTesting(), *global_curve_);
@@ -419,7 +419,7 @@
   fake_brightness_monitor_.set_status(BrightnessMonitor::Status::kSuccess);
   fake_model_config_loader_.set_model_config(GetTestModelConfig());
   SetUpAdapter(default_params_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(adapter_->GetStatusForTesting(), Adapter::Status::kInitializing);
 
   fake_modeller_.InitModellerWithModel(Model());
@@ -435,7 +435,7 @@
   fake_brightness_monitor_.set_status(BrightnessMonitor::Status::kSuccess);
   fake_model_config_loader_.set_model_config(GetTestModelConfig());
   SetUpAdapter(default_params_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(adapter_->GetStatusForTesting(), Adapter::Status::kInitializing);
 
   fake_modeller_.InitModellerWithModel(
@@ -459,7 +459,7 @@
   DCHECK(!IsValidModelConfig(ModelConfig()));
   fake_model_config_loader_.set_model_config(ModelConfig());
   fake_model_config_loader_.ReportModelConfigLoaded();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_EQ(adapter_->GetStatusForTesting(), Adapter::Status::kDisabled);
 }
@@ -473,7 +473,7 @@
 
   fake_model_config_loader_.set_model_config(GetTestModelConfig());
   fake_model_config_loader_.ReportModelConfigLoaded();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_EQ(adapter_->GetStatusForTesting(), Adapter::Status::kSuccess);
   EXPECT_TRUE(adapter_->GetGlobalCurveForTesting());
@@ -573,13 +573,13 @@
   // |params.auto_brightness_als_horizon_seconds| has elapsed since we've made
   // the change, but there's no new ALS value, hence no brightness change is
   // triggered.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(10));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(10));
   EXPECT_EQ(test_observer_.num_changes(), 2);
   CheckAvgLog({20, 30, 40, 50, 60},
               adapter_->GetCurrentAvgLogAlsForTesting().value());
 
   EXPECT_EQ(adapter_->GetAverageAmbientWithStdDevForTesting(
-                thread_bundle_.NowTicks()),
+                task_environment_.NowTicks()),
             base::nullopt);
 
   // A new ALS value triggers a brightness change.
@@ -615,7 +615,7 @@
   CheckAvgLog({1, 2, 3, 4}, adapter_->GetCurrentAvgLogAlsForTesting().value());
 
   // Another user manual adjustment comes in.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
   ReportUserBrightnessChangeRequest(30.0, 40.0);
 
   EXPECT_EQ(adapter_->GetStatusForTesting(), Adapter::Status::kSuccess);
@@ -662,7 +662,7 @@
               adapter_->GetCurrentAvgLogAlsForTesting().value());
 
   // Another user manual adjustment comes in.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
   ReportUserBrightnessChangeRequest(30.0, 40.0);
 
   EXPECT_EQ(adapter_->GetStatusForTesting(), Adapter::Status::kSuccess);
@@ -697,7 +697,7 @@
   EXPECT_FALSE(adapter_->GetCurrentAvgLogAlsForTesting());
 
   // Another user manual adjustment comes in.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
   ReportUserBrightnessChangeRequest(30.0, 40.0);
   histogram_tester_.ExpectBucketCount(
       "AutoScreenBrightness.MissingAlsWhenBrightnessChanged", true, 1);
@@ -738,7 +738,7 @@
               adapter_->GetCurrentAvgLogAlsForTesting().value());
 
   // Another user manual adjustment comes in.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
   ReportUserBrightnessChangeRequest(30.0, 40.0);
   histogram_tester_.ExpectBucketCount(
       "AutoScreenBrightness.MissingAlsWhenBrightnessChanged", true, 1);
@@ -910,7 +910,7 @@
 
   // Personal curve is received, it does not lead to any immediate brightness
   // change.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
   fake_modeller_.ReportModelTrained(*personal_curve_);
   EXPECT_EQ(test_observer_.num_changes(), 0);
   EXPECT_EQ(adapter_->GetCurrentAvgLogAlsForTesting(), base::nullopt);
@@ -949,7 +949,7 @@
 
   // Personal curve is received, it does not lead to any immediate brightness
   // change.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
   fake_modeller_.ReportModelTrained(*personal_curve_);
   EXPECT_EQ(test_observer_.num_changes(), 0);
   EXPECT_EQ(adapter_->GetCurrentAvgLogAlsForTesting(), base::nullopt);
@@ -960,7 +960,7 @@
   EXPECT_EQ(adapter_->GetCurrentAvgLogAlsForTesting(), base::nullopt);
 
   // Another training is done.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
   fake_modeller_.ReportModelTrained(*personal_curve_);
   EXPECT_EQ(test_observer_.num_changes(), 0);
   EXPECT_EQ(adapter_->GetCurrentAvgLogAlsForTesting(), base::nullopt);
@@ -976,7 +976,7 @@
                                                      {30, 60, 100});
   DCHECK(personal_curve_2);
 
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
   fake_modeller_.ReportModelTrained(*personal_curve_2);
   EXPECT_EQ(test_observer_.num_changes(), 0);
   EXPECT_EQ(adapter_->GetCurrentAvgLogAlsForTesting(), base::nullopt);
@@ -1018,7 +1018,7 @@
                        adapter_->GetCurrentAvgLogAlsForTesting().value()));
 
   // A new personal curve is received but adapter still uses the global curve.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(20));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(20));
   fake_modeller_.ReportModelTrained(*personal_curve_);
   ReportAls(20);
   EXPECT_EQ(test_observer_.num_changes(), 2);
@@ -1103,7 +1103,7 @@
 
   // Personal curve is received, it does not lead to any immediate brightness
   // change.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
   fake_modeller_.ReportModelTrained(*personal_curve_);
   EXPECT_EQ(test_observer_.num_changes(), 0);
   EXPECT_EQ(adapter_->GetCurrentAvgLogAlsForTesting(), base::nullopt);
diff --git a/chrome/browser/chromeos/power/auto_screen_brightness/model_config_loader_impl_unittest.cc b/chrome/browser/chromeos/power/auto_screen_brightness/model_config_loader_impl_unittest.cc
index 11a9e3108..79b28459 100644
--- a/chrome/browser/chromeos/power/auto_screen_brightness/model_config_loader_impl_unittest.cc
+++ b/chrome/browser/chromeos/power/auto_screen_brightness/model_config_loader_impl_unittest.cc
@@ -55,7 +55,7 @@
 class ModelConfigLoaderImplTest : public testing::Test {
  public:
   ModelConfigLoaderImplTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {
     CHECK(temp_dir_.CreateUniqueTempDir());
     temp_params_path_ = temp_dir_.GetPath().Append("model_params.json");
   }
@@ -78,7 +78,7 @@
 
     test_observer_ = std::make_unique<TestObserver>();
     model_config_loader_->AddObserver(test_observer_.get());
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
  protected:
@@ -95,7 +95,7 @@
         << " to " << temp_params_path_;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::ScopedTempDir temp_dir_;
   base::FilePath temp_params_path_;
diff --git a/chrome/browser/chromeos/power/auto_screen_brightness/modeller_impl_unittest.cc b/chrome/browser/chromeos/power/auto_screen_brightness/modeller_impl_unittest.cc
index 1526f6a..50ead77 100644
--- a/chrome/browser/chromeos/power/auto_screen_brightness/modeller_impl_unittest.cc
+++ b/chrome/browser/chromeos/power/auto_screen_brightness/modeller_impl_unittest.cc
@@ -162,7 +162,7 @@
 class ModellerImplTest : public testing::Test {
  public:
   ModellerImplTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {
     CHECK(temp_dir_.CreateUniqueTempDir());
     TestingProfile::Builder profile_builder;
     profile_builder.SetProfileName("[email protected]");
@@ -186,7 +186,7 @@
         std::make_unique<FakeTrainer>(is_trainer_configured,
                                       is_personal_curve_valid),
         base::SequencedTaskRunnerHandle::Get(),
-        thread_bundle_.GetMockTickClock());
+        task_environment_.GetMockTickClock());
 
     test_observer_ = std::make_unique<TestObserver>();
     modeller_->AddObserver(test_observer_.get());
@@ -210,7 +210,7 @@
     }
 
     SetUpModeller(is_trainer_configured, is_personal_curve_valid);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
  protected:
@@ -241,7 +241,7 @@
     return model_config;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::HistogramTester histogram_tester_;
 
   ui::UserActivityDetector user_activity_detector_;
@@ -300,7 +300,7 @@
 
   fake_als_reader_.set_als_init_status(AlsReader::AlsInitStatus::kDisabled);
   fake_als_reader_.ReportReaderInitialized();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Model should be empty if modeller is disabled.
   test_observer_->CheckStatus(true /* is_model_initialized */, Model());
@@ -315,7 +315,7 @@
 
   fake_als_reader_.set_als_init_status(AlsReader::AlsInitStatus::kSuccess);
   fake_als_reader_.ReportReaderInitialized();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   const Model expected_model(test_initial_global_curve_, base::nullopt, 0);
   test_observer_->CheckStatus(true /* is_model_initialized */, expected_model);
@@ -344,7 +344,7 @@
 
   fake_brightness_monitor_.set_status(BrightnessMonitor::Status::kSuccess);
   fake_brightness_monitor_.ReportBrightnessMonitorInitialized();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   const Model expected_model(test_initial_global_curve_, base::nullopt, 0);
   test_observer_->CheckStatus(true /* is_model_initialized */, expected_model);
@@ -361,7 +361,7 @@
   DCHECK(!IsValidModelConfig(ModelConfig()));
   fake_model_config_loader_.set_model_config(ModelConfig());
   fake_model_config_loader_.ReportModelConfigLoaded();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   test_observer_->CheckStatus(true /* is_model_initialized */, Model());
 }
 
@@ -374,7 +374,7 @@
 
   fake_model_config_loader_.set_model_config(test_model_config_);
   fake_model_config_loader_.ReportModelConfigLoaded();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   const Model expected_model(test_initial_global_curve_, base::nullopt, 0);
   test_observer_->CheckStatus(true /* is_model_initialized */, expected_model);
@@ -395,11 +395,11 @@
                     1 /* iteration_count */);
   WriteModelToFile(model);
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   Init(AlsReader::AlsInitStatus::kSuccess, BrightnessMonitor::Status::kSuccess,
        test_model_config_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   test_observer_->CheckStatus(true /* is_model_initialized */, model);
   histogram_tester_.ExpectUniqueSample(
@@ -420,7 +420,7 @@
                     2 /* iteration_count */);
   WriteModelToFile(model);
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   Init(AlsReader::AlsInitStatus::kSuccess, BrightnessMonitor::Status::kSuccess,
        test_model_config_);
@@ -437,7 +437,7 @@
 TEST_F(ModellerImplTest, PersonalCurveError) {
   const Model model(test_initial_global_curve_, test_initial_global_curve_, 2);
   WriteModelToFile(model);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   Init(AlsReader::AlsInitStatus::kSuccess, BrightnessMonitor::Status::kSuccess,
        test_model_config_, true /* is_trainer_configured */,
@@ -469,22 +469,23 @@
   const int first_lux = 1000;
   double running_sum = 0.0;
   for (int i = 0; i < horizon_in_seconds; ++i) {
-    thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+    task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
     const int lux = i == 0 ? first_lux : i;
     fake_als_reader_.ReportAmbientLightUpdate(lux);
     running_sum += ConvertToLog(lux);
     EXPECT_DOUBLE_EQ(
-        modeller_->AverageAmbientForTesting(thread_bundle_.NowTicks()).value(),
+        modeller_->AverageAmbientForTesting(task_environment_.NowTicks())
+            .value(),
         running_sum / (i + 1));
   }
   EXPECT_EQ(test_observer_->iteration_count(), 0);
 
   // Add another one should push the oldest |first_lux| out of the horizon.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
   fake_als_reader_.ReportAmbientLightUpdate(100);
   running_sum = running_sum + ConvertToLog(100) - ConvertToLog(first_lux);
   EXPECT_DOUBLE_EQ(
-      modeller_->AverageAmbientForTesting(thread_bundle_.NowTicks()).value(),
+      modeller_->AverageAmbientForTesting(task_environment_.NowTicks()).value(),
       running_sum / horizon_in_seconds);
   EXPECT_EQ(test_observer_->iteration_count(), 0);
 }
@@ -506,8 +507,8 @@
   for (size_t i = 0; i < modeller_->GetMaxTrainingDataPointsForTesting() - 1;
        ++i) {
     EXPECT_EQ(i, modeller_->NumberTrainingDataPointsForTesting());
-    thread_bundle_.FastForwardBy(base::TimeDelta::FromMilliseconds(1));
-    const base::TimeTicks now = thread_bundle_.NowTicks();
+    task_environment_.FastForwardBy(base::TimeDelta::FromMilliseconds(1));
+    const base::TimeTicks now = task_environment_.NowTicks();
     const int lux = i * 20;
     fake_als_reader_.ReportAmbientLightUpdate(lux);
     const double brightness_old = 10.0 + i;
@@ -524,15 +525,15 @@
             modeller_->NumberTrainingDataPointsForTesting());
 
   // Add one more data point to trigger the training early.
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromMilliseconds(1));
-  const base::TimeTicks now = thread_bundle_.NowTicks();
+  task_environment_.FastForwardBy(base::TimeDelta::FromMilliseconds(1));
+  const base::TimeTicks now = task_environment_.NowTicks();
   const double brightness_old = 85;
   const double brightness_new = 95;
   modeller_->OnUserBrightnessChanged(brightness_old, brightness_new);
   expected_data.push_back({brightness_old, brightness_new,
                            modeller_->AverageAmbientForTesting(now).value(),
                            now});
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_EQ(0u, modeller_->NumberTrainingDataPointsForTesting());
   EXPECT_EQ(test_observer_->iteration_count(), 1);
@@ -556,13 +557,13 @@
   const Model expected_model(test_initial_global_curve_, base::nullopt, 0);
   test_observer_->CheckStatus(true /* is_model_initialized */, expected_model);
 
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
   fake_als_reader_.ReportAmbientLightUpdate(30);
   std::vector<TrainingDataPoint> expected_data;
   for (size_t i = 0; i < 10; ++i) {
     EXPECT_EQ(i, modeller_->NumberTrainingDataPointsForTesting());
-    thread_bundle_.FastForwardBy(base::TimeDelta::FromMilliseconds(1));
-    const base::TimeTicks now = thread_bundle_.NowTicks();
+    task_environment_.FastForwardBy(base::TimeDelta::FromMilliseconds(1));
+    const base::TimeTicks now = task_environment_.NowTicks();
     const int lux = i * 20;
     fake_als_reader_.ReportAmbientLightUpdate(lux);
     const double brightness_old = 10.0 + i;
@@ -576,13 +577,13 @@
 
   EXPECT_EQ(modeller_->NumberTrainingDataPointsForTesting(), 10u);
 
-  thread_bundle_.FastForwardBy(modeller_->GetTrainingDelayForTesting() / 2);
+  task_environment_.FastForwardBy(modeller_->GetTrainingDelayForTesting() / 2);
   // A user activity is received, timer should be reset.
   const ui::MouseEvent mouse_event(ui::ET_MOUSE_EXITED, gfx::Point(0, 0),
                                    gfx::Point(0, 0), base::TimeTicks(), 0, 0);
   modeller_->OnUserActivity(&mouse_event);
 
-  thread_bundle_.FastForwardBy(modeller_->GetTrainingDelayForTesting() / 3);
+  task_environment_.FastForwardBy(modeller_->GetTrainingDelayForTesting() / 3);
   EXPECT_EQ(modeller_->NumberTrainingDataPointsForTesting(), 10u);
   EXPECT_EQ(test_observer_->iteration_count(), 0);
 
@@ -590,12 +591,12 @@
   modeller_->OnUserActivity(&mouse_event);
 
   // After |training_delay_|/2, no training has started.
-  thread_bundle_.FastForwardBy(modeller_->GetTrainingDelayForTesting() / 2);
+  task_environment_.FastForwardBy(modeller_->GetTrainingDelayForTesting() / 2);
   EXPECT_EQ(modeller_->NumberTrainingDataPointsForTesting(), 10u);
   EXPECT_EQ(test_observer_->iteration_count(), 0);
 
   // After another |training_delay_|/2, training is scheduled.
-  thread_bundle_.FastForwardBy(modeller_->GetTrainingDelayForTesting() / 2);
+  task_environment_.FastForwardBy(modeller_->GetTrainingDelayForTesting() / 2);
 
   EXPECT_EQ(0u, modeller_->NumberTrainingDataPointsForTesting());
   EXPECT_EQ(test_observer_->iteration_count(), 1);
@@ -626,7 +627,7 @@
   modeller_->OnUserActivity(&mouse_event);
 
   modeller_->OnUserBrightnessChanged(10, 20);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(0u, modeller_->NumberTrainingDataPointsForTesting());
   EXPECT_EQ(test_observer_->iteration_count(), 1);
 }
diff --git a/chrome/browser/chromeos/power/ml/adaptive_screen_brightness_manager_unittest.cc b/chrome/browser/chromeos/power/ml/adaptive_screen_brightness_manager_unittest.cc
index 233aba7..23e06bd4 100644
--- a/chrome/browser/chromeos/power/ml/adaptive_screen_brightness_manager_unittest.cc
+++ b/chrome/browser/chromeos/power/ml/adaptive_screen_brightness_manager_unittest.cc
@@ -95,7 +95,8 @@
 
     viz::mojom::VideoDetectorObserverPtr observer;
     auto periodic_timer = std::make_unique<base::RepeatingTimer>();
-    periodic_timer->SetTaskRunner(thread_bundle()->GetMainThreadTaskRunner());
+    periodic_timer->SetTaskRunner(
+        task_environment()->GetMainThreadTaskRunner());
     screen_brightness_manager_ =
         std::make_unique<AdaptiveScreenBrightnessManager>(
             std::move(logger), &user_activity_detector_,
@@ -157,7 +158,7 @@
   }
 
   void FastForwardTimeBySecs(const int seconds) {
-    thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(seconds));
+    task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(seconds));
   }
 
   // Creates a test browser window and sets its visibility, activity and
diff --git a/chrome/browser/chromeos/power/ml/user_activity_manager_unittest.cc b/chrome/browser/chromeos/power/ml/user_activity_manager_unittest.cc
index 0548bf2..d32f58ce 100644
--- a/chrome/browser/chromeos/power/ml/user_activity_manager_unittest.cc
+++ b/chrome/browser/chromeos/power/ml/user_activity_manager_unittest.cc
@@ -172,7 +172,7 @@
             base::test::TaskEnvironment::MainThreadType::UI,
             base::test::TaskEnvironment::TimeSource::MOCK_TIME,
             base::test::TaskEnvironment::ThreadPoolExecutionMode::QUEUED),
-        model_(thread_bundle()->GetMainThreadTaskRunner()) {}
+        model_(task_environment()->GetMainThreadTaskRunner()) {}
 
   ~UserActivityManagerTest() override = default;
 
@@ -247,7 +247,7 @@
   void ReportSuspend(power_manager::SuspendImminent::Reason reason,
                      base::TimeDelta sleep_duration) {
     FakePowerManagerClient::Get()->SendSuspendImminent(reason);
-    thread_bundle()->FastForwardBy(sleep_duration);
+    task_environment()->FastForwardBy(sleep_duration);
     FakePowerManagerClient::Get()->SendSuspendDone(sleep_duration);
   }
 
@@ -348,7 +348,7 @@
   // Trigger an idle event.
   const IdleEventNotifier::ActivityData data;
   ReportIdleEvent(data);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(2));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(2));
   ReportUserActivity(nullptr);
 
   const std::vector<UserActivityEvent>& events = delegate_.events();
@@ -423,18 +423,18 @@
   // Trigger the 2nd idle event.
   ReportIdleEvent(data);
   // Second user event.
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(2));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(2));
   ReportUserActivity(nullptr);
 
   // Trigger the 3rd idle event.
   ReportIdleEvent(data);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(3));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(3));
   ReportSuspend(power_manager::SuspendImminent_Reason_IDLE,
                 base::TimeDelta::FromSeconds(10));
 
   // Trigger the 4th idle event.
   ReportIdleEvent(data);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(4));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(4));
   ReportSuspend(power_manager::SuspendImminent_Reason_IDLE,
                 base::TimeDelta::FromSeconds(10));
 
@@ -504,7 +504,7 @@
   const IdleEventNotifier::ActivityData data;
   ReportIdleEvent(data);
 
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(2));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(2));
   ReportLidEvent(chromeos::PowerManagerClient::LidState::CLOSED);
   const std::vector<UserActivityEvent>& events = delegate_.events();
   EXPECT_TRUE(events.empty());
@@ -567,9 +567,9 @@
   // Trigger an idle event.
   const IdleEventNotifier::ActivityData data;
   ReportIdleEvent(data);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(20));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(20));
   ReportScreenIdleState(true /* screen_dim */, false /* screen_off */);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(30));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(30));
   ReportScreenIdleState(true /* screen_dim */, true /* screen_off */);
   ReportSuspend(power_manager::SuspendImminent_Reason_IDLE,
                 base::TimeDelta::FromSeconds(10));
@@ -596,11 +596,11 @@
   // Trigger an idle event.
   const IdleEventNotifier::ActivityData data;
   ReportIdleEvent(data);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(20));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(20));
   ReportScreenIdleState(true /* screen_dim */, false /* screen_off */);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(30));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(30));
   ReportScreenIdleState(true /* screen_dim */, true /* screen_off */);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   const std::vector<UserActivityEvent>& events = delegate_.events();
   ASSERT_EQ(0U, events.size());
@@ -616,14 +616,14 @@
   const IdleEventNotifier::ActivityData data;
   ReportIdleEvent(data);
 
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(20));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(20));
   ReportScreenIdleState(true /* screen_dim */, false /* screen_off */);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(30));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(30));
   ReportScreenIdleState(true /* screen_dim */, true /* screen_off */);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(1));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(1));
 
   ReportUserActivity(nullptr);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   const std::vector<UserActivityEvent>& events = delegate_.events();
   ASSERT_EQ(1U, events.size());
@@ -686,7 +686,7 @@
   const IdleEventNotifier::ActivityData data;
   ReportIdleEvent(data);
 
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(20));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(20));
   ReportSuspend(power_manager::SuspendImminent_Reason_IDLE,
                 base::TimeDelta::FromSeconds(1));
   const std::vector<UserActivityEvent>& events = delegate_.events();
@@ -886,7 +886,7 @@
 
   ReportScreenIdleState(false /* screen_dim */, true /* screen_off */);
 
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(7));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(7));
   ReportUserActivity(nullptr);
 
   const std::vector<UserActivityEvent>& events = delegate_.events();
@@ -917,7 +917,7 @@
   ReportIdleEvent(data);
 
   ReportScreenIdleState(false /* screen_dim */, false /* screen_off */);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(7));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(7));
   ReportScreenIdleState(true /* screen_dim */, true /* screen_off */);
 
   ReportUserActivity(nullptr);
@@ -949,7 +949,7 @@
 
   ReportScreenIdleState(true /* screen_dim */, false /* screen_off */);
   ReportScreenIdleState(true /* screen_dim */, true /* screen_off */);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(7));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(7));
   ReportScreenIdleState(false /* screen_dim */, false /* screen_off */);
   ReportUserActivity(nullptr);
 
@@ -983,7 +983,7 @@
   const IdleEventNotifier::ActivityData data;
   bool should_defer = false;
   ReportIdleEvent(data, &should_defer);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   ReportUserActivity(nullptr);
   EXPECT_TRUE(should_defer);
 
@@ -1024,7 +1024,7 @@
   const IdleEventNotifier::ActivityData data;
   bool should_defer = false;
   ReportIdleEvent(data, &should_defer);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_TRUE(should_defer);
 
   std::string histogram("PowerML.SmartDimModel.RequestCompleteDuration");
@@ -1053,7 +1053,7 @@
   // Report user activity immediately after the idle event, so that
   // the SmartDimModel doesn't get a chance to run.
   ReportUserActivity(nullptr);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_FALSE(should_defer);
 
   std::string hist_complete("PowerML.SmartDimModel.RequestCompleteDuration");
@@ -1085,7 +1085,7 @@
   bool should_defer_2 = false;
   ReportIdleEvent(data, &should_defer_1);
   ReportIdleEvent(data, &should_defer_2);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   ReportUserActivity(nullptr);
   EXPECT_NE(should_defer_1, should_defer_2);
 
@@ -1128,7 +1128,7 @@
   const IdleEventNotifier::ActivityData data;
   bool should_defer = false;
   ReportIdleEvent(data, &should_defer);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   ReportUserActivity(nullptr);
   EXPECT_FALSE(should_defer);
 
@@ -1162,25 +1162,25 @@
   const IdleEventNotifier::ActivityData data;
   bool should_defer = false;
   ReportIdleEvent(data, &should_defer);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_TRUE(should_defer);
 
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(6));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(6));
   ReportSuspend(power_manager::SuspendImminent_Reason_IDLE,
                 base::TimeDelta::FromSeconds(3));
 
   // 2nd ScreenDimImminent is not deferred despite model score says so.
   model_.set_inactivity_score(20);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(10));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(10));
   ReportIdleEvent(data, &should_defer);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_FALSE(should_defer);
 
   std::string histogram("PowerML.SmartDimModel.RequestCompleteDuration");
   histogram_tester.ExpectTotalCount(histogram, 2);
 
   // Log when a SuspendImminent is received
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(20));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(20));
   ReportSuspend(power_manager::SuspendImminent_Reason_IDLE,
                 base::TimeDelta::FromSeconds(3));
 
@@ -1237,21 +1237,21 @@
   const IdleEventNotifier::ActivityData data;
   bool should_defer = false;
   ReportIdleEvent(data, &should_defer);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_TRUE(should_defer);
 
   // 2nd ScreenDimImminent is not deferred despite model score says so.
   model_.set_inactivity_score(20);
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(10));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(10));
   ReportIdleEvent(data, &should_defer);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_FALSE(should_defer);
 
   std::string histogram("PowerML.SmartDimModel.RequestCompleteDuration");
   histogram_tester.ExpectTotalCount(histogram, 2);
 
   // Log when a SuspendImminent is received
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromSeconds(20));
+  task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(20));
   ReportSuspend(power_manager::SuspendImminent_Reason_IDLE,
                 base::TimeDelta::FromSeconds(3));
 
@@ -1304,7 +1304,7 @@
   const IdleEventNotifier::ActivityData data;
   bool should_defer = false;
   ReportIdleEvent(data, &should_defer);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   ReportUserActivity(nullptr);
   EXPECT_FALSE(should_defer);
 
diff --git a/chrome/browser/chromeos/power/renderer_freezer_unittest.cc b/chrome/browser/chromeos/power/renderer_freezer_unittest.cc
index b594199..4a995bc 100644
--- a/chrome/browser/chromeos/power/renderer_freezer_unittest.cc
+++ b/chrome/browser/chromeos/power/renderer_freezer_unittest.cc
@@ -153,7 +153,7 @@
   std::unique_ptr<RendererFreezer> renderer_freezer_;
 
  private:
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(RendererFreezerTest);
 };
diff --git a/chrome/browser/chromeos/preferences_unittest.cc b/chrome/browser/chromeos/preferences_unittest.cc
index ca7c1bac..8df9a18 100644
--- a/chrome/browser/chromeos/preferences_unittest.cc
+++ b/chrome/browser/chromeos/preferences_unittest.cc
@@ -190,7 +190,7 @@
     prefs_->SetInputMethodListForTesting();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   std::unique_ptr<user_manager::ScopedUserManager> user_manager_enabler_;
   std::unique_ptr<Preferences> prefs_;
diff --git a/chrome/browser/chromeos/printing/print_servers_provider_unittest.cc b/chrome/browser/chromeos/printing/print_servers_provider_unittest.cc
index 3528434..0d05c0e 100644
--- a/chrome/browser/chromeos/printing/print_servers_provider_unittest.cc
+++ b/chrome/browser/chromeos/printing/print_servers_provider_unittest.cc
@@ -118,7 +118,7 @@
 
  protected:
   // everything must be called on Chrome_UIThread
-  content::TestBrowserThreadBundle task_environment_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<PrintServersProvider> external_servers_;
 };
 
diff --git a/chrome/browser/chromeos/printing/synced_printers_manager_unittest.cc b/chrome/browser/chromeos/printing/synced_printers_manager_unittest.cc
index 063ff99..cbb14cdb 100644
--- a/chrome/browser/chromeos/printing/synced_printers_manager_unittest.cc
+++ b/chrome/browser/chromeos/printing/synced_printers_manager_unittest.cc
@@ -102,7 +102,7 @@
   }
 
   // Must outlive |profile_|.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Must outlive |manager_|.
   TestingProfile profile_;
diff --git a/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc b/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
index 219d931..2daf5224 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
+++ b/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
@@ -387,7 +387,7 @@
     EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID, availability);
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<net::ProxyConfigService> proxy_config_service_;
   std::unique_ptr<ProxyConfigServiceImpl> config_service_impl_;
   TestingPrefServiceSimple pref_service_;
diff --git a/chrome/browser/chromeos/resource_reporter/resource_reporter_unittest.cc b/chrome/browser/chromeos/resource_reporter/resource_reporter_unittest.cc
index 96c21a0..f93ac23 100644
--- a/chrome/browser/chromeos/resource_reporter/resource_reporter_unittest.cc
+++ b/chrome/browser/chromeos/resource_reporter/resource_reporter_unittest.cc
@@ -143,7 +143,7 @@
   base::test::FakeMemoryPressureMonitor* monitor() { return &monitor_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::test::FakeMemoryPressureMonitor monitor_;
 
diff --git a/chrome/browser/chromeos/settings/cros_settings_unittest.cc b/chrome/browser/chromeos/settings/cros_settings_unittest.cc
index 0636107..1ea8c68 100644
--- a/chrome/browser/chromeos/settings/cros_settings_unittest.cc
+++ b/chrome/browser/chromeos/settings/cros_settings_unittest.cc
@@ -67,7 +67,7 @@
     DeviceSettingsService::Get()->SetSessionManager(
         &fake_session_manager_client_, owner_key_util_);
     DeviceSettingsService::Get()->Load();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   void TearDown() override {
@@ -92,7 +92,7 @@
     DCHECK(service);
 
     service->OnTPMTokenReady(true);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     DCHECK(service->IsOwner());
     return service;
   }
@@ -101,14 +101,14 @@
     device_policy_.Build();
     fake_session_manager_client_.set_device_policy(device_policy_.GetBlob());
     DeviceSettingsService::Get()->OwnerKeySet(true);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   void ExpectPref(const std::string& pref, const base::Value& expected_value) {
     DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
     // RunUntilIdle ensures that any changes recently made to CrosSettings will
     // be complete by the time that we make the assertions below.
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
 
     // ExpectPref checks that the given pref has the given value, and that the
     // value is TRUSTED - that means is not just a best-effort value that is
@@ -131,8 +131,8 @@
                                                 NULL);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_{
-      content::TestBrowserThreadBundle::IO_MAINLOOP};
+  content::BrowserTaskEnvironment task_environment_{
+      content::BrowserTaskEnvironment::IO_MAINLOOP};
 
   ScopedTestingLocalState local_state_;
   ScopedStubInstallAttributes scoped_install_attributes_;
@@ -182,7 +182,7 @@
   base::ListValue original_list;
   original_list.AppendString(kOwner);
   oss->Set(kAccountsPrefUsers, original_list);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   base::ListValue modified_list;
   modified_list.AppendString(kOwner);
@@ -207,7 +207,7 @@
   original_list.AppendString(kUser1);
   original_list.AppendString(kUser2);
   oss->Set(kAccountsPrefUsers, original_list);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   base::ListValue modified_list;
   modified_list.AppendString(kOwner);
@@ -303,7 +303,7 @@
   list.AppendString("[email protected]");
 
   oss->Set(kAccountsPrefUsers, list);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(IsWhitelisted("[email protected]"));
   EXPECT_FALSE(IsWhitelisted("[email protected]"));
@@ -334,7 +334,7 @@
   list.AppendString("*@example.com");
 
   oss->Set(kAccountsPrefUsers, list);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   bool wildcard_match = false;
   EXPECT_TRUE(CrosSettings::Get()->FindEmailInList(
diff --git a/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc b/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc
index 74b1e5ff..9636cb5 100644
--- a/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc
+++ b/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc
@@ -172,7 +172,7 @@
     inline void operator()(DeviceOAuth2TokenService* ptr) const { delete ptr; }
   };
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedStubInstallAttributes scoped_stub_install_attributes_;
   ScopedTestingLocalState scoped_testing_local_state_;
   ScopedTestDeviceSettingsService scoped_device_settings_service_;
diff --git a/chrome/browser/chromeos/settings/device_settings_test_helper.cc b/chrome/browser/chromeos/settings/device_settings_test_helper.cc
index 2ff29e3..37103957 100644
--- a/chrome/browser/chromeos/settings/device_settings_test_helper.cc
+++ b/chrome/browser/chromeos/settings/device_settings_test_helper.cc
@@ -36,7 +36,7 @@
 }
 
 DeviceSettingsTestBase::DeviceSettingsTestBase()
-    : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+    : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
 DeviceSettingsTestBase::~DeviceSettingsTestBase() {
   CHECK(teardown_called_);
diff --git a/chrome/browser/chromeos/settings/device_settings_test_helper.h b/chrome/browser/chromeos/settings/device_settings_test_helper.h
index e129e06..8c0f48e 100644
--- a/chrome/browser/chromeos/settings/device_settings_test_helper.h
+++ b/chrome/browser/chromeos/settings/device_settings_test_helper.h
@@ -66,7 +66,7 @@
 
   FakePowerManagerClient* power_manager_client();
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<policy::DevicePolicyBuilder> device_policy_;
 
diff --git a/chrome/browser/chromeos/settings/session_manager_operation_unittest.cc b/chrome/browser/chromeos/settings/session_manager_operation_unittest.cc
index 659624b..cf78d8d0 100644
--- a/chrome/browser/chromeos/settings/session_manager_operation_unittest.cc
+++ b/chrome/browser/chromeos/settings/session_manager_operation_unittest.cc
@@ -108,7 +108,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   policy::DevicePolicyBuilder policy_;
   ObservableFakeSessionManagerClient session_manager_client_;
diff --git a/chrome/browser/chromeos/settings/shutdown_policy_handler_unittest.cc b/chrome/browser/chromeos/settings/shutdown_policy_handler_unittest.cc
index e1fc2f71..b144728d 100644
--- a/chrome/browser/chromeos/settings/shutdown_policy_handler_unittest.cc
+++ b/chrome/browser/chromeos/settings/shutdown_policy_handler_unittest.cc
@@ -43,7 +43,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedTestingCrosSettings scoped_testing_cros_settings_;
   bool reboot_on_shutdown_;
   int delegate_invocations_count_;
diff --git a/chrome/browser/chromeos/settings/stats_reporting_controller_unittest.cc b/chrome/browser/chromeos/settings/stats_reporting_controller_unittest.cc
index 85c74d1..b2ae6625 100644
--- a/chrome/browser/chromeos/settings/stats_reporting_controller_unittest.cc
+++ b/chrome/browser/chromeos/settings/stats_reporting_controller_unittest.cc
@@ -92,8 +92,8 @@
     StatsReportingController::Shutdown();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_{
-      content::TestBrowserThreadBundle::IO_MAINLOOP};
+  content::BrowserTaskEnvironment task_environment_{
+      content::BrowserTaskEnvironment::IO_MAINLOOP};
   TestingPrefServiceSimple local_state_;
   ScopedStubInstallAttributes scoped_install_attributes_;
   FakeSessionManagerClient fake_session_manager_client_;
diff --git a/chrome/browser/chromeos/smb_client/smb_service_unittest.cc b/chrome/browser/chromeos/smb_client/smb_service_unittest.cc
index 877fc040..bcba1e4 100644
--- a/chrome/browser/chromeos/smb_client/smb_service_unittest.cc
+++ b/chrome/browser/chromeos/smb_client/smb_service_unittest.cc
@@ -78,7 +78,7 @@
 class SmbServiceTest : public testing::Test {
  protected:
   SmbServiceTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD) {
     profile_manager_ = std::make_unique<TestingProfileManager>(
         TestingBrowserProcess::GetGlobal());
     EXPECT_TRUE(profile_manager_->SetUp());
@@ -170,8 +170,8 @@
     }
   }
 
-  content::TestBrowserThreadBundle
-      thread_bundle_;        // Included so tests magically don't crash.
+  content::BrowserTaskEnvironment
+      task_environment_;  // Included so tests magically don't crash.
   TestingProfile* profile_ = nullptr;     // Not owned.
   TestingProfile* ad_profile_ = nullptr;  // Not owned.
   std::unique_ptr<TestingProfileManager> profile_manager_;
diff --git a/chrome/browser/chromeos/system/device_disabling_manager_unittest.cc b/chrome/browser/chromeos/system/device_disabling_manager_unittest.cc
index 37a09d66..6be4dcc 100644
--- a/chrome/browser/chromeos/system/device_disabling_manager_unittest.cc
+++ b/chrome/browser/chromeos/system/device_disabling_manager_unittest.cc
@@ -74,7 +74,7 @@
   void SetConsumerOwned();
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
   chromeos::FakeChromeUserManager fake_user_manager_;
   std::unique_ptr<DeviceDisablingManager> device_disabling_manager_;
diff --git a/chrome/browser/chromeos/system_logs/single_debug_daemon_log_source_unittest.cc b/chrome/browser/chromeos/system_logs/single_debug_daemon_log_source_unittest.cc
index e377101b..8827c4fa 100644
--- a/chrome/browser/chromeos/system_logs/single_debug_daemon_log_source_unittest.cc
+++ b/chrome/browser/chromeos/system_logs/single_debug_daemon_log_source_unittest.cc
@@ -54,7 +54,7 @@
   }
 
   // Creates the necessary browser threads.
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Used to verify that OnFetchComplete was called the correct number of times.
   int num_callback_calls_;
diff --git a/chrome/browser/chromeos/system_logs/single_log_file_log_source_unittest.cc b/chrome/browser/chromeos/system_logs/single_log_file_log_source_unittest.cc
index 60c1a44..6833ae7 100644
--- a/chrome/browser/chromeos/system_logs/single_log_file_log_source_unittest.cc
+++ b/chrome/browser/chromeos/system_logs/single_log_file_log_source_unittest.cc
@@ -89,7 +89,7 @@
   void FetchFromSource() {
     source_->Fetch(base::Bind(&SingleLogFileLogSourceTest::OnFileRead,
                               base::Unretained(this)));
-    browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   // Callback for fetching logs from |source_|. Overwrites the previous stored
@@ -113,7 +113,7 @@
 
  private:
   // Creates the necessary browser threads.
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Unit under test.
   std::unique_ptr<SingleLogFileLogSource> source_;
diff --git a/chrome/browser/chromeos/tether/tether_service_unittest.cc b/chrome/browser/chromeos/tether/tether_service_unittest.cc
index 7c7be0ef..f005992 100644
--- a/chrome/browser/chromeos/tether/tether_service_unittest.cc
+++ b/chrome/browser/chromeos/tether/tether_service_unittest.cc
@@ -561,7 +561,7 @@
   }
 
   const chromeos::multidevice::RemoteDeviceRefList test_devices_;
-  const content::TestBrowserThreadBundle thread_bundle_;
+  const content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestingProfile> profile_;
   chromeos::FakeChromeUserManager* fake_chrome_user_manager_;
diff --git a/chrome/browser/chromeos/wilco_dtc_supportd/wilco_dtc_supportd_notification_controller_unittest.cc b/chrome/browser/chromeos/wilco_dtc_supportd/wilco_dtc_supportd_notification_controller_unittest.cc
index 6139699d..1baf42a7 100644
--- a/chrome/browser/chromeos/wilco_dtc_supportd/wilco_dtc_supportd_notification_controller_unittest.cc
+++ b/chrome/browser/chromeos/wilco_dtc_supportd/wilco_dtc_supportd_notification_controller_unittest.cc
@@ -111,7 +111,7 @@
   }
 
   // CreateTestingProfile must be called on Chrome_UIThread
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   std::unique_ptr<user_manager::ScopedUserManager> user_manager_enabler_;
   std::unique_ptr<WilcoDtcSupportdNotificationController>
diff --git a/chrome/browser/component_updater/component_installers_unittest.cc b/chrome/browser/component_updater/component_installers_unittest.cc
index b4da7ec..bbdc4c8 100644
--- a/chrome/browser/component_updater/component_installers_unittest.cc
+++ b/chrome/browser/component_updater/component_installers_unittest.cc
@@ -61,7 +61,7 @@
 
 // TODO(viettrungluu): Separate out into two separate tests; use a test fixture.
 TEST(ComponentInstallerTest, PepperFlashCheck) {
-  content::TestBrowserThreadBundle test_browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   ppapi::PpapiGlobals::PerThreadForTest per_thread_for_test;
   ppapi::TestGlobals test_globals(per_thread_for_test);
diff --git a/chrome/browser/component_updater/crl_set_component_installer_unittest.cc b/chrome/browser/component_updater/crl_set_component_installer_unittest.cc
index 98bdd54..2da259c 100644
--- a/chrome/browser/component_updater/crl_set_component_installer_unittest.cc
+++ b/chrome/browser/component_updater/crl_set_component_installer_unittest.cc
@@ -24,7 +24,7 @@
 class CRLSetComponentInstallerTest : public PlatformTest {
  public:
   CRLSetComponentInstallerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         test_server_(net::EmbeddedTestServer::TYPE_HTTPS),
         network_service_(std::make_unique<network::NetworkService>(nullptr)) {}
 
@@ -77,11 +77,11 @@
                                             temp_dir_.GetPath()));
     policy_->ComponentReady(base::Version("1.0"), temp_dir_.GetPath(),
                             std::make_unique<base::DictionaryValue>());
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   net::EmbeddedTestServer test_server_;
 
   std::unique_ptr<CRLSetPolicy> policy_;
@@ -141,7 +141,7 @@
   // Simulate a Network Service crash
   SimulateCrash();
   CRLSetPolicy::ReconfigureAfterNetworkRestart();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   network_service_->CreateNetworkContext(
       mojo::MakeRequest(&network_context_),
@@ -169,7 +169,7 @@
   // Simulate a Network Service crash
   SimulateCrash();
   CRLSetPolicy::ReconfigureAfterNetworkRestart();
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   network_service_->CreateNetworkContext(
       mojo::MakeRequest(&network_context_),
diff --git a/chrome/browser/component_updater/cros_component_installer_chromeos_unittest.cc b/chrome/browser/component_updater/cros_component_installer_chromeos_unittest.cc
index 5e3bc847..c12fcc2c 100644
--- a/chrome/browser/component_updater/cros_component_installer_chromeos_unittest.cc
+++ b/chrome/browser/component_updater/cros_component_installer_chromeos_unittest.cc
@@ -274,7 +274,7 @@
     return service;
   }
 
-  void RunUntilIdle() { thread_bundle_.RunUntilIdle(); }
+  void RunUntilIdle() { task_environment_.RunUntilIdle(); }
 
   chromeos::FakeImageLoaderClient* image_loader_client() {
     return image_loader_client_;
@@ -327,7 +327,7 @@
     return base::make_optional(path);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   user_manager::ScopedUserManager user_manager_;
 
diff --git a/chrome/browser/component_updater/metadata_table_chromeos_unittest.cc b/chrome/browser/component_updater/metadata_table_chromeos_unittest.cc
index e6cca10..c0e182d 100644
--- a/chrome/browser/component_updater/metadata_table_chromeos_unittest.cc
+++ b/chrome/browser/component_updater/metadata_table_chromeos_unittest.cc
@@ -23,7 +23,7 @@
   ~CrOSComponentInstallerMetadataTest() override {}
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(CrOSComponentInstallerMetadataTest);
diff --git a/chrome/browser/component_updater/subresource_filter_component_installer_unittest.cc b/chrome/browser/component_updater/subresource_filter_component_installer_unittest.cc
index fd1868f..208f4a3 100644
--- a/chrome/browser/component_updater/subresource_filter_component_installer_unittest.cc
+++ b/chrome/browser/component_updater/subresource_filter_component_installer_unittest.cc
@@ -118,7 +118,7 @@
 
   void TearDown() override {
     TestingBrowserProcess::GetGlobal()->SetRulesetService(nullptr);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     PlatformTest::TearDown();
   }
 
@@ -167,7 +167,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  private:
 
@@ -191,7 +191,7 @@
       component_updater(new SubresourceFilterMockComponentUpdateService());
   EXPECT_CALL(*component_updater, RegisterComponent(testing::_)).Times(0);
   RegisterSubresourceFilterComponent(component_updater.get());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 TEST_F(SubresourceFilterComponentInstallerTest,
@@ -205,7 +205,7 @@
       .Times(1)
       .WillOnce(testing::Return(true));
   RegisterSubresourceFilterComponent(component_updater.get());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 TEST_F(SubresourceFilterComponentInstallerTest, LoadEmptyRuleset) {
diff --git a/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc b/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
index 0003da2f..577e4e8 100644
--- a/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
+++ b/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
@@ -296,7 +296,7 @@
     EXPECT_EQ(version, component->version.GetString());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager testing_profile_manager_;
   data_decoder::TestingJsonParser::ScopedFactoryOverride json_parser_override_;
   TestingPrefServiceSimple local_state_;
diff --git a/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc b/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc
index 9485cbc6..1d5a6aa 100644
--- a/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc
+++ b/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc
@@ -201,7 +201,7 @@
 
   // |ComponentReady| asserts that it is run on the UI thread, so we must
   // create test threads before calling it.
-  content::TestBrowserThreadBundle threads_;
+  content::BrowserTaskEnvironment threads_;
 
   // Bound callback to the |SwReporterComponentReady| method.
   OnComponentReadyCallback on_component_ready_callback_;
@@ -742,7 +742,7 @@
 
   bool component_can_be_updated_ = false;
   bool error_callback_called_ = false;
-  content::TestBrowserThreadBundle threads_;
+  content::BrowserTaskEnvironment threads_;
 
   DISALLOW_COPY_AND_ASSIGN(SwReporterOnDemandFetcherTest);
 };
diff --git a/chrome/browser/content_index/content_index_provider_unittest.cc b/chrome/browser/content_index/content_index_provider_unittest.cc
index 21720af..acc1078 100644
--- a/chrome/browser/content_index/content_index_provider_unittest.cc
+++ b/chrome/browser/content_index/content_index_provider_unittest.cc
@@ -64,7 +64,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle threads_;
+  content::BrowserTaskEnvironment threads_;
   TestingProfile profile_;
   std::unique_ptr<ContentIndexProviderImpl> provider_;
 };
diff --git a/chrome/browser/content_settings/content_settings_default_provider_unittest.cc b/chrome/browser/content_settings/content_settings_default_provider_unittest.cc
index c58b9252..e6374b7 100644
--- a/chrome/browser/content_settings/content_settings_default_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_default_provider_unittest.cc
@@ -33,7 +33,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   DefaultProvider provider_;
 };
diff --git a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
index 0214ca0..3bfa4db 100644
--- a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
@@ -33,7 +33,7 @@
 typedef std::vector<Rule> Rules;
 
 class PolicyProviderTest : public testing::Test {
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(PolicyProviderTest, DefaultGeolocationContentSetting) {
diff --git a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
index 9caec49..b5d69d2 100644
--- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
@@ -134,7 +134,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(PrefProviderTest, Observer) {
diff --git a/chrome/browser/content_settings/content_settings_usages_state_unittest.cc b/chrome/browser/content_settings/content_settings_usages_state_unittest.cc
index d567e61d..4b16502 100644
--- a/chrome/browser/content_settings/content_settings_usages_state_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_usages_state_unittest.cc
@@ -176,7 +176,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(ContentSettingsUsagesStateTests, ClearOnNewOriginForGeolocation) {
diff --git a/chrome/browser/content_settings/cookie_settings_factory_unittest.cc b/chrome/browser/content_settings/cookie_settings_factory_unittest.cc
index fb7ae47..b1cd60a 100644
--- a/chrome/browser/content_settings/cookie_settings_factory_unittest.cc
+++ b/chrome/browser/content_settings/cookie_settings_factory_unittest.cc
@@ -23,7 +23,7 @@
         kHttpsSite("https://example.com") {}
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   content_settings::CookieSettings* cookie_settings_;
   const GURL kBlockedSite;
diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
index ae20761e..9fdc883 100644
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
@@ -95,7 +95,7 @@
         ->pref_name();
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 // Wrapper to TestingProfile to reduce test boilerplates, by keeping a fixed
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
index a59e06c..46414d6 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
@@ -274,7 +274,7 @@
   void TearDown() override { TeadDownRegistry(); }
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestingProfile> profile_;
   FakeDelegate* delegate_;  // Registry assumes ownership of delegate_.
diff --git a/chrome/browser/devtools/devtools_file_system_indexer_unittest.cc b/chrome/browser/devtools/devtools_file_system_indexer_unittest.cc
index c3be1b6..d08f967 100644
--- a/chrome/browser/devtools/devtools_file_system_indexer_unittest.cc
+++ b/chrome/browser/devtools/devtools_file_system_indexer_unittest.cc
@@ -36,7 +36,7 @@
     indexing_done_ = false;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<DevToolsFileSystemIndexer> indexer_;
   std::set<std::string> search_results_;
   bool indexing_done_;
diff --git a/chrome/browser/download/download_history_unittest.cc b/chrome/browser/download/download_history_unittest.cc
index af262a9..0402103 100644
--- a/chrome/browser/download/download_history_unittest.cc
+++ b/chrome/browser/download/download_history_unittest.cc
@@ -452,7 +452,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::vector<std::unique_ptr<StrictMockDownloadItem>> items_;
   std::unique_ptr<content::MockDownloadManager> manager_;
   FakeHistoryAdapter* history_ = nullptr;
diff --git a/chrome/browser/download/download_prefs_unittest.cc b/chrome/browser/download/download_prefs_unittest.cc
index bcc4f29..832c030 100644
--- a/chrome/browser/download/download_prefs_unittest.cc
+++ b/chrome/browser/download/download_prefs_unittest.cc
@@ -37,7 +37,7 @@
 TEST(DownloadPrefsTest, NoAutoOpenForDisallowedFileTypes) {
   const base::FilePath kDangerousFilePath(FILE_PATH_LITERAL("/b/very-bad.swf"));
 
-  content::TestBrowserThreadBundle threads_are_required_for_testing_profile;
+  content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
   TestingProfile profile;
   DownloadPrefs prefs(&profile);
 
@@ -48,7 +48,7 @@
 TEST(DownloadPrefsTest, NoAutoOpenForFilesWithNoExtension) {
   const base::FilePath kFileWithNoExtension(FILE_PATH_LITERAL("abcd"));
 
-  content::TestBrowserThreadBundle threads_are_required_for_testing_profile;
+  content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
   TestingProfile profile;
   DownloadPrefs prefs(&profile);
 
@@ -62,7 +62,7 @@
   const base::FilePath kAnotherSafeFilePath(
       FILE_PATH_LITERAL("/ok/not-bad.txt"));
 
-  content::TestBrowserThreadBundle threads_are_required_for_testing_profile;
+  content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
   TestingProfile profile;
   DownloadPrefs prefs(&profile);
 
@@ -76,7 +76,7 @@
   const base::FilePath kSafeFilePath(
       FILE_PATH_LITERAL("/good/nothing-wrong.txt"));
 
-  content::TestBrowserThreadBundle threads_are_required_for_testing_profile;
+  content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
   TestingProfile profile;
   // This sets .swf files and .txt files as auto-open file types.
   profile.GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen, "swf:txt");
@@ -87,7 +87,7 @@
 }
 
 TEST(DownloadPrefsTest, PrefsInitializationSkipsInvalidFileTypes) {
-  content::TestBrowserThreadBundle threads_are_required_for_testing_profile;
+  content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
   TestingProfile profile;
   profile.GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen,
                                 "swf:txt::.foo:baz");
@@ -112,7 +112,7 @@
 }
 
 TEST(DownloadPrefsTest, AutoOpenCheckIsCaseInsensitive) {
-  content::TestBrowserThreadBundle threads_are_required_for_testing_profile;
+  content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
   TestingProfile profile;
   profile.GetPrefs()->SetString(prefs::kDownloadExtensionsToOpen,
                                 "txt:Foo:BAR");
@@ -129,7 +129,7 @@
 }
 
 TEST(DownloadPrefsTest, MissingDefaultPathCorrected) {
-  content::TestBrowserThreadBundle threads_are_required_for_testing_profile;
+  content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
   TestingProfile profile;
   profile.GetPrefs()->SetFilePath(prefs::kDownloadDefaultDirectory,
                                   base::FilePath());
@@ -143,7 +143,7 @@
 }
 
 TEST(DownloadPrefsTest, RelativeDefaultPathCorrected) {
-  content::TestBrowserThreadBundle threads_are_required_for_testing_profile;
+  content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
   TestingProfile profile;
 
   profile.GetPrefs()->SetFilePath(prefs::kDownloadDefaultDirectory,
@@ -158,7 +158,7 @@
 }
 
 TEST(DownloadPrefsTest, DefaultPathChangedToInvalidValue) {
-  content::TestBrowserThreadBundle threads_are_required_for_testing_profile;
+  content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
   TestingProfile profile;
   profile.GetPrefs()->SetFilePath(prefs::kDownloadDefaultDirectory,
                                   profile.GetPath());
@@ -185,7 +185,7 @@
 }
 
 TEST(DownloadPrefsTest, DownloadDirSanitization) {
-  content::TestBrowserThreadBundle threads_are_required_for_testing_profile;
+  content::BrowserTaskEnvironment threads_are_required_for_testing_profile;
   content::TestServiceManagerContext service_manager_context;
   TestingProfile profile(base::FilePath("/home/chronos/u-0123456789abcdef"));
   DownloadPrefs prefs(&profile);
diff --git a/chrome/browser/download/download_shelf_unittest.cc b/chrome/browser/download/download_shelf_unittest.cc
index 72c22f2..c7be981 100644
--- a/chrome/browser/download/download_shelf_unittest.cc
+++ b/chrome/browser/download/download_shelf_unittest.cc
@@ -56,7 +56,7 @@
  protected:
   std::unique_ptr<download::MockDownloadItem> GetInProgressMockDownload();
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<download::MockDownloadItem> download_item_;
   std::unique_ptr<content::MockDownloadManager> download_manager_;
   TestDownloadShelf shelf_;
diff --git a/chrome/browser/download/download_status_updater_unittest.cc b/chrome/browser/download/download_status_updater_unittest.cc
index cdedc28a..e4552721 100644
--- a/chrome/browser/download/download_status_updater_unittest.cc
+++ b/chrome/browser/download/download_status_updater_unittest.cc
@@ -184,7 +184,7 @@
   // object) can be deleted.
   // TODO(rdsmith): This can be removed when the DownloadManager
   // is no longer required to be deleted on the UI thread.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 // Test null updater.
diff --git a/chrome/browser/download/notification/download_item_notification_unittest.cc b/chrome/browser/download/notification/download_item_notification_unittest.cc
index 80be557..2637faed 100644
--- a/chrome/browser/download/notification/download_item_notification_unittest.cc
+++ b/chrome/browser/download/notification/download_item_notification_unittest.cc
@@ -132,7 +132,7 @@
         *download_item_notification_->notification_, /*metadata=*/nullptr);
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestingProfileManager> profile_manager_;
   Profile* profile_;
diff --git a/chrome/browser/engagement/important_sites_usage_counter_unittest.cc b/chrome/browser/engagement/important_sites_usage_counter_unittest.cc
index 5f3b5ed..fa81b51b 100644
--- a/chrome/browser/engagement/important_sites_usage_counter_unittest.cc
+++ b/chrome/browser/engagement/important_sites_usage_counter_unittest.cc
@@ -88,7 +88,7 @@
   const std::vector<ImportantDomainInfo>& domain_info() { return domain_info_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   base::ScopedTempDir temp_dir_;
   scoped_refptr<QuotaManager> quota_manager_;
diff --git a/chrome/browser/enterprise_reporting/policy_info_unittest.cc b/chrome/browser/enterprise_reporting/policy_info_unittest.cc
index 00695a4..5939c50 100644
--- a/chrome/browser/enterprise_reporting/policy_info_unittest.cc
+++ b/chrome/browser/enterprise_reporting/policy_info_unittest.cc
@@ -63,7 +63,7 @@
   policy::MockPolicyService* policy_service() { return policy_service_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   policy::PolicyMap policy_map_;
   policy::PolicyMap extension_policy_map_;
diff --git a/chrome/browser/enterprise_reporting/profile_report_generator_unittest.cc b/chrome/browser/enterprise_reporting/profile_report_generator_unittest.cc
index 191290b..2325372 100644
--- a/chrome/browser/enterprise_reporting/profile_report_generator_unittest.cc
+++ b/chrome/browser/enterprise_reporting/profile_report_generator_unittest.cc
@@ -94,7 +94,7 @@
   ProfileReportGenerator generator_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   TestingProfile* profile_;
 
diff --git a/chrome/browser/enterprise_reporting/report_generator_unittest.cc b/chrome/browser/enterprise_reporting/report_generator_unittest.cc
index f2bde05d..7edafce8 100644
--- a/chrome/browser/enterprise_reporting/report_generator_unittest.cc
+++ b/chrome/browser/enterprise_reporting/report_generator_unittest.cc
@@ -177,7 +177,7 @@
  private:
   ReportGenerator generator_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
 
   DISALLOW_COPY_AND_ASSIGN(ReportGeneratorTest);
diff --git a/chrome/browser/extensions/activity_log/counting_policy_unittest.cc b/chrome/browser/extensions/activity_log/counting_policy_unittest.cc
index 0c69032..d041739 100644
--- a/chrome/browser/extensions/activity_log/counting_policy_unittest.cc
+++ b/chrome/browser/extensions/activity_log/counting_policy_unittest.cc
@@ -48,7 +48,7 @@
 class CountingPolicyTest : public testing::Test {
  public:
   CountingPolicyTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {
 #if defined OS_CHROMEOS
     test_user_manager_.reset(new chromeos::ScopedTestUserManager());
 #endif
@@ -383,7 +383,7 @@
   base::SimpleTestClock mock_clock_;
   ExtensionService* extension_service_;
   std::unique_ptr<TestingProfile> profile_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
 #if defined OS_CHROMEOS
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
diff --git a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
index f9d8a61..67a737a22 100644
--- a/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
+++ b/chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc
@@ -45,7 +45,7 @@
 class FullStreamUIPolicyTest : public testing::Test {
  public:
   FullStreamUIPolicyTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {
 #if defined OS_CHROMEOS
     test_user_manager_.reset(new chromeos::ScopedTestUserManager());
 #endif
@@ -325,7 +325,7 @@
  protected:
   ExtensionService* extension_service_;
   std::unique_ptr<TestingProfile> profile_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
 #if defined OS_CHROMEOS
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
diff --git a/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers_unittest.cc b/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers_unittest.cc
index 81209a9a..3b909e6 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers_unittest.cc
+++ b/chrome/browser/extensions/api/bookmarks/bookmark_api_helpers_unittest.cc
@@ -65,7 +65,7 @@
         folder_, 0, base::ASCIIToUTF16("CNet"), GURL("http://cnet.com"));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   bookmarks::ManagedBookmarkService* managed_;
   BookmarkModel* model_;
diff --git a/chrome/browser/extensions/api/chrome_extensions_api_client_unittest.cc b/chrome/browser/extensions/api/chrome_extensions_api_client_unittest.cc
index 73d0c21..71150ee 100644
--- a/chrome/browser/extensions/api/chrome_extensions_api_client_unittest.cc
+++ b/chrome/browser/extensions/api/chrome_extensions_api_client_unittest.cc
@@ -19,7 +19,7 @@
   ChromeExtensionsAPIClientTest() = default;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsAPIClientTest);
 };
 
diff --git a/chrome/browser/extensions/api/cookies/cookies_unittest.cc b/chrome/browser/extensions/api/cookies/cookies_unittest.cc
index 2850af0e..65f2a7ae 100644
--- a/chrome/browser/extensions/api/cookies/cookies_unittest.cc
+++ b/chrome/browser/extensions/api/cookies/cookies_unittest.cc
@@ -44,7 +44,7 @@
 
 class ExtensionCookiesTest : public testing::Test {
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(ExtensionCookiesTest, StoreIdProfileConversion) {
diff --git a/chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc b/chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc
index f25a3e5..d87a0cc 100644
--- a/chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc
+++ b/chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc
@@ -63,7 +63,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(RulesRegistryServiceTest, TestConstructionAndMultiThreading) {
diff --git a/chrome/browser/extensions/api/declarative_content/declarative_content_condition_tracker_test.h b/chrome/browser/extensions/api/declarative_content/declarative_content_condition_tracker_test.h
index 3cad393..ffb11b4 100644
--- a/chrome/browser/extensions/api/declarative_content/declarative_content_condition_tracker_test.h
+++ b/chrome/browser/extensions/api/declarative_content/declarative_content_condition_tracker_test.h
@@ -45,7 +45,7 @@
   const void* GeneratePredicateGroupID();
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Enables MockRenderProcessHosts.
   content::RenderViewHostTestEnabler render_view_host_test_enabler_;
diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc
index 5ac5e3a8..1f199c1 100644
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc
@@ -223,7 +223,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   // Two extensions with host permissions for all URLs and the DWR permission.
   // Installation times will be so that |extension_| is older than
diff --git a/chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper_unittest.cc b/chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper_unittest.cc
index 9be986f..21684320f 100644
--- a/chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper_unittest.cc
+++ b/chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper_unittest.cc
@@ -24,7 +24,7 @@
 
 class ChromeDesktopReportRequestGeneratorTest : public ::testing::Test {
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   TestingProfile profile_;
 };
diff --git a/chrome/browser/extensions/api/file_system/consent_provider_unittest.cc b/chrome/browser/extensions/api/file_system/consent_provider_unittest.cc
index 2ed1d872..24f5304 100644
--- a/chrome/browser/extensions/api/file_system/consent_provider_unittest.cc
+++ b/chrome/browser/extensions/api/file_system/consent_provider_unittest.cc
@@ -137,7 +137,7 @@
   chromeos::FakeChromeUserManager*
       user_manager_;  // Owned by the scope enabler.
   std::unique_ptr<user_manager::ScopedUserManager> scoped_user_manager_enabler_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir temp_dir_;
   std::unique_ptr<Volume> download_volume_;
 };
diff --git a/chrome/browser/extensions/api/identity/gaia_web_auth_flow_unittest.cc b/chrome/browser/extensions/api/identity/gaia_web_auth_flow_unittest.cc
index bd781fb..d374269 100644
--- a/chrome/browser/extensions/api/identity/gaia_web_auth_flow_unittest.cc
+++ b/chrome/browser/extensions/api/identity/gaia_web_auth_flow_unittest.cc
@@ -94,7 +94,7 @@
  protected:
   testing::StrictMock<MockGaiaWebAuthFlowDelegate> delegate_;
   GoogleServiceAuthError::State ubertoken_error_state_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(IdentityGaiaWebAuthFlowTest, OAuthError) {
diff --git a/chrome/browser/extensions/api/identity/identity_api_unittest.cc b/chrome/browser/extensions/api/identity/identity_api_unittest.cc
index a4d5166..21f5da35 100644
--- a/chrome/browser/extensions/api/identity/identity_api_unittest.cc
+++ b/chrome/browser/extensions/api/identity/identity_api_unittest.cc
@@ -17,7 +17,7 @@
 #if BUILDFLAG(ENABLE_DICE_SUPPORT)
 // Tests that all accounts in extensions is only enabled when Dice is enabled.
 TEST(IdentityApiTest, DiceAllAccountsExtensions) {
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   base::test::ScopedFeatureList feature_list;
   feature_list.InitAndEnableFeature(kExtensionsAllAccountsFeature);
 
@@ -43,7 +43,7 @@
 #endif
 
 TEST(IdentityApiTest, AllAccountsExtensionDisabled) {
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 #if BUILDFLAG(ENABLE_DICE_SUPPORT)
   base::test::ScopedFeatureList feature_list;
   feature_list.InitAndDisableFeature(kExtensionsAllAccountsFeature);
diff --git a/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc b/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc
index bec408f..48f01d7 100644
--- a/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc
+++ b/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc
@@ -116,7 +116,7 @@
 
     // Cancel() will ensure we Shutdown() FakeImageWriterClient.
     operation_->Cancel();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
 
     ImageWriterUnitTestBase::TearDown();
   }
diff --git a/chrome/browser/extensions/api/image_writer_private/removable_storage_provider_chromeos_unittest.cc b/chrome/browser/extensions/api/image_writer_private/removable_storage_provider_chromeos_unittest.cc
index 91fd7c8..b0345d1 100644
--- a/chrome/browser/extensions/api/image_writer_private/removable_storage_provider_chromeos_unittest.cc
+++ b/chrome/browser/extensions/api/image_writer_private/removable_storage_provider_chromeos_unittest.cc
@@ -104,7 +104,7 @@
     EXPECT_EQ(capacity, device->capacity);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   MockDiskMountManager* disk_mount_manager_mock_;
   scoped_refptr<StorageDeviceList> devices_;
 };
@@ -125,7 +125,7 @@
       base::Bind(&RemovableStorageProviderChromeOsUnitTest::DevicesCallback,
                  base::Unretained(this)));
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_EQ(2U, devices_->data.size());
 
@@ -146,7 +146,7 @@
       base::Bind(&RemovableStorageProviderChromeOsUnitTest::DevicesCallback,
                  base::Unretained(this)));
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_EQ(2U, devices_->data.size());
 
diff --git a/chrome/browser/extensions/api/image_writer_private/test_utils.cc b/chrome/browser/extensions/api/image_writer_private/test_utils.cc
index 27c09d7..c7ca253 100644
--- a/chrome/browser/extensions/api/image_writer_private/test_utils.cc
+++ b/chrome/browser/extensions/api/image_writer_private/test_utils.cc
@@ -314,7 +314,7 @@
 }
 
 ImageWriterUnitTestBase::ImageWriterUnitTestBase()
-    : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {}
+    : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD) {}
 ImageWriterUnitTestBase::~ImageWriterUnitTestBase() {
 }
 
diff --git a/chrome/browser/extensions/api/image_writer_private/test_utils.h b/chrome/browser/extensions/api/image_writer_private/test_utils.h
index ab9f77a..5c0f764 100644
--- a/chrome/browser/extensions/api/image_writer_private/test_utils.h
+++ b/chrome/browser/extensions/api/image_writer_private/test_utils.h
@@ -204,7 +204,7 @@
 
   ImageWriterTestUtils test_utils_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 }  // namespace image_writer
diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc b/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
index 8d93459f..d5be5f8 100644
--- a/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
+++ b/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
@@ -115,7 +115,7 @@
  protected:
   NativeMessagingTest()
       : current_channel_(version_info::Channel::DEV),
-        thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+        task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         channel_closed_(false) {}
 
   void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); }
@@ -177,7 +177,7 @@
   ScopedCurrentChannel current_channel_;
   std::unique_ptr<NativeMessageHost> native_message_host_;
   std::unique_ptr<base::RunLoop> run_loop_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 
   std::string last_message_;
diff --git a/chrome/browser/extensions/api/messaging/native_messaging_launch_from_native_unittest.cc b/chrome/browser/extensions/api/messaging/native_messaging_launch_from_native_unittest.cc
index 48ab25ef..31a688f1 100644
--- a/chrome/browser/extensions/api/messaging/native_messaging_launch_from_native_unittest.cc
+++ b/chrome/browser/extensions/api/messaging/native_messaging_launch_from_native_unittest.cc
@@ -115,7 +115,7 @@
   }
 
   ScopedCurrentChannel channel_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   bool has_listener_result_ = true;
   TestingProfile profile_;
   std::string extension_id_;
diff --git a/chrome/browser/extensions/api/notifications/extension_notification_handler_unittest.cc b/chrome/browser/extensions/api/notifications/extension_notification_handler_unittest.cc
index 459f5333..79197cc 100644
--- a/chrome/browser/extensions/api/notifications/extension_notification_handler_unittest.cc
+++ b/chrome/browser/extensions/api/notifications/extension_notification_handler_unittest.cc
@@ -59,7 +59,7 @@
   ExtensionNotificationHandlerTest() {}
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(ExtensionNotificationHandlerTest, CloseHandler) {
diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl_unittest.cc b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl_unittest.cc
index 84d25a7..5a7185ac5 100644
--- a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl_unittest.cc
+++ b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl_unittest.cc
@@ -147,7 +147,7 @@
   void SetUpRouters();
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   extensions::TestEventRouter* event_router_ = nullptr;
 
diff --git a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router_unittest.cc b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router_unittest.cc
index f0a9a724..e4498ee5 100644
--- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router_unittest.cc
+++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router_unittest.cc
@@ -128,7 +128,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::test::ScopedFeatureList scoped_feature_list_;
   TestingProfileManager profile_manager_;
   TestingProfile* profile_;
diff --git a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc
index ad64682..5e10c742 100644
--- a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc
+++ b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc
@@ -32,7 +32,7 @@
 namespace extensions {
 
 TEST(SignedInDevicesAPITest, GetSignedInDevices) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile profile;
   FakeDeviceInfoTracker device_tracker;
   TestExtensionPrefs extension_prefs(base::ThreadTaskRunnerHandle::Get().get());
diff --git a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager_unittest.cc b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager_unittest.cc
index 17081c0..1b395ce4 100644
--- a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager_unittest.cc
+++ b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager_unittest.cc
@@ -23,7 +23,7 @@
 
 // Adds a listener and removes it.
 TEST(SignedInDevicesManager, UpdateListener) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   std::unique_ptr<TestingProfile> profile =
       IdentityTestEnvironmentProfileAdaptor::
diff --git a/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc b/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc
index c0ff25c..86c2110 100644
--- a/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc
+++ b/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc
@@ -126,7 +126,7 @@
   }
 
   base::ScopedTempDir scoped_temp_dir_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<PolicyValueStore> store_;
   MockSettingsObserver observer_;
   scoped_refptr<SettingsObserverList> observers_;
diff --git a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc
index 3d81dd4..44392d6 100644
--- a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc
+++ b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc
@@ -261,7 +261,7 @@
   }
 
   // Needed so that the DCHECKs for running on FILE or UI threads pass.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::ScopedTempDir temp_dir_;
   std::unique_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
index e0dbdfd7..dd0ad204 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
@@ -154,7 +154,7 @@
 class ExtensionWebRequestTest : public testing::Test {
  public:
   ExtensionWebRequestTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         profile_manager_(TestingBrowserProcess::GetGlobal()) {}
 
  protected:
@@ -162,7 +162,7 @@
     ASSERT_TRUE(profile_manager_.SetUp());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   TestingProfileManager profile_manager_;
 };
diff --git a/chrome/browser/extensions/app_data_migrator_unittest.cc b/chrome/browser/extensions/app_data_migrator_unittest.cc
index b1af8ff..b1ecdd4 100644
--- a/chrome/browser/extensions/app_data_migrator_unittest.cc
+++ b/chrome/browser/extensions/app_data_migrator_unittest.cc
@@ -42,7 +42,7 @@
 class AppDataMigratorTest : public testing::Test {
  public:
   AppDataMigratorTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
   void SetUp() override {
     profile_ = GetTestingProfile();
@@ -63,7 +63,7 @@
   void TearDown() override {}
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<AppDataMigrator> migrator_;
   content::StoragePartition* default_partition_;
diff --git a/chrome/browser/extensions/blacklist_check_unittest.cc b/chrome/browser/extensions/blacklist_check_unittest.cc
index 794ca65..c326fe1 100644
--- a/chrome/browser/extensions/blacklist_check_unittest.cc
+++ b/chrome/browser/extensions/blacklist_check_unittest.cc
@@ -39,7 +39,7 @@
   PreloadCheckRunner runner_;
 
  private:
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestExtensionPrefs test_prefs_;
   Blacklist blacklist_;
   TestBlacklist test_blacklist_;
diff --git a/chrome/browser/extensions/blacklist_state_fetcher_unittest.cc b/chrome/browser/extensions/blacklist_state_fetcher_unittest.cc
index 1a8f866..137efce 100644
--- a/chrome/browser/extensions/blacklist_state_fetcher_unittest.cc
+++ b/chrome/browser/extensions/blacklist_state_fetcher_unittest.cc
@@ -21,7 +21,7 @@
 
 class BlacklistStateFetcherTest : public testing::Test {
  private:
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(BlacklistStateFetcherTest, RequestBlacklistState) {
diff --git a/chrome/browser/extensions/blacklist_unittest.cc b/chrome/browser/extensions/blacklist_unittest.cc
index 3a3d7f2..c50e7adde 100644
--- a/chrome/browser/extensions/blacklist_unittest.cc
+++ b/chrome/browser/extensions/blacklist_unittest.cc
@@ -34,7 +34,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   TestExtensionPrefs test_prefs_;
 };
diff --git a/chrome/browser/extensions/chrome_extension_cookies.h b/chrome/browser/extensions/chrome_extension_cookies.h
index 75e23e46..9e94d37 100644
--- a/chrome/browser/extensions/chrome_extension_cookies.h
+++ b/chrome/browser/extensions/chrome_extension_cookies.h
@@ -59,7 +59,7 @@
 
   // Test-only method to get the raw underlying test store. This can only be
   // called when the UI thread and the IO thread are actually the same thread
-  // (e.g. if TestBrowserThreadBundle is in use).
+  // (e.g. if BrowserTaskEnvironment is in use).
   net::CookieStore* GetCookieStoreForTesting();
 
  private:
diff --git a/chrome/browser/extensions/chrome_info_map_unittest.cc b/chrome/browser/extensions/chrome_info_map_unittest.cc
index 77b2aee..f7fb5b9 100644
--- a/chrome/browser/extensions/chrome_info_map_unittest.cc
+++ b/chrome/browser/extensions/chrome_info_map_unittest.cc
@@ -47,7 +47,7 @@
   ChromeInfoMapTest() = default;
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 // Tests API access permissions given both extension and app URLs.
diff --git a/chrome/browser/extensions/component_loader_unittest.cc b/chrome/browser/extensions/component_loader_unittest.cc
index 656efc3..14bb5bf 100644
--- a/chrome/browser/extensions/component_loader_unittest.cc
+++ b/chrome/browser/extensions/component_loader_unittest.cc
@@ -96,7 +96,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   MockExtensionService extension_service_;
   ComponentLoader component_loader_;
diff --git a/chrome/browser/extensions/default_apps_unittest.cc b/chrome/browser/extensions/default_apps_unittest.cc
index cac55d2..a40adac 100644
--- a/chrome/browser/extensions/default_apps_unittest.cc
+++ b/chrome/browser/extensions/default_apps_unittest.cc
@@ -33,12 +33,11 @@
 class DefaultAppsTest : public testing::Test {
  public:
   DefaultAppsTest()
-      : test_browser_thread_bundle_(
-            content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
   ~DefaultAppsTest() override {}
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 #if !defined(OS_CHROMEOS)
diff --git a/chrome/browser/extensions/error_console/error_console_unittest.cc b/chrome/browser/extensions/error_console/error_console_unittest.cc
index 5919a516..548ef27 100644
--- a/chrome/browser/extensions/error_console/error_console_unittest.cc
+++ b/chrome/browser/extensions/error_console/error_console_unittest.cc
@@ -50,7 +50,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   ErrorConsole* error_console_;
 };
diff --git a/chrome/browser/extensions/event_router_forwarder_unittest.cc b/chrome/browser/extensions/event_router_forwarder_unittest.cc
index f33be29..0f69acf 100644
--- a/chrome/browser/extensions/event_router_forwarder_unittest.cc
+++ b/chrome/browser/extensions/event_router_forwarder_unittest.cc
@@ -84,9 +84,8 @@
 class EventRouterForwarderTest : public testing::Test {
  protected:
   EventRouterForwarderTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
-        profile_manager_(
-            TestingBrowserProcess::GetGlobal()) {
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD),
+        profile_manager_(TestingBrowserProcess::GetGlobal()) {
 #if defined(OS_MACOSX)
     base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
 #endif
@@ -107,7 +106,7 @@
     profile2_ = profile_manager_.CreateTestingProfile("two");
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   // Profiles are weak pointers, owned by ProfileManager in |browser_process_|.
   TestingProfile* profile1_;
diff --git a/chrome/browser/extensions/extension_action_icon_factory_unittest.cc b/chrome/browser/extensions/extension_action_icon_factory_unittest.cc
index 8fce7ada..2d84d34c 100644
--- a/chrome/browser/extensions/extension_action_icon_factory_unittest.cc
+++ b/chrome/browser/extensions/extension_action_icon_factory_unittest.cc
@@ -160,7 +160,7 @@
   TestingProfile* profile() { return profile_.get(); }
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   bool quit_in_icon_updated_;
   std::unique_ptr<TestingProfile> profile_;
   ExtensionService* extension_service_;
diff --git a/chrome/browser/extensions/extension_action_manager_unittest.cc b/chrome/browser/extensions/extension_action_manager_unittest.cc
index 335fe9d..92dc83b 100644
--- a/chrome/browser/extensions/extension_action_manager_unittest.cc
+++ b/chrome/browser/extensions/extension_action_manager_unittest.cc
@@ -51,7 +51,7 @@
   ExtensionRegistry* registry() { return registry_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ExtensionRegistry* registry_;
   ExtensionActionManager* manager_;
 
diff --git a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
index c5b88f6..257c61d 100644
--- a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
+++ b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
@@ -242,7 +242,7 @@
   }
 
   ExtensionGCMAppHandlerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD),
         extension_service_(NULL),
         registration_result_(gcm::GCMClient::UNKNOWN_ERROR),
         unregistration_result_(gcm::GCMClient::UNKNOWN_ERROR) {}
@@ -405,7 +405,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<content::InProcessUtilityThreadHelper>
       in_process_utility_thread_helper_;
   std::unique_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/extensions/extension_icon_manager_unittest.cc b/chrome/browser/extensions/extension_icon_manager_unittest.cc
index 07db300..acce4bcf 100644
--- a/chrome/browser/extensions/extension_icon_manager_unittest.cc
+++ b/chrome/browser/extensions/extension_icon_manager_unittest.cc
@@ -86,7 +86,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // The number of observed image loads that have not been waited for.
   int unwaited_image_loads_;
diff --git a/chrome/browser/extensions/extension_install_prompt_unittest.cc b/chrome/browser/extensions/extension_install_prompt_unittest.cc
index cbff7b6..853792ee 100644
--- a/chrome/browser/extensions/extension_install_prompt_unittest.cc
+++ b/chrome/browser/extensions/extension_install_prompt_unittest.cc
@@ -85,7 +85,7 @@
   Profile* profile() { return profile_.get(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
   DISALLOW_COPY_AND_ASSIGN(ExtensionInstallPromptUnitTest);
diff --git a/chrome/browser/extensions/extension_management_unittest.cc b/chrome/browser/extensions/extension_management_unittest.cc
index 11d8554..a97288af 100644
--- a/chrome/browser/extensions/extension_management_unittest.cc
+++ b/chrome/browser/extensions/extension_management_unittest.cc
@@ -259,7 +259,7 @@
     return extension;
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestingProfile> profile_;
   sync_preferences::TestingPrefServiceSyncable* pref_service_;
diff --git a/chrome/browser/extensions/extension_prefs_unittest.h b/chrome/browser/extensions/extension_prefs_unittest.h
index d65c2e7..f84bc24e 100644
--- a/chrome/browser/extensions/extension_prefs_unittest.h
+++ b/chrome/browser/extensions/extension_prefs_unittest.h
@@ -46,7 +46,7 @@
   ExtensionPrefs* prefs() { return prefs_.prefs(); }
   ChromeAppSorting* app_sorting() { return prefs_.app_sorting(); }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestExtensionPrefs prefs_;
 
  private:
diff --git a/chrome/browser/extensions/extension_protocols_unittest.cc b/chrome/browser/extensions/extension_protocols_unittest.cc
index 0b5103e..295ae04 100644
--- a/chrome/browser/extensions/extension_protocols_unittest.cc
+++ b/chrome/browser/extensions/extension_protocols_unittest.cc
@@ -167,7 +167,7 @@
 class ExtensionProtocolsTestBase : public testing::Test {
  public:
   explicit ExtensionProtocolsTestBase(bool force_incognito)
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         rvh_test_enabler_(new content::RenderViewHostTestEnabler()),
         force_incognito_(force_incognito) {}
 
@@ -293,7 +293,7 @@
     return web_contents()->GetMainFrame();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<content::RenderViewHostTestEnabler> rvh_test_enabler_;
   std::unique_ptr<network::mojom::URLLoaderFactory> loader_factory_;
   std::unique_ptr<TestingProfile> testing_profile_;
diff --git a/chrome/browser/extensions/extension_service_test_base.cc b/chrome/browser/extensions/extension_service_test_base.cc
index 4587724..9c84eb8 100644
--- a/chrome/browser/extensions/extension_service_test_base.cc
+++ b/chrome/browser/extensions/extension_service_test_base.cc
@@ -83,7 +83,7 @@
         default;
 
 ExtensionServiceTestBase::ExtensionServiceTestBase()
-    : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+    : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
       service_(nullptr),
       testing_local_state_(TestingBrowserProcess::GetGlobal()),
       registry_(nullptr),
diff --git a/chrome/browser/extensions/extension_service_test_base.h b/chrome/browser/extensions/extension_service_test_base.h
index b48d1261..dc2ed18 100644
--- a/chrome/browser/extensions/extension_service_test_base.h
+++ b/chrome/browser/extensions/extension_service_test_base.h
@@ -140,12 +140,12 @@
   base::ScopedTempDir temp_dir_;
 
   // Destroying at_exit_manager_ will delete all LazyInstances, so it must come
-  // after thread_bundle_ in the destruction order.
+  // after task_environment_ in the destruction order.
   base::ShadowingAtExitManager at_exit_manager_;
 
   // The MessageLoop is used by RenderViewHostTestEnabler, so this must be
   // created before it.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Enable creation of WebContents without initializing a renderer.
   content::RenderViewHostTestEnabler rvh_test_enabler_;
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 16c752c4..a560b617 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -4959,7 +4959,7 @@
   ASSERT_TRUE(service()->UninstallExtension(
       good_crx, UNINSTALL_REASON_FOR_TESTING, NULL));
   // The data deletion happens on the IO thread; since we use a
-  // TestBrowserThreadBundle (without REAL_IO_THREAD), the IO and UI threads are
+  // BrowserTaskEnvironment (without REAL_IO_THREAD), the IO and UI threads are
   // the same, and RunAllTasksUntilIdle() should run IO thread tasks.
   content::RunAllTasksUntilIdle();
 
@@ -5927,7 +5927,7 @@
 // Also tests that we always fire EXTENSIONS_READY, no matter whether we are
 // enabled or not.
 class ExtensionServiceTestSimple : public testing::Test {
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(ExtensionServiceTestSimple, Enabledness) {
diff --git a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
index 23c0e153..688d420 100644
--- a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
+++ b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
@@ -181,7 +181,7 @@
     }
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<ExtensionSpecialStoragePolicy> policy_;
 };
 
diff --git a/chrome/browser/extensions/extension_user_script_loader_unittest.cc b/chrome/browser/extensions/extension_user_script_loader_unittest.cc
index e25f871..28f41b41 100644
--- a/chrome/browser/extensions/extension_user_script_loader_unittest.cc
+++ b/chrome/browser/extensions/extension_user_script_loader_unittest.cc
@@ -70,7 +70,7 @@
   base::ReadOnlySharedMemoryRegion* shared_memory_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::NotificationRegistrar registrar_;
 
   DISALLOW_COPY_AND_ASSIGN(ExtensionUserScriptLoaderTest);
diff --git a/chrome/browser/extensions/extension_web_ui_unittest.cc b/chrome/browser/extensions/extension_web_ui_unittest.cc
index 5b582aa..d710d0d 100644
--- a/chrome/browser/extensions/extension_web_ui_unittest.cc
+++ b/chrome/browser/extensions/extension_web_ui_unittest.cc
@@ -63,7 +63,7 @@
 
   std::unique_ptr<TestingProfile> profile_;
   ExtensionService* extension_service_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
 #if defined OS_CHROMEOS
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
diff --git a/chrome/browser/extensions/external_policy_loader_unittest.cc b/chrome/browser/extensions/external_policy_loader_unittest.cc
index c9f801f..3b4f934 100644
--- a/chrome/browser/extensions/external_policy_loader_unittest.cc
+++ b/chrome/browser/extensions/external_policy_loader_unittest.cc
@@ -30,15 +30,14 @@
 class ExternalPolicyLoaderTest : public testing::Test {
  public:
   ExternalPolicyLoaderTest()
-      : test_browser_thread_bundle_(
-            content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
   ~ExternalPolicyLoaderTest() override {}
 
  private:
   // Needed to satisfy BrowserThread::CurrentlyOn(BrowserThread::UI) checks in
   // ExternalProviderImpl.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 class MockExternalPolicyProviderVisitor
diff --git a/chrome/browser/extensions/external_pref_loader_unittest.cc b/chrome/browser/extensions/external_pref_loader_unittest.cc
index abfd5af..5960a13 100644
--- a/chrome/browser/extensions/external_pref_loader_unittest.cc
+++ b/chrome/browser/extensions/external_pref_loader_unittest.cc
@@ -90,7 +90,7 @@
   Profile* profile() { return profile_.get(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
   DISALLOW_COPY_AND_ASSIGN(ExternalPrefLoaderTest);
diff --git a/chrome/browser/extensions/external_registry_loader_win_unittest.cc b/chrome/browser/extensions/external_registry_loader_win_unittest.cc
index 40143e6a..21e1325 100644
--- a/chrome/browser/extensions/external_registry_loader_win_unittest.cc
+++ b/chrome/browser/extensions/external_registry_loader_win_unittest.cc
@@ -70,10 +70,10 @@
   ~ExternalRegistryLoaderUnittest() override {}
 
  protected:
-  void RunUntilIdle() { thread_bundle_.RunUntilIdle(); }
+  void RunUntilIdle() { task_environment_.RunUntilIdle(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(ExternalRegistryLoaderUnittest);
 };
diff --git a/chrome/browser/extensions/forced_extensions/installation_tracker_unittest.cc b/chrome/browser/extensions/forced_extensions/installation_tracker_unittest.cc
index 4cd16dfb..ce5ce6d 100644
--- a/chrome/browser/extensions/forced_extensions/installation_tracker_unittest.cc
+++ b/chrome/browser/extensions/forced_extensions/installation_tracker_unittest.cc
@@ -64,7 +64,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   sync_preferences::TestingPrefServiceSyncable* prefs_;
   ExtensionRegistry* registry_;
diff --git a/chrome/browser/extensions/install_tracker_unittest.cc b/chrome/browser/extensions/install_tracker_unittest.cc
index 79232fc..5bd1436 100644
--- a/chrome/browser/extensions/install_tracker_unittest.cc
+++ b/chrome/browser/extensions/install_tracker_unittest.cc
@@ -56,7 +56,7 @@
     EXPECT_EQ(original.percent_downloaded, retrieved.percent_downloaded);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<InstallTracker> tracker_;
 };
diff --git a/chrome/browser/extensions/menu_manager_unittest.cc b/chrome/browser/extensions/menu_manager_unittest.cc
index f5bf30d..da0a6cf 100644
--- a/chrome/browser/extensions/menu_manager_unittest.cc
+++ b/chrome/browser/extensions/menu_manager_unittest.cc
@@ -95,7 +95,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
   MenuManager manager_;
diff --git a/chrome/browser/extensions/pack_extension_unittest.cc b/chrome/browser/extensions/pack_extension_unittest.cc
index 40baeb4..9c7a4b7 100644
--- a/chrome/browser/extensions/pack_extension_unittest.cc
+++ b/chrome/browser/extensions/pack_extension_unittest.cc
@@ -35,7 +35,7 @@
     return startup_helper_.PackExtension(command_line);
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::FilePath test_data_dir_;
   StartupHelper startup_helper_;
diff --git a/chrome/browser/extensions/permissions_based_management_policy_provider_unittest.cc b/chrome/browser/extensions/permissions_based_management_policy_provider_unittest.cc
index 6c961c8..f7fbae3 100644
--- a/chrome/browser/extensions/permissions_based_management_policy_provider_unittest.cc
+++ b/chrome/browser/extensions/permissions_based_management_policy_provider_unittest.cc
@@ -80,7 +80,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestingProfile> profile_;
   sync_preferences::TestingPrefServiceSyncable* pref_service_;
diff --git a/chrome/browser/extensions/standard_management_policy_provider_unittest.cc b/chrome/browser/extensions/standard_management_policy_provider_unittest.cc
index 06fb7b3..77bcbf59 100644
--- a/chrome/browser/extensions/standard_management_policy_provider_unittest.cc
+++ b/chrome/browser/extensions/standard_management_policy_provider_unittest.cc
@@ -29,7 +29,7 @@
     return ExtensionBuilder("test").SetLocation(location).Build();
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   TestingProfile profile_;
   std::unique_ptr<ExtensionManagement> settings_;
diff --git a/chrome/browser/extensions/test_extension_environment.cc b/chrome/browser/extensions/test_extension_environment.cc
index 2e1c819..11c37d9b 100644
--- a/chrome/browser/extensions/test_extension_environment.cc
+++ b/chrome/browser/extensions/test_extension_environment.cc
@@ -94,9 +94,10 @@
 }
 
 TestExtensionEnvironment::TestExtensionEnvironment(Type type)
-    : thread_bundle_(type == Type::kWithTaskEnvironment
-                         ? std::make_unique<content::TestBrowserThreadBundle>()
-                         : nullptr),
+    : task_environment_(
+          type == Type::kWithTaskEnvironment
+              ? std::make_unique<content::BrowserTaskEnvironment>()
+              : nullptr),
 #if defined(OS_CHROMEOS)
       chromeos_env_(chromeos::DeviceSettingsService::IsInitialized()
                         ? nullptr
diff --git a/chrome/browser/extensions/test_extension_environment.h b/chrome/browser/extensions/test_extension_environment.h
index ae3b264..75d80488 100644
--- a/chrome/browser/extensions/test_extension_environment.h
+++ b/chrome/browser/extensions/test_extension_environment.h
@@ -24,7 +24,7 @@
 }
 
 namespace content {
-class TestBrowserThreadBundle;
+class BrowserTaskEnvironment;
 class WebContents;
 }
 
@@ -45,7 +45,7 @@
       TestingProfile* profile);
 
   enum class Type {
-    // A TestExtensionEnvironment which will provide a TestBrowserThreadBundle
+    // A TestExtensionEnvironment which will provide a BrowserTaskEnvironment
     // in its scope.
     kWithTaskEnvironment,
     // A TestExtensionEnvironment which will run on top of the existing task
@@ -97,9 +97,9 @@
 
   void Init();
 
-  // If |thread_bundle_| is needed, then it needs to constructed before
+  // If |task_environment_| is needed, then it needs to constructed before
   // |profile_| and destroyed after |profile_|.
-  const std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
+  const std::unique_ptr<content::BrowserTaskEnvironment> task_environment_;
 
 #if defined(OS_CHROMEOS)
   const std::unique_ptr<ChromeOSEnv> chromeos_env_;
diff --git a/chrome/browser/extensions/update_install_gate_unittest.cc b/chrome/browser/extensions/update_install_gate_unittest.cc
index bc20e82e..3dcc13a 100644
--- a/chrome/browser/extensions/update_install_gate_unittest.cc
+++ b/chrome/browser/extensions/update_install_gate_unittest.cc
@@ -201,7 +201,7 @@
 
  private:
   // Needed by extension system.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Needed to ensure we don't end up creating actual RenderViewHosts
   // and RenderProcessHosts.
diff --git a/chrome/browser/extensions/updater/extension_updater_unittest.cc b/chrome/browser/extensions/updater/extension_updater_unittest.cc
index 440ac5d..a040bf0 100644
--- a/chrome/browser/extensions/updater/extension_updater_unittest.cc
+++ b/chrome/browser/extensions/updater/extension_updater_unittest.cc
@@ -563,7 +563,7 @@
 class ExtensionUpdaterTest : public testing::Test {
  public:
   ExtensionUpdaterTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         testing_local_state_(TestingBrowserProcess::GetGlobal()) {}
 
   void SetUp() override {
@@ -2102,7 +2102,7 @@
 
  protected:
   std::unique_ptr<TestExtensionPrefs> prefs_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   ManifestFetchData* CreateManifestFetchData(
       const GURL& update_url,
diff --git a/chrome/browser/extensions/updater/local_extension_cache_unittest.cc b/chrome/browser/extensions/updater/local_extension_cache_unittest.cc
index 5728447..a345f35 100644
--- a/chrome/browser/extensions/updater/local_extension_cache_unittest.cc
+++ b/chrome/browser/extensions/updater/local_extension_cache_unittest.cc
@@ -105,7 +105,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::ScopedTempDir cache_dir_;
   base::ScopedTempDir temp_dir_;
diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc
index d267c0f39..16c02e84 100644
--- a/chrome/browser/extensions/user_script_listener_unittest.cc
+++ b/chrome/browser/extensions/user_script_listener_unittest.cc
@@ -77,7 +77,7 @@
 class UserScriptListenerTest : public testing::Test {
  public:
   UserScriptListenerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         profile_manager_(
             new TestingProfileManager(TestingBrowserProcess::GetGlobal())) {}
 
@@ -134,7 +134,7 @@
     return throttle;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::RenderViewHostTestEnabler rvh_test_enabler_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   UserScriptListener listener_;
diff --git a/chrome/browser/extensions/warning_badge_service_unittest.cc b/chrome/browser/extensions/warning_badge_service_unittest.cc
index f68d6fac..307c9325 100644
--- a/chrome/browser/extensions/warning_badge_service_unittest.cc
+++ b/chrome/browser/extensions/warning_badge_service_unittest.cc
@@ -60,7 +60,7 @@
 // Check that no badge appears if it has been suppressed for a specific
 // warning.
 TEST(WarningBadgeServiceTest, SuppressBadgeForCurrentWarnings) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile profile;
   TestExtensionWarningSet warnings(&profile);
   TestWarningBadgeService badge_service(&profile, &warnings);
diff --git a/chrome/browser/extensions/zipfile_installer_unittest.cc b/chrome/browser/extensions/zipfile_installer_unittest.cc
index d348433..c1b17be 100644
--- a/chrome/browser/extensions/zipfile_installer_unittest.cc
+++ b/chrome/browser/extensions/zipfile_installer_unittest.cc
@@ -98,7 +98,7 @@
 class ZipFileInstallerTest : public testing::Test {
  public:
   ZipFileInstallerTest()
-      : browser_threads_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : browser_threads_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         data_decoder_(test_connector_factory_.RegisterInstance(
             data_decoder::mojom::kServiceName)),
         connector_(test_connector_factory_.CreateConnector()) {
@@ -168,7 +168,7 @@
   std::unique_ptr<TestingProfile> profile_;
   ExtensionService* extension_service_;
 
-  content::TestBrowserThreadBundle browser_threads_;
+  content::BrowserTaskEnvironment browser_threads_;
   std::unique_ptr<content::InProcessUtilityThreadHelper>
       in_process_utility_thread_helper_;
   MockExtensionRegistryObserver observer_;
diff --git a/chrome/browser/external_protocol/external_protocol_handler_unittest.cc b/chrome/browser/external_protocol/external_protocol_handler_unittest.cc
index 043d3be..bcce0696 100644
--- a/chrome/browser/external_protocol/external_protocol_handler_unittest.cc
+++ b/chrome/browser/external_protocol/external_protocol_handler_unittest.cc
@@ -172,7 +172,7 @@
     EXPECT_EQ(expected_action == Action::BLOCK, delegate_.has_blocked());
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::RunLoop run_loop_;
   FakeExternalProtocolHandlerDelegate delegate_;
diff --git a/chrome/browser/feature_engagement/bookmark/bookmark_tracker_unittest.cc b/chrome/browser/feature_engagement/bookmark/bookmark_tracker_unittest.cc
index c8e3c1b..33f817ed 100644
--- a/chrome/browser/feature_engagement/bookmark/bookmark_tracker_unittest.cc
+++ b/chrome/browser/feature_engagement/bookmark/bookmark_tracker_unittest.cc
@@ -84,7 +84,7 @@
   std::unique_ptr<FakeBookmarkTracker> bookmark_tracker_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(BookmarkTrackerEventTest);
 };
@@ -169,7 +169,7 @@
  private:
   std::unique_ptr<TestingProfileManager> testing_profile_manager_;
   base::test::ScopedFeatureList scoped_feature_list_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(BookmarkTrackerTest);
 };
diff --git a/chrome/browser/feature_engagement/feature_tracker_unittest.cc b/chrome/browser/feature_engagement/feature_tracker_unittest.cc
index 82a0bfd..2a07d00 100644
--- a/chrome/browser/feature_engagement/feature_tracker_unittest.cc
+++ b/chrome/browser/feature_engagement/feature_tracker_unittest.cc
@@ -96,7 +96,7 @@
   std::unique_ptr<MockTestFeatureTracker> mock_feature_tracker_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(FeatureTrackerTest);
 };
@@ -162,7 +162,7 @@
   base::test::ScopedFeatureList scoped_feature_list_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(FeatureTrackerParamsTest);
 };
diff --git a/chrome/browser/feature_engagement/incognito_window/incognito_window_tracker_unittest.cc b/chrome/browser/feature_engagement/incognito_window/incognito_window_tracker_unittest.cc
index 63c27d0..46648e8 100644
--- a/chrome/browser/feature_engagement/incognito_window/incognito_window_tracker_unittest.cc
+++ b/chrome/browser/feature_engagement/incognito_window/incognito_window_tracker_unittest.cc
@@ -85,7 +85,7 @@
   std::unique_ptr<FakeIncognitoWindowTracker> incognito_window_tracker_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(IncognitoWindowTrackerEventTest);
 };
@@ -169,7 +169,7 @@
  private:
   std::unique_ptr<TestingProfileManager> testing_profile_manager_;
   base::test::ScopedFeatureList scoped_feature_list_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(IncognitoWindowTrackerTest);
 };
diff --git a/chrome/browser/feature_engagement/new_tab/new_tab_tracker_unittest.cc b/chrome/browser/feature_engagement/new_tab/new_tab_tracker_unittest.cc
index b42f773..2e1d8bc 100644
--- a/chrome/browser/feature_engagement/new_tab/new_tab_tracker_unittest.cc
+++ b/chrome/browser/feature_engagement/new_tab/new_tab_tracker_unittest.cc
@@ -87,7 +87,7 @@
   std::unique_ptr<FakeNewTabTracker> new_tab_tracker_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(NewTabTrackerEventTest);
 };
@@ -177,7 +177,7 @@
  private:
   std::unique_ptr<TestingProfileManager> testing_profile_manager_;
   base::test::ScopedFeatureList scoped_feature_list_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(NewTabTrackerTest);
 };
diff --git a/chrome/browser/file_select_helper_unittest.cc b/chrome/browser/file_select_helper_unittest.cc
index 275e4d4..b250f7cc 100644
--- a/chrome/browser/file_select_helper_unittest.cc
+++ b/chrome/browser/file_select_helper_unittest.cc
@@ -121,7 +121,7 @@
 }
 
 TEST_F(FileSelectHelperTest, LastSelectedDirectory) {
-  content::TestBrowserThreadBundle browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile profile;
   scoped_refptr<FileSelectHelper> file_select_helper =
       new FileSelectHelper(&profile);
diff --git a/chrome/browser/font_family_cache_unittest.cc b/chrome/browser/font_family_cache_unittest.cc
index 602f59fa5..00729ca 100644
--- a/chrome/browser/font_family_cache_unittest.cc
+++ b/chrome/browser/font_family_cache_unittest.cc
@@ -33,7 +33,7 @@
 
 // Tests that the cache is correctly set and cleared.
 TEST(FontFamilyCacheTest, Caching) {
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile;
   TestingFontFamilyCache cache(&profile);
   sync_preferences::TestingPrefServiceSyncable* prefs =
diff --git a/chrome/browser/gcm/gcm_profile_service_unittest.cc b/chrome/browser/gcm/gcm_profile_service_unittest.cc
index e48a30d..0821daf 100644
--- a/chrome/browser/gcm/gcm_profile_service_unittest.cc
+++ b/chrome/browser/gcm/gcm_profile_service_unittest.cc
@@ -127,7 +127,7 @@
   GCMClient::Result send_result() const { return send_result_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   GCMProfileService* gcm_profile_service_;
   std::unique_ptr<FakeGCMAppHandler> gcm_app_handler_;
diff --git a/chrome/browser/google/google_search_domain_mixing_metrics_emitter_unittest.cc b/chrome/browser/google/google_search_domain_mixing_metrics_emitter_unittest.cc
index d237f51..52f68fcb 100644
--- a/chrome/browser/google/google_search_domain_mixing_metrics_emitter_unittest.cc
+++ b/chrome/browser/google/google_search_domain_mixing_metrics_emitter_unittest.cc
@@ -19,7 +19,7 @@
 class GoogleSearchDomainMixingMetricsEmitterTest : public testing::Test {
  public:
   GoogleSearchDomainMixingMetricsEmitterTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
 
   void SetUp() override {
     GoogleSearchDomainMixingMetricsEmitter::RegisterProfilePrefs(
@@ -41,7 +41,7 @@
     emitter_->SetTimerForTesting(std::move(timer));
 
     emitter_->SetUIThreadTaskRunnerForTesting(
-        thread_bundle_.GetMainThreadTaskRunner());
+        task_environment_.GetMainThreadTaskRunner());
   }
 
   // Sets up test history such that domain mixing metrics for the day starting
@@ -76,7 +76,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingPrefServiceSimple prefs_;
   base::ScopedTempDir history_dir_;
   std::unique_ptr<history::HistoryService> history_service_;
@@ -103,7 +103,7 @@
   // The next metric calculation should be scheduled at 4am on the next day,
   // i.e. 16 hours from |now|.
   EXPECT_EQ(base::TimeDelta::FromHours(16),
-            thread_bundle_.NextMainThreadPendingTaskDelay());
+            task_environment_.NextMainThreadPendingTaskDelay());
 }
 
 TEST_F(GoogleSearchDomainMixingMetricsEmitterTest, Waits10SecondsAfterStart) {
@@ -117,7 +117,7 @@
   emitter_->Start();
 
   EXPECT_EQ(base::TimeDelta::FromSeconds(10),
-            thread_bundle_.NextMainThreadPendingTaskDelay());
+            task_environment_.NextMainThreadPendingTaskDelay());
 }
 
 TEST_F(GoogleSearchDomainMixingMetricsEmitterTest, WaitsUntilNeeded) {
@@ -132,7 +132,7 @@
   emitter_->Start();
 
   EXPECT_EQ(base::TimeDelta::FromHours(23),
-            thread_bundle_.NextMainThreadPendingTaskDelay());
+            task_environment_.NextMainThreadPendingTaskDelay());
 }
 
 TEST_F(GoogleSearchDomainMixingMetricsEmitterTest, EmitsMetricsOnStart) {
@@ -152,7 +152,7 @@
   emitter_->Start();
 
   base::HistogramTester tester;
-  thread_bundle_.FastForwardUntilNoTasksRemain();
+  task_environment_.FastForwardUntilNoTasksRemain();
   BlockUntilHistoryProcessesPendingRequests(history_service_.get());
   VerifyHistograms(tester);
 }
@@ -174,7 +174,7 @@
   emitter_->Start();
 
   // Wait for the first run to be done.
-  thread_bundle_.FastForwardUntilNoTasksRemain();
+  task_environment_.FastForwardUntilNoTasksRemain();
   BlockUntilHistoryProcessesPendingRequests(history_service_.get());
 
   // last_metrics_time is expected to have been incremented.
@@ -195,7 +195,7 @@
   timer_->Fire();
 
   base::HistogramTester tester;
-  thread_bundle_.FastForwardUntilNoTasksRemain();
+  task_environment_.FastForwardUntilNoTasksRemain();
   BlockUntilHistoryProcessesPendingRequests(history_service_.get());
   VerifyHistograms(tester);
 
diff --git a/chrome/browser/hid/hid_chooser_context_unittest.cc b/chrome/browser/hid/hid_chooser_context_unittest.cc
index a68da2b2..471bf3c4 100644
--- a/chrome/browser/hid/hid_chooser_context_unittest.cc
+++ b/chrome/browser/hid/hid_chooser_context_unittest.cc
@@ -25,7 +25,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/history/android/android_history_provider_service_unittest.cc b/chrome/browser/history/android/android_history_provider_service_unittest.cc
index 07c0c96..eafe7b4 100644
--- a/chrome/browser/history/android/android_history_provider_service_unittest.cc
+++ b/chrome/browser/history/android/android_history_provider_service_unittest.cc
@@ -64,7 +64,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   std::unique_ptr<AndroidHistoryProviderService> service_;
   base::CancelableTaskTracker cancelable_tracker_;
diff --git a/chrome/browser/history/android/android_provider_backend_unittest.cc b/chrome/browser/history/android/android_provider_backend_unittest.cc
index 41d0c1e..f58de78 100644
--- a/chrome/browser/history/android/android_provider_backend_unittest.cc
+++ b/chrome/browser/history/android/android_provider_backend_unittest.cc
@@ -246,7 +246,7 @@
     return true;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   AndroidProviderBackendNotifier notifier_;
   scoped_refptr<HistoryBackend> history_backend_;
diff --git a/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc b/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc
index ade5d51..5e96a3a 100644
--- a/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc
+++ b/chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc
@@ -70,7 +70,7 @@
     content::RunAllPendingInMessageLoop();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   TestingProfileManager profile_manager_;
   BookmarkModel* bookmark_model_;
diff --git a/chrome/browser/history/android/sqlite_cursor_unittest.cc b/chrome/browser/history/android/sqlite_cursor_unittest.cc
index 2349ed5..9cde449 100644
--- a/chrome/browser/history/android/sqlite_cursor_unittest.cc
+++ b/chrome/browser/history/android/sqlite_cursor_unittest.cc
@@ -95,7 +95,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   std::unique_ptr<AndroidHistoryProviderService> service_;
   base::CancelableTaskTracker cancelable_tracker_;
diff --git a/chrome/browser/importer/profile_writer_unittest.cc b/chrome/browser/importer/profile_writer_unittest.cc
index 9b8e29f..0010240 100644
--- a/chrome/browser/importer/profile_writer_unittest.cc
+++ b/chrome/browser/importer/profile_writer_unittest.cc
@@ -127,7 +127,7 @@
     bookmarks_.push_back(entry);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(ProfileWriterTest);
 };
diff --git a/chrome/browser/language/language_model_manager_factory_unittest.cc b/chrome/browser/language/language_model_manager_factory_unittest.cc
index 69f12a1..af02370 100644
--- a/chrome/browser/language/language_model_manager_factory_unittest.cc
+++ b/chrome/browser/language/language_model_manager_factory_unittest.cc
@@ -14,7 +14,7 @@
 
 // Check that Incognito language modeling is inherited from the user's profile.
 TEST(LanguageModelManagerFactoryTest, SharedWithIncognito) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   TestingProfile profile;
   const language::LanguageModelManager* const manager =
diff --git a/chrome/browser/language/url_language_histogram_factory_unittest.cc b/chrome/browser/language/url_language_histogram_factory_unittest.cc
index fc6add7..9b1e164 100644
--- a/chrome/browser/language/url_language_histogram_factory_unittest.cc
+++ b/chrome/browser/language/url_language_histogram_factory_unittest.cc
@@ -12,7 +12,7 @@
 using testing::Not;
 
 TEST(UrlLanguageHistogramFactoryTest, NotCreatedInIncognito) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile profile;
 
   EXPECT_THAT(UrlLanguageHistogramFactory::GetForBrowserContext(&profile),
diff --git a/chrome/browser/local_discovery/service_discovery_client_mac_unittest.mm b/chrome/browser/local_discovery/service_discovery_client_mac_unittest.mm
index a623819..e5018b9 100644
--- a/chrome/browser/local_discovery/service_discovery_client_mac_unittest.mm
+++ b/chrome/browser/local_discovery/service_discovery_client_mac_unittest.mm
@@ -79,7 +79,7 @@
   ServiceDiscoveryClient* client() { return client_.get(); }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   scoped_refptr<ServiceDiscoveryClientMac> client_;
 
diff --git a/chrome/browser/media/android/cdm/media_drm_origin_id_manager_unittest.cc b/chrome/browser/media/android/cdm/media_drm_origin_id_manager_unittest.cc
index 319eb30..e35a14f2 100644
--- a/chrome/browser/media/android/cdm/media_drm_origin_id_manager_unittest.cc
+++ b/chrome/browser/media/android/cdm/media_drm_origin_id_manager_unittest.cc
@@ -138,7 +138,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_{
+  content::BrowserTaskEnvironment task_environment_{
       base::test::TaskEnvironment::TimeSource::MOCK_TIME};
   base::test::ScopedFeatureList scoped_feature_list_;
   std::unique_ptr<TestingProfile> profile_;
@@ -156,7 +156,7 @@
   EXPECT_FALSE(
       base::FeatureList::IsEnabled(media::kFailUrlProvisionFetcherForTesting));
 
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Preference should not exist. Not using GetDictionary() as it will
   // create the preference if it doesn't exist.
@@ -190,7 +190,7 @@
   Initialize();
 
   PreProvision();
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   CheckPreferenceForPreProvisioning();
 }
@@ -203,8 +203,8 @@
   Initialize(true);
 
   DVLOG(1) << "Advancing Time";
-  test_browser_thread_bundle_.FastForwardBy(kStartupDelay);
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.FastForwardBy(kStartupDelay);
+  task_environment_.RunUntilIdle();
 
   CheckPreferenceForPreProvisioning();
 }
@@ -223,8 +223,8 @@
   Initialize(true);
 
   DVLOG(1) << "Advancing Time";
-  test_browser_thread_bundle_.FastForwardBy(kStartupDelay);
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.FastForwardBy(kStartupDelay);
+  task_environment_.RunUntilIdle();
 
   // Pre-provisioning should have failed.
   DVLOG(1) << "Checking preference " << kMediaDrmOriginIds;
@@ -250,7 +250,7 @@
   // Trigger a network connection to force pre-provisioning to run again.
   network::TestNetworkConnectionTracker::GetInstance()->SetConnectionType(
       network::mojom::ConnectionType::CONNECTION_ETHERNET);
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Pre-provisioning should have run again. Should return the same result as if
   // pre-provisioning had succeeded at startup.
@@ -265,7 +265,7 @@
   Initialize();
 
   GetOriginId();
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   DVLOG(1) << "Checking preference " << kMediaDrmOriginIds;
   auto* pref = FindPreference(kMediaDrmOriginIds);
@@ -288,7 +288,7 @@
   Initialize();
 
   MediaDrmOriginId origin_id = GetOriginId();
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Check that the preference does not contain |origin_id|.
   DVLOG(1) << "Checking preference " << kMediaDrmOriginIds;
@@ -305,7 +305,7 @@
 
   EXPECT_FALSE(GetOriginId());
 
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // After failure the preference should contain |kExpireableToken| only if
   // per-application provisioning is NOT supported.
@@ -333,7 +333,7 @@
   EXPECT_TRUE(GetOriginId());  // Provisioning will succeed on the second call.
 
   // Let pre-provisioning of other origin IDs finish.
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // After success the preference should not contain |kExpireableToken|.
   DVLOG(1) << "Checking preference " << kMediaDrmOriginIds;
@@ -356,7 +356,7 @@
   Initialize();
 
   EXPECT_FALSE(GetOriginId());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Check that |kAvailableOriginIds| in the preference is empty.
   DVLOG(1) << "Checking preference " << kMediaDrmOriginIds;
@@ -372,11 +372,11 @@
   // Advance clock by |kExpirationDelta| (plus one minute) and attempt to
   // pre-provision more origin Ids.
   DVLOG(1) << "Advancing Time";
-  test_browser_thread_bundle_.FastForwardBy(kExpirationDelta);
-  test_browser_thread_bundle_.FastForwardBy(base::TimeDelta::FromMinutes(1));
+  task_environment_.FastForwardBy(kExpirationDelta);
+  task_environment_.FastForwardBy(base::TimeDelta::FromMinutes(1));
   DVLOG(1) << "Adjusted time: " << base::Time::Now();
   PreProvision();
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Look at the preference again.
   DVLOG(1) << "Checking preference " << kMediaDrmOriginIds << " again";
@@ -421,7 +421,7 @@
   Initialize();
 
   EXPECT_FALSE(GetOriginId());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Check that |kAvailableOriginIds| in the preference is empty.
   DVLOG(1) << "Checking preference " << kMediaDrmOriginIds;
@@ -433,7 +433,7 @@
   // unconnected.
   network::TestNetworkConnectionTracker::GetInstance()->SetConnectionType(
       network::mojom::ConnectionType::CONNECTION_NONE);
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Check that |kAvailableOriginIds| is still empty.
   DVLOG(1) << "Checking preference " << kMediaDrmOriginIds << " again";
@@ -444,7 +444,7 @@
   // Now trigger a network change to connected.
   network::TestNetworkConnectionTracker::GetInstance()->SetConnectionType(
       network::mojom::ConnectionType::CONNECTION_ETHERNET);
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Pre-provisioning should have run and filled up the list.
   DVLOG(1) << "Checking preference " << kMediaDrmOriginIds << " again";
@@ -470,7 +470,7 @@
   Initialize();
 
   EXPECT_FALSE(GetOriginId());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Check that |kAvailableOriginIds| in the preference is empty.
   DVLOG(1) << "Checking preference " << kMediaDrmOriginIds;
@@ -484,7 +484,7 @@
   for (size_t i = 0; i < kConnectionAttempts + 3; ++i) {
     network::TestNetworkConnectionTracker::GetInstance()->SetConnectionType(
         network::mojom::ConnectionType::CONNECTION_ETHERNET);
-    test_browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   // Check that |kAvailableOriginIds| is still empty.
diff --git a/chrome/browser/media/android/router/media_router_android_unittest.cc b/chrome/browser/media/android/router/media_router_android_unittest.cc
index 107552c6..7e8acd76 100644
--- a/chrome/browser/media/android/router/media_router_android_unittest.cc
+++ b/chrome/browser/media/android/router/media_router_android_unittest.cc
@@ -60,7 +60,7 @@
  protected:
   // For the checks that MediaRouter calls are running on the UI thread.
   // Needs to be the first member variable to be destroyed last.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<MediaRouterAndroid> router_;
   MockMediaRouterAndroidBridge* mock_bridge_;
diff --git a/chrome/browser/media/cast_remoting_connector_unittest.cc b/chrome/browser/media/cast_remoting_connector_unittest.cc
index e609e804..2e94a012 100644
--- a/chrome/browser/media/cast_remoting_connector_unittest.cc
+++ b/chrome/browser/media/cast_remoting_connector_unittest.cc
@@ -277,7 +277,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   FakeMediaRouter media_router_;
   sync_preferences::TestingPrefServiceSyncable pref_service_;
   std::unique_ptr<CastRemotingConnector> connector_;
diff --git a/chrome/browser/media/cast_transport_host_filter_unittest.cc b/chrome/browser/media/cast_transport_host_filter_unittest.cc
index fc21319be..d9fd2ae7 100644
--- a/chrome/browser/media/cast_transport_host_filter_unittest.cc
+++ b/chrome/browser/media/cast_transport_host_filter_unittest.cc
@@ -18,8 +18,7 @@
 class CastTransportHostFilterTest : public testing::Test {
  public:
   CastTransportHostFilterTest()
-      : browser_thread_bundle_(
-            content::TestBrowserThreadBundle::IO_MAINLOOP) {
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {
     filter_ = new cast::CastTransportHostFilter();
     static_cast<cast::CastTransportHostFilter*>(filter_.get())
         ->InitializeNoOpWakeLockForTesting();
@@ -36,7 +35,7 @@
   }
 
   base::DictionaryValue options_;
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<content::BrowserMessageFilter> filter_;
   net::IPEndPoint receive_endpoint_;
 };
diff --git a/chrome/browser/media/media_engagement_session_unittest.cc b/chrome/browser/media/media_engagement_session_unittest.cc
index 1d139a3..62cfa53 100644
--- a/chrome/browser/media/media_engagement_session_unittest.cc
+++ b/chrome/browser/media/media_engagement_session_unittest.cc
@@ -148,7 +148,7 @@
   const url::Origin origin_;
   base::SimpleTestClock test_clock_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<MediaEngagementService> service_;
   ukm::TestAutoSetUkmRecorder test_ukm_recorder_;
diff --git a/chrome/browser/media/midi_permission_context_unittest.cc b/chrome/browser/media/midi_permission_context_unittest.cc
index 3def810..463f1c628 100644
--- a/chrome/browser/media/midi_permission_context_unittest.cc
+++ b/chrome/browser/media/midi_permission_context_unittest.cc
@@ -15,7 +15,7 @@
   TestingProfile* profile() { return &profile_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc b/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc
index dc0222cb..c796641 100644
--- a/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc
+++ b/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc
@@ -49,7 +49,7 @@
 class DialMediaSinkServiceImplTest : public ::testing::Test {
  public:
   DialMediaSinkServiceImplTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         data_decoder_service_(connector_factory_.RegisterInstance(
             data_decoder::mojom::kServiceName)),
         media_sink_service_(new DialMediaSinkServiceImpl(
@@ -102,7 +102,7 @@
   }
 
  protected:
-  const content::TestBrowserThreadBundle thread_bundle_;
+  const content::BrowserTaskEnvironment task_environment_;
   service_manager::TestConnectorFactory connector_factory_;
   data_decoder::DataDecoderService data_decoder_service_;
 
diff --git a/chrome/browser/media/router/discovery/dial/dial_registry_unittest.cc b/chrome/browser/media/router/discovery/dial/dial_registry_unittest.cc
index cbe55f4..145ad32a 100644
--- a/chrome/browser/media/router/discovery/dial/dial_registry_unittest.cc
+++ b/chrome/browser/media/router/discovery/dial/dial_registry_unittest.cc
@@ -78,7 +78,7 @@
 class DialRegistryTest : public testing::Test {
  public:
   DialRegistryTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         registry_(new MockDialRegistry()),
         first_device_("first", GURL("http://127.0.0.1/dd.xml"), Now()),
         second_device_("second", GURL("http://127.0.0.2/dd.xml"), Now()),
@@ -109,7 +109,7 @@
     registry_->clock()->Advance(duration);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<MockDialRegistry> registry_;
   MockDialObserver mock_observer_;
diff --git a/chrome/browser/media/router/discovery/dial/dial_service_unittest.cc b/chrome/browser/media/router/discovery/dial/dial_service_unittest.cc
index 750c44f..f2c635c 100644
--- a/chrome/browser/media/router/discovery/dial/dial_service_unittest.cc
+++ b/chrome/browser/media/router/discovery/dial/dial_service_unittest.cc
@@ -54,7 +54,7 @@
 class DialServiceTest : public testing::Test {
  public:
   DialServiceTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         mock_ip_(net::IPAddress::IPv4AllZeros()),
         dial_service_(&test_net_log_) {
     dial_service_.AddObserver(&mock_observer_);
@@ -62,7 +62,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   net::TestNetLog test_net_log_;
   net::IPAddress mock_ip_;
   DialServiceImpl dial_service_;
diff --git a/chrome/browser/media/router/discovery/dial/safe_dial_app_info_parser_unittest.cc b/chrome/browser/media/router/discovery/dial/safe_dial_app_info_parser_unittest.cc
index bf8cd8e..d81a39a2 100644
--- a/chrome/browser/media/router/discovery/dial/safe_dial_app_info_parser_unittest.cc
+++ b/chrome/browser/media/router/discovery/dial/safe_dial_app_info_parser_unittest.cc
@@ -122,7 +122,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   service_manager::TestConnectorFactory connector_factory_;
   data_decoder::DataDecoderService data_decoder_service_;
   std::unique_ptr<ParsedDialAppInfo> app_info_;
diff --git a/chrome/browser/media/router/discovery/dial/safe_dial_device_description_parser_unittest.cc b/chrome/browser/media/router/discovery/dial/safe_dial_device_description_parser_unittest.cc
index 0d0fe14..187de9d 100644
--- a/chrome/browser/media/router/discovery/dial/safe_dial_device_description_parser_unittest.cc
+++ b/chrome/browser/media/router/discovery/dial/safe_dial_device_description_parser_unittest.cc
@@ -112,7 +112,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   service_manager::TestConnectorFactory connector_factory_;
   data_decoder::DataDecoderService data_decoder_service_;
 
diff --git a/chrome/browser/media/router/discovery/discovery_network_monitor_metric_observer_unittest.cc b/chrome/browser/media/router/discovery/discovery_network_monitor_metric_observer_unittest.cc
index b4d9de19..15be4ebc 100644
--- a/chrome/browser/media/router/discovery/discovery_network_monitor_metric_observer_unittest.cc
+++ b/chrome/browser/media/router/discovery/discovery_network_monitor_metric_observer_unittest.cc
@@ -61,11 +61,11 @@
 class DiscoveryNetworkMonitorMetricObserverTest : public ::testing::Test {
  public:
   DiscoveryNetworkMonitorMetricObserverTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
-        start_ticks_(thread_bundle_.NowTicks()),
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
+        start_ticks_(task_environment_.NowTicks()),
         metrics_(std::make_unique<MockMetrics>()),
         mock_metrics_(metrics_.get()),
-        metric_observer_(thread_bundle_.GetMockTickClock(),
+        metric_observer_(task_environment_.GetMockTickClock(),
                          std::move(metrics_)) {
     SetConnectionType(network::mojom::ConnectionType::CONNECTION_NONE);
   }
@@ -76,7 +76,7 @@
         connection_type);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::TimeDelta time_advance_ = base::TimeDelta::FromMilliseconds(10);
   const base::TimeTicks start_ticks_;
   std::unique_ptr<MockMetrics> metrics_;
@@ -163,7 +163,7 @@
   metric_observer_.OnNetworksChanged(
       DiscoveryNetworkMonitor::kNetworkIdDisconnected);
 
-  thread_bundle_.FastForwardUntilNoTasksRemain();
+  task_environment_.FastForwardUntilNoTasksRemain();
 }
 
 TEST_F(DiscoveryNetworkMonitorMetricObserverTest,
@@ -187,7 +187,7 @@
       RecordConnectionType(DiscoveryNetworkMonitorConnectionType::kEthernet));
   metric_observer_.OnNetworksChanged("network2");
 
-  thread_bundle_.FastForwardUntilNoTasksRemain();
+  task_environment_.FastForwardUntilNoTasksRemain();
 }
 
 TEST_F(DiscoveryNetworkMonitorMetricObserverTest,
@@ -204,7 +204,7 @@
       RecordConnectionType(DiscoveryNetworkMonitorConnectionType::kEthernet));
   metric_observer_.OnNetworksChanged("network2");
 
-  thread_bundle_.FastForwardUntilNoTasksRemain();
+  task_environment_.FastForwardUntilNoTasksRemain();
 }
 
 TEST_F(DiscoveryNetworkMonitorMetricObserverTest,
@@ -216,12 +216,12 @@
   SetConnectionType(network::mojom::ConnectionType::CONNECTION_ETHERNET);
   metric_observer_.OnNetworksChanged("network1");
 
-  thread_bundle_.FastForwardBy(time_advance_);
+  task_environment_.FastForwardBy(time_advance_);
   SetConnectionType(network::mojom::ConnectionType::CONNECTION_NONE);
   metric_observer_.OnNetworksChanged(
       DiscoveryNetworkMonitor::kNetworkIdDisconnected);
 
-  thread_bundle_.FastForwardBy(time_advance_);
+  task_environment_.FastForwardBy(time_advance_);
   SetConnectionType(network::mojom::ConnectionType::CONNECTION_ETHERNET);
   EXPECT_CALL(*mock_metrics_,
               RecordTimeBetweenNetworkChangeEvents(
@@ -231,7 +231,7 @@
       RecordConnectionType(DiscoveryNetworkMonitorConnectionType::kEthernet));
   metric_observer_.OnNetworksChanged("network2");
 
-  thread_bundle_.FastForwardUntilNoTasksRemain();
+  task_environment_.FastForwardUntilNoTasksRemain();
 }
 
 TEST_F(DiscoveryNetworkMonitorMetricObserverTest,
@@ -243,12 +243,12 @@
   SetConnectionType(network::mojom::ConnectionType::CONNECTION_ETHERNET);
   metric_observer_.OnNetworksChanged("network1");
 
-  thread_bundle_.FastForwardBy(time_advance_);
+  task_environment_.FastForwardBy(time_advance_);
   SetConnectionType(network::mojom::ConnectionType::CONNECTION_NONE);
   metric_observer_.OnNetworksChanged(
       DiscoveryNetworkMonitor::kNetworkIdDisconnected);
 
-  thread_bundle_.FastForwardBy(time_advance_);
+  task_environment_.FastForwardBy(time_advance_);
   EXPECT_CALL(*mock_metrics_,
               RecordTimeBetweenNetworkChangeEvents(
                   (start_ticks_ + time_advance_) - start_ticks_));
@@ -256,7 +256,7 @@
               RecordConnectionType(
                   DiscoveryNetworkMonitorConnectionType::kDisconnected));
 
-  thread_bundle_.FastForwardUntilNoTasksRemain();
+  task_environment_.FastForwardUntilNoTasksRemain();
 }
 
 TEST_F(DiscoveryNetworkMonitorMetricObserverTest,
@@ -268,13 +268,13 @@
   SetConnectionType(network::mojom::ConnectionType::CONNECTION_ETHERNET);
   metric_observer_.OnNetworksChanged("network1");
 
-  thread_bundle_.FastForwardBy(time_advance_);
-  const auto disconnect_ticks = thread_bundle_.NowTicks();
+  task_environment_.FastForwardBy(time_advance_);
+  const auto disconnect_ticks = task_environment_.NowTicks();
   SetConnectionType(network::mojom::ConnectionType::CONNECTION_NONE);
   metric_observer_.OnNetworksChanged(
       DiscoveryNetworkMonitor::kNetworkIdDisconnected);
 
-  thread_bundle_.FastForwardBy(time_advance_);
+  task_environment_.FastForwardBy(time_advance_);
   EXPECT_CALL(*mock_metrics_,
               RecordTimeBetweenNetworkChangeEvents(
                   (start_ticks_ + time_advance_) - start_ticks_));
@@ -282,10 +282,10 @@
               RecordConnectionType(
                   DiscoveryNetworkMonitorConnectionType::kDisconnected));
 
-  thread_bundle_.FastForwardUntilNoTasksRemain();
+  task_environment_.FastForwardUntilNoTasksRemain();
 
-  thread_bundle_.FastForwardBy(time_advance_);
-  const auto second_ethernet_ticks = thread_bundle_.NowTicks();
+  task_environment_.FastForwardBy(time_advance_);
+  const auto second_ethernet_ticks = task_environment_.NowTicks();
   EXPECT_CALL(*mock_metrics_, RecordTimeBetweenNetworkChangeEvents(
                                   second_ethernet_ticks - disconnect_ticks));
   EXPECT_CALL(
diff --git a/chrome/browser/media/router/discovery/discovery_network_monitor_unittest.cc b/chrome/browser/media/router/discovery/discovery_network_monitor_unittest.cc
index 4a10306..649ef48 100644
--- a/chrome/browser/media/router/discovery/discovery_network_monitor_unittest.cc
+++ b/chrome/browser/media/router/discovery/discovery_network_monitor_unittest.cc
@@ -33,7 +33,7 @@
     fake_network_info.clear();
     discovery_network_monitor =
         DiscoveryNetworkMonitor::CreateInstanceForTest(&FakeGetNetworkInfo);
-    thread_bundle.RunUntilIdle();
+    task_environment.RunUntilIdle();
   }
 
   static std::vector<DiscoveryNetworkInfo> FakeGetNetworkInfo() {
@@ -44,7 +44,7 @@
     discovery_network_monitor->OnConnectionChanged(connection_type);
   }
 
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   MockDiscoveryObserver mock_observer;
 
   std::vector<DiscoveryNetworkInfo> fake_ethernet_info{
@@ -74,7 +74,7 @@
       .WillOnce(Invoke(capture_network_id));
 
   ChangeConnectionType(network::mojom::ConnectionType::CONNECTION_ETHERNET);
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 
   std::string ethernet_network_id = current_network_id;
 
@@ -83,14 +83,14 @@
       .WillOnce(Invoke(capture_network_id));
 
   ChangeConnectionType(network::mojom::ConnectionType::CONNECTION_NONE);
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 
   fake_network_info = fake_wifi_info;
   EXPECT_CALL(mock_observer, OnNetworksChanged(_))
       .WillOnce(Invoke(capture_network_id));
 
   ChangeConnectionType(network::mojom::ConnectionType::CONNECTION_WIFI);
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 
   std::string wifi_network_id = current_network_id;
   fake_network_info = fake_ethernet_info;
@@ -98,7 +98,7 @@
       .WillOnce(Invoke(capture_network_id));
 
   ChangeConnectionType(network::mojom::ConnectionType::CONNECTION_ETHERNET);
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 
   EXPECT_EQ(ethernet_network_id, current_network_id);
   EXPECT_NE(ethernet_network_id, wifi_network_id);
@@ -113,13 +113,13 @@
   EXPECT_CALL(mock_observer, OnNetworksChanged(_));
 
   ChangeConnectionType(network::mojom::ConnectionType::CONNECTION_ETHERNET);
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 
   discovery_network_monitor->RemoveObserver(&mock_observer);
   fake_network_info.clear();
 
   ChangeConnectionType(network::mojom::ConnectionType::CONNECTION_NONE);
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 }
 
 TEST_F(DiscoveryNetworkMonitorTest, RefreshIndependentOfChangeObserver) {
@@ -135,11 +135,11 @@
   };
 
   discovery_network_monitor->Refresh(base::BindOnce(force_refresh_callback));
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 }
 
 TEST_F(DiscoveryNetworkMonitorTest, GetNetworkIdWithoutRefresh) {
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 
   fake_network_info = fake_ethernet_info;
 
@@ -147,7 +147,7 @@
     EXPECT_EQ(DiscoveryNetworkMonitor::kNetworkIdDisconnected, network_id);
   };
   discovery_network_monitor->GetNetworkId(base::BindOnce(check_network_id));
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 }
 
 TEST_F(DiscoveryNetworkMonitorTest, GetNetworkIdWithRefresh) {
@@ -164,7 +164,7 @@
   };
   discovery_network_monitor->Refresh(
       base::BindOnce(capture_network_id, &current_network_id));
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 
   auto check_network_id = [](const std::string& refresh_network_id,
                              const std::string& network_id) {
@@ -172,7 +172,7 @@
   };
   discovery_network_monitor->GetNetworkId(
       base::BindOnce(check_network_id, std::cref(current_network_id)));
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 }
 
 TEST_F(DiscoveryNetworkMonitorTest, GetNetworkIdWithObserver) {
@@ -182,7 +182,7 @@
   EXPECT_CALL(mock_observer, OnNetworksChanged(_));
 
   ChangeConnectionType(network::mojom::ConnectionType::CONNECTION_ETHERNET);
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 
   std::string current_network_id;
   auto check_network_id = [](const std::string& network_id) {
@@ -192,7 +192,7 @@
               network_id);
   };
   discovery_network_monitor->GetNetworkId(base::BindOnce(check_network_id));
-  thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 }
 
 }  // namespace media_router
diff --git a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc b/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc
index a7e99e0..2ac371c 100644
--- a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc
+++ b/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl_unittest.cc
@@ -68,7 +68,7 @@
 class CastMediaSinkServiceImplTest : public ::testing::Test {
  public:
   CastMediaSinkServiceImplTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         mock_time_task_runner_(new base::TestMockTimeTaskRunner()),
         mock_cast_socket_service_(
             new cast_channel::MockCastSocketService(mock_time_task_runner_)),
@@ -121,7 +121,7 @@
 
   static std::vector<DiscoveryNetworkInfo> fake_network_info_;
 
-  const content::TestBrowserThreadBundle thread_bundle_;
+  const content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<base::TestMockTimeTaskRunner> mock_time_task_runner_;
   std::unique_ptr<DiscoveryNetworkMonitor> discovery_network_monitor_ =
       DiscoveryNetworkMonitor::CreateInstanceForTest(&FakeGetNetworkInfo);
diff --git a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc b/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc
index a5d7d2e9..c2bb794 100644
--- a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc
+++ b/chrome/browser/media/router/discovery/mdns/cast_media_sink_service_unittest.cc
@@ -146,11 +146,11 @@
     EXPECT_CALL(test_dns_sd_registry_, UnregisterDnsSdListener(_));
     media_sink_service_.reset();
     task_runner_->RunUntilIdle();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
 
   base::MockCallback<OnSinksDiscoveredCallback> mock_sink_discovered_ui_cb_;
diff --git a/chrome/browser/media/router/event_page_request_manager_unittest.cc b/chrome/browser/media/router/event_page_request_manager_unittest.cc
index 89749f0..126312c 100644
--- a/chrome/browser/media/router/event_page_request_manager_unittest.cc
+++ b/chrome/browser/media/router/event_page_request_manager_unittest.cc
@@ -105,7 +105,7 @@
  private:
   std::unique_ptr<TestingProfile> profile_;
   base::HistogramTester histogram_tester_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(EventPageRequestManagerTest);
 };
diff --git a/chrome/browser/media/router/issue_manager_unittest.cc b/chrome/browser/media/router/issue_manager_unittest.cc
index 99c5e47..e458313 100644
--- a/chrome/browser/media/router/issue_manager_unittest.cc
+++ b/chrome/browser/media/router/issue_manager_unittest.cc
@@ -31,12 +31,13 @@
 class IssueManagerTest : public ::testing::Test {
  protected:
   IssueManagerTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {
-    manager_.set_task_runner_for_test(thread_bundle_.GetMainThreadTaskRunner());
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {
+    manager_.set_task_runner_for_test(
+        task_environment_.GetMainThreadTaskRunner());
   }
   ~IssueManagerTest() override {}
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   IssueManager manager_;
 };
 
@@ -109,8 +110,8 @@
   EXPECT_CALL(observer, OnIssuesCleared()).Times(1);
   base::TimeDelta timeout = IssueManager::GetAutoDismissTimeout(issue_info1);
   EXPECT_FALSE(timeout.is_zero());
-  EXPECT_TRUE(thread_bundle_.MainThreadIsIdle());
-  thread_bundle_.FastForwardBy(timeout);
+  EXPECT_TRUE(task_environment_.MainThreadIsIdle());
+  task_environment_.FastForwardBy(timeout);
 
   EXPECT_CALL(observer, OnIssue(_)).Times(1);
   IssueInfo issue_info2 = CreateTestIssue(IssueInfo::Severity::WARNING);
@@ -119,9 +120,9 @@
   EXPECT_CALL(observer, OnIssuesCleared()).Times(1);
   timeout = IssueManager::GetAutoDismissTimeout(issue_info2);
   EXPECT_FALSE(timeout.is_zero());
-  EXPECT_GT(thread_bundle_.GetPendingMainThreadTaskCount(), 0u);
-  thread_bundle_.FastForwardBy(timeout);
-  EXPECT_EQ(thread_bundle_.GetPendingMainThreadTaskCount(), 0u);
+  EXPECT_GT(task_environment_.GetPendingMainThreadTaskCount(), 0u);
+  task_environment_.FastForwardBy(timeout);
+  EXPECT_EQ(task_environment_.GetPendingMainThreadTaskCount(), 0u);
 }
 
 TEST_F(IssueManagerTest, IssueAutoDismissNoopsIfAlreadyCleared) {
@@ -135,13 +136,13 @@
   ASSERT_TRUE(testing::Mock::VerifyAndClearExpectations(&observer));
 
   EXPECT_CALL(observer, OnIssuesCleared()).Times(1);
-  EXPECT_GT(thread_bundle_.GetPendingMainThreadTaskCount(), 0u);
+  EXPECT_GT(task_environment_.GetPendingMainThreadTaskCount(), 0u);
   manager_.ClearIssue(issue1.id());
 
   EXPECT_CALL(observer, OnIssuesCleared()).Times(0);
   base::TimeDelta timeout = IssueManager::GetAutoDismissTimeout(issue_info1);
   EXPECT_FALSE(timeout.is_zero());
-  EXPECT_EQ(thread_bundle_.GetPendingMainThreadTaskCount(), 0u);
+  EXPECT_EQ(task_environment_.GetPendingMainThreadTaskCount(), 0u);
 }
 
 TEST_F(IssueManagerTest, BlockingIssuesDoNotGetAutoDismissed) {
@@ -157,7 +158,7 @@
 
   base::TimeDelta timeout = IssueManager::GetAutoDismissTimeout(issue_info1);
   EXPECT_TRUE(timeout.is_zero());
-  EXPECT_EQ(thread_bundle_.GetPendingMainThreadTaskCount(), 0u);
+  EXPECT_EQ(task_environment_.GetPendingMainThreadTaskCount(), 0u);
 
   // FATAL issues are always blocking.
   IssueInfo issue_info2 = CreateTestIssue(IssueInfo::Severity::FATAL);
@@ -165,7 +166,7 @@
 
   timeout = IssueManager::GetAutoDismissTimeout(issue_info2);
   EXPECT_TRUE(timeout.is_zero());
-  EXPECT_EQ(thread_bundle_.GetPendingMainThreadTaskCount(), 0u);
+  EXPECT_EQ(task_environment_.GetPendingMainThreadTaskCount(), 0u);
 }
 
 TEST_F(IssueManagerTest, ClearNonBlockingIssues) {
diff --git a/chrome/browser/media/router/media_router_base_unittest.cc b/chrome/browser/media/router/media_router_base_unittest.cc
index 35ba3f2..70b7419 100644
--- a/chrome/browser/media/router/media_router_base_unittest.cc
+++ b/chrome/browser/media/router/media_router_base_unittest.cc
@@ -54,7 +54,7 @@
   void TearDown() override { router_.Shutdown(); }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   MockMediaRouterBase router_;
   MediaRoutesObserver* routes_observer_;
 };
diff --git a/chrome/browser/media/router/media_router_factory_unittest.cc b/chrome/browser/media/router/media_router_factory_unittest.cc
index 5e724d5..d6227d6 100644
--- a/chrome/browser/media/router/media_router_factory_unittest.cc
+++ b/chrome/browser/media/router/media_router_factory_unittest.cc
@@ -27,7 +27,7 @@
   Profile* profile() { return &profile_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/media/router/media_sinks_observer_unittest.cc b/chrome/browser/media/router/media_sinks_observer_unittest.cc
index a5a5aa9..555730d 100644
--- a/chrome/browser/media/router/media_sinks_observer_unittest.cc
+++ b/chrome/browser/media/router/media_sinks_observer_unittest.cc
@@ -14,7 +14,7 @@
 namespace media_router {
 
 TEST(MediaSinksObserverTest, OriginMatching) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   MockMediaRouter router;
   MediaSource source(
       MediaSource::ForPresentationUrl(GURL("https://presentation.com")));
diff --git a/chrome/browser/media/router/presentation/browser_presentation_connection_proxy_unittest.cc b/chrome/browser/media/router/presentation/browser_presentation_connection_proxy_unittest.cc
index 40010062..f95bd0b8 100644
--- a/chrome/browser/media/router/presentation/browser_presentation_connection_proxy_unittest.cc
+++ b/chrome/browser/media/router/presentation/browser_presentation_connection_proxy_unittest.cc
@@ -78,7 +78,7 @@
   MockMediaRouter* mock_router() { return &mock_router_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<MockPresentationConnectionProxy>
       mock_controller_connection_proxy_;
   std::unique_ptr<mojo::Binding<blink::mojom::PresentationConnection>> binding_;
diff --git a/chrome/browser/media/router/presentation/local_presentation_manager_factory_unittest.cc b/chrome/browser/media/router/presentation/local_presentation_manager_factory_unittest.cc
index c0244a9..11d20c80 100644
--- a/chrome/browser/media/router/presentation/local_presentation_manager_factory_unittest.cc
+++ b/chrome/browser/media/router/presentation/local_presentation_manager_factory_unittest.cc
@@ -20,7 +20,7 @@
   Profile* profile() { return &profile_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/media/router/presentation/presentation_media_sinks_observer_unittest.cc b/chrome/browser/media/router/presentation/presentation_media_sinks_observer_unittest.cc
index 467fe465..651221f 100644
--- a/chrome/browser/media/router/presentation/presentation_media_sinks_observer_unittest.cc
+++ b/chrome/browser/media/router/presentation/presentation_media_sinks_observer_unittest.cc
@@ -47,7 +47,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  public:
   MockMediaRouter router_;
diff --git a/chrome/browser/media/router/providers/cast/cast_activity_manager_unittest.cc b/chrome/browser/media/router/providers/cast/cast_activity_manager_unittest.cc
index 24019016..87fe9d09 100644
--- a/chrome/browser/media/router/providers/cast/cast_activity_manager_unittest.cc
+++ b/chrome/browser/media/router/providers/cast/cast_activity_manager_unittest.cc
@@ -155,7 +155,7 @@
   // method is sometimes called when there are clearly no pending events simply
   // to check expectations for code executed synchronously.
   void RunUntilIdle() {
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     testing::Mock::VerifyAndClearExpectations(&message_handler_);
     testing::Mock::VerifyAndClearExpectations(&mock_router_);
   }
@@ -302,7 +302,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   data_decoder::TestingJsonParser::ScopedFactoryOverride parser_override_;
   service_manager::TestConnectorFactory connector_factory_;
   MockMojoMediaRouter mock_router_;
diff --git a/chrome/browser/media/router/providers/cast/cast_activity_record_unittest.cc b/chrome/browser/media/router/providers/cast/cast_activity_record_unittest.cc
index ad75b75..f0ea1f7 100644
--- a/chrome/browser/media/router/providers/cast/cast_activity_record_unittest.cc
+++ b/chrome/browser/media/router/providers/cast/cast_activity_record_unittest.cc
@@ -155,7 +155,7 @@
 
   // Run any pending events and verify expectations associated with them.
   void RunUntilIdle() {
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     testing::Mock::VerifyAndClearExpectations(&socket_service_);
     testing::Mock::VerifyAndClearExpectations(&message_handler_);
     testing::Mock::VerifyAndClearExpectations(&manager_);
@@ -175,7 +175,7 @@
 
   // TODO(crbug.com/954797): Factor out members also present in
   // CastActivityManagerTest.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   MediaSinkInternal sink_ = CreateCastSink(kChannelId);
   service_manager::TestConnectorFactory connector_factory_;
   cast_channel::MockCastSocketService socket_service_{
diff --git a/chrome/browser/media/router/providers/cast/cast_app_discovery_service_unittest.cc b/chrome/browser/media/router/providers/cast/cast_app_discovery_service_unittest.cc
index 024171b9..3dc03576 100644
--- a/chrome/browser/media/router/providers/cast/cast_app_discovery_service_unittest.cc
+++ b/chrome/browser/media/router/providers/cast/cast_app_discovery_service_unittest.cc
@@ -70,7 +70,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
   base::SimpleTestTickClock clock_;
   testing::NiceMock<cast_channel::MockCastSocketService> socket_service_;
diff --git a/chrome/browser/media/router/providers/cast/cast_media_controller_unittest.cc b/chrome/browser/media/router/providers/cast/cast_media_controller_unittest.cc
index c829aef6..5d1c8f73 100644
--- a/chrome/browser/media/router/providers/cast/cast_media_controller_unittest.cc
+++ b/chrome/browser/media/router/providers/cast/cast_media_controller_unittest.cc
@@ -175,7 +175,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   MockActivityRecord activity_;
   std::unique_ptr<CastMediaController> controller_;
   mojom::MediaControllerPtr mojo_controller_;
diff --git a/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc b/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc
index 03ac6bf..492b2a872 100644
--- a/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc
+++ b/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc
@@ -102,7 +102,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   service_manager::TestConnectorFactory connector_factory_;
   data_decoder::DataDecoderService data_decoder_service_;
 
diff --git a/chrome/browser/media/router/providers/cast/cast_session_client_unittest.cc b/chrome/browser/media/router/providers/cast/cast_session_client_unittest.cc
index 17a3ed25..51c22cc 100644
--- a/chrome/browser/media/router/providers/cast/cast_session_client_unittest.cc
+++ b/chrome/browser/media/router/providers/cast/cast_session_client_unittest.cc
@@ -77,7 +77,7 @@
   ~CastSessionClientImplTest() override { RunUntilIdle(); }
 
  protected:
-  void RunUntilIdle() { thread_bundle_.RunUntilIdle(); }
+  void RunUntilIdle() { task_environment_.RunUntilIdle(); }
 
   template <typename T>
   void ExpectErrorLog(const T& matcher) {
@@ -88,7 +88,7 @@
     }
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   data_decoder::TestingJsonParser::ScopedFactoryOverride parser_override_;
   service_manager::TestConnectorFactory connector_factory_;
   cast_channel::MockCastSocketService socket_service_{
diff --git a/chrome/browser/media/router/providers/cast/cast_session_tracker_unittest.cc b/chrome/browser/media/router/providers/cast/cast_session_tracker_unittest.cc
index d85bbee..662abbb 100644
--- a/chrome/browser/media/router/providers/cast/cast_session_tracker_unittest.cc
+++ b/chrome/browser/media/router/providers/cast/cast_session_tracker_unittest.cc
@@ -106,7 +106,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   cast_channel::MockCastSocketService socket_service_;
   cast_channel::MockCastMessageHandler message_handler_;
diff --git a/chrome/browser/media/router/providers/dial/dial_media_route_provider_unittest.cc b/chrome/browser/media/router/providers/dial/dial_media_route_provider_unittest.cc
index d8ddd7d..7652f19 100644
--- a/chrome/browser/media/router/providers/dial/dial_media_route_provider_unittest.cc
+++ b/chrome/browser/media/router/providers/dial/dial_media_route_provider_unittest.cc
@@ -376,7 +376,7 @@
                     RouteRequestResult::ResultCode));
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   service_manager::TestConnectorFactory connector_factory_;
   data_decoder::DataDecoderService data_decoder_service_;
 
diff --git a/chrome/browser/media/router/providers/extension/extension_media_route_provider_proxy_unittest.cc b/chrome/browser/media/router/providers/extension/extension_media_route_provider_proxy_unittest.cc
index 7897ea2..e9a4dc19 100644
--- a/chrome/browser/media/router/providers/extension/extension_media_route_provider_proxy_unittest.cc
+++ b/chrome/browser/media/router/providers/extension/extension_media_route_provider_proxy_unittest.cc
@@ -95,7 +95,7 @@
     provider_proxy_->RegisterMediaRouteProvider(std::move(mock_provider_ptr));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 
   DISALLOW_COPY_AND_ASSIGN(ExtensionMediaRouteProviderProxyTest);
diff --git a/chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider_unittest.cc b/chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider_unittest.cc
index c10f8af..39a6bba 100644
--- a/chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider_unittest.cc
+++ b/chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider_unittest.cc
@@ -182,11 +182,11 @@
   void TearDown() override {
     provider_.reset();
     display::Screen::SetScreenInstance(nullptr);
-    test_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
  protected:
-  content::TestBrowserThreadBundle test_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   // A mojo pointer to |provider_|.
   mojom::MediaRouteProviderPtr provider_pointer_;
   std::unique_ptr<TestWiredDisplayMediaRouteProvider> provider_;
diff --git a/chrome/browser/media/router/test/media_router_mojo_test.h b/chrome/browser/media/router/test/media_router_mojo_test.h
index 69aca4b..6f8563d 100644
--- a/chrome/browser/media/router/test/media_router_mojo_test.h
+++ b/chrome/browser/media/router/test/media_router_mojo_test.h
@@ -289,7 +289,7 @@
   void RegisterMediaRouteProvider(mojom::MediaRouteProvider* provider,
                                   MediaRouteProviderId provider_id);
 
-  content::TestBrowserThreadBundle test_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<const extensions::Extension> extension_;
   TestingProfile profile_;
   std::unique_ptr<MediaRouterMojoImpl> media_router_;
diff --git a/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc b/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc
index 5e84336..d420fd9 100644
--- a/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc
+++ b/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc
@@ -250,7 +250,7 @@
   std::unique_ptr<TabDesktopMediaList> list_;
   std::vector<WebContents*> manually_added_web_contents_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
 #if defined(OS_CHROMEOS)
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_manager_unittest.cc b/chrome/browser/media/webrtc/webrtc_event_log_manager_unittest.cc
index a78ff50..1cba0ad 100644
--- a/chrome/browser/media/webrtc/webrtc_event_log_manager_unittest.cc
+++ b/chrome/browser/media/webrtc/webrtc_event_log_manager_unittest.cc
@@ -778,7 +778,7 @@
   }
 
   // Testing utilities.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::test::ScopedFeatureList scoped_feature_list_;
   base::test::ScopedCommandLine scoped_command_line_;
   base::SimpleTestClock frozen_clock_;
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_uploader_impl_unittest.cc b/chrome/browser/media/webrtc/webrtc_event_log_uploader_impl_unittest.cc
index 1b088fb..44fc89a 100644
--- a/chrome/browser/media/webrtc/webrtc_event_log_uploader_impl_unittest.cc
+++ b/chrome/browser/media/webrtc/webrtc_event_log_uploader_impl_unittest.cc
@@ -85,7 +85,7 @@
   }
 
   ~WebRtcEventLogUploaderImplTest() override {
-    test_browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   void SetUp() override {
@@ -182,7 +182,7 @@
                           base::Unretained(&observer_));
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::Time kReasonableTime;
 
diff --git a/chrome/browser/media/webrtc/webrtc_rtp_dump_handler_unittest.cc b/chrome/browser/media/webrtc/webrtc_rtp_dump_handler_unittest.cc
index 5ab6ca0..ebe62de9 100644
--- a/chrome/browser/media/webrtc/webrtc_rtp_dump_handler_unittest.cc
+++ b/chrome/browser/media/webrtc/webrtc_rtp_dump_handler_unittest.cc
@@ -73,7 +73,7 @@
 class WebRtcRtpDumpHandlerTest : public testing::Test {
  public:
   WebRtcRtpDumpHandlerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {
     ResetDumpHandler(base::FilePath(), true);
   }
 
@@ -112,7 +112,7 @@
   MOCK_METHOD0(OnStopOngoingDumpsFinished, void(void));
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<WebRtcRtpDumpHandler> handler_;
 };
 
diff --git a/chrome/browser/media/webrtc/webrtc_rtp_dump_writer_unittest.cc b/chrome/browser/media/webrtc/webrtc_rtp_dump_writer_unittest.cc
index 12bc9b49..07ef4e5 100644
--- a/chrome/browser/media/webrtc/webrtc_rtp_dump_writer_unittest.cc
+++ b/chrome/browser/media/webrtc/webrtc_rtp_dump_writer_unittest.cc
@@ -59,7 +59,7 @@
 class WebRtcRtpDumpWriterTest : public testing::Test {
  public:
   WebRtcRtpDumpWriterTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         temp_dir_(new base::ScopedTempDir()) {}
 
   void SetUp() override {
@@ -231,7 +231,7 @@
     return true;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<base::ScopedTempDir> temp_dir_;
   base::FilePath incoming_dump_path_;
   base::FilePath outgoing_dump_path_;
diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
index a781ff9..b5f0d6f 100644
--- a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
+++ b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
@@ -184,7 +184,7 @@
     return file_system_context_->operation_runner();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  private:
   base::ScopedTempDir data_dir_;
diff --git a/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc b/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc
index 3ef4260..b19f754 100644
--- a/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc
+++ b/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc
@@ -56,7 +56,7 @@
                                 public testing::Test {
  public:
   GalleryWatchManagerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
 #if defined(OS_CHROMEOS)
         test_user_manager_(std::make_unique<chromeos::ScopedTestUserManager>()),
 #endif
@@ -194,7 +194,7 @@
   std::unique_ptr<GalleryWatchManager> manager_;
 
   // Needed for extension service & friends to work.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   scoped_refptr<extensions::Extension> extension_;
 
diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
index fea27c1..e9e5933 100644
--- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
+++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
@@ -232,7 +232,7 @@
       base::Bind(&MTPDeviceDelegateImplMacTest::OnError,
                  base::Unretained(this),
                  &wait));
-    test_browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     EXPECT_TRUE(wait.IsSignaled());
     *info = info_;
     return error_;
@@ -247,7 +247,7 @@
                             base::Unretained(this), &wait),
         base::Bind(&MTPDeviceDelegateImplMacTest::OnError,
                    base::Unretained(this), &wait));
-    test_browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     wait.Wait();
     return error_;
   }
@@ -265,13 +265,13 @@
         base::Bind(&MTPDeviceDelegateImplMacTest::OnError,
                    base::Unretained(this),
                    &wait));
-    test_browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     wait.Wait();
     return error_;
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::ScopedTempDir temp_dir_;
   storage_monitor::ImageCaptureDeviceManager manager_;
@@ -339,7 +339,7 @@
   // Signal the delegate that no files are coming.
   delegate_->NoMoreItems();
 
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   wait.Wait();
 
   EXPECT_EQ(base::File::FILE_OK, error_);
diff --git a/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc b/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc
index 096c4aaa..88b89827 100644
--- a/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc
+++ b/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc
@@ -139,7 +139,7 @@
   }
 
   // Needed for extension service & friends to work.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // The dialog is owned by the controller, but this pointer should only be
   // valid while the dialog is live within the controller.
diff --git a/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc b/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc
index 0fb85f29..c49d5364 100644
--- a/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc
+++ b/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc
@@ -354,7 +354,7 @@
 
  private:
   // Needed for extension service & friends to work.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   EnsureMediaDirectoriesExists mock_gallery_locations_;
 
diff --git a/chrome/browser/memory/memory_kills_monitor_unittest.cc b/chrome/browser/memory/memory_kills_monitor_unittest.cc
index 56411037..45ffcc52 100644
--- a/chrome/browser/memory/memory_kills_monitor_unittest.cc
+++ b/chrome/browser/memory/memory_kills_monitor_unittest.cc
@@ -29,7 +29,7 @@
 
 class MemoryKillsMonitorTest : public testing::Test {
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(MemoryKillsMonitorTest, TestHistograms) {
diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics_unittest.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics_unittest.cc
index 042c948..c88646dc 100644
--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics_unittest.cc
+++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics_unittest.cc
@@ -38,7 +38,7 @@
 
  private:
   // Provides a message loop and allows the use of the task scheduler
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestServiceManagerContext service_manager_context_;
 
   // Dummy screen required by a ChromeBrowserMainExtraPartsMetrics test target.
diff --git a/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc b/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc
index acf1678..b2839a42 100644
--- a/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc
@@ -25,7 +25,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedTestingLocalState testing_local_state_;
 
   DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceAccessorTest);
diff --git a/chrome/browser/metrics/chrome_metrics_service_client_unittest.cc b/chrome/browser/metrics/chrome_metrics_service_client_unittest.cc
index a700c301..885e675 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client_unittest.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_client_unittest.cc
@@ -80,7 +80,7 @@
     return std::make_unique<metrics::ClientInfo>();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingPrefServiceSimple prefs_;
   TestingProfileManager profile_manager_;
   base::UserActionTester user_action_runner_;
diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc b/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc
index dc05e5b..5751c58 100644
--- a/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc
+++ b/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc
@@ -48,7 +48,7 @@
 
  private:
   std::unique_ptr<TestingPrefServiceSimple> prefs_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(ChromeStabilityMetricsProviderTest);
 };
diff --git a/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc b/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc
index 1745c5c..fbfba76 100644
--- a/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc
+++ b/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc
@@ -187,7 +187,7 @@
       fake_multidevice_setup_client_impl_factory_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(ChromeOSMetricsProviderTest);
 };
diff --git a/chrome/browser/metrics/perf/heap_collector_unittest.cc b/chrome/browser/metrics/perf/heap_collector_unittest.cc
index 85d8dd649..4f2ac77 100644
--- a/chrome/browser/metrics/perf/heap_collector_unittest.cc
+++ b/chrome/browser/metrics/perf/heap_collector_unittest.cc
@@ -192,8 +192,7 @@
 class HeapCollectorTest : public testing::Test {
  public:
   HeapCollectorTest()
-      : test_browser_thread_bundle_(
-            base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
 
   void SaveProfile(std::unique_ptr<SampledProfile> sampled_profile) {
     cached_profile_data_.resize(cached_profile_data_.size() + 1);
@@ -220,7 +219,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::vector<SampledProfile> cached_profile_data_;
 
@@ -257,7 +256,7 @@
 
   // Advance the clock by a periodic collection interval. We shouldn't find a
   // profile because the cache is full.
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
 
   EXPECT_TRUE(cached_profile_data_.empty());
 }
@@ -322,7 +321,7 @@
   sampled_profile->set_trigger_event(SampledProfile::PERIODIC_COLLECTION);
   heap_collector_->ParseAndSaveProfile(std::move(cat), kTempProfile,
                                        std::move(sampled_profile));
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Check that the profile was cached.
   ASSERT_EQ(1U, cached_profile_data_.size());
@@ -361,7 +360,7 @@
 
   // Advance the clock by a periodic collection interval. We shouldn't find a
   // profile because the cache is full.
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
 
   EXPECT_TRUE(cached_profile_data_.empty());
 }
@@ -445,7 +444,7 @@
   sampled_profile->set_trigger_event(SampledProfile::PERIODIC_COLLECTION);
   heap_collector_->ParseAndSaveProfile(std::move(cat), kTempProfile,
                                        std::move(sampled_profile));
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Check that the profile was cached.
   ASSERT_EQ(1U, cached_profile_data_.size());
@@ -469,7 +468,7 @@
   HeapCollectorCollectionParamsTest() = default;
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(HeapCollectorCollectionParamsTest);
 };
diff --git a/chrome/browser/metrics/perf/metric_collector_unittest.cc b/chrome/browser/metrics/perf/metric_collector_unittest.cc
index 8876f119..88268b2 100644
--- a/chrome/browser/metrics/perf/metric_collector_unittest.cc
+++ b/chrome/browser/metrics/perf/metric_collector_unittest.cc
@@ -148,8 +148,7 @@
 class MetricCollectorTest : public testing::Test {
  public:
   MetricCollectorTest()
-      : test_browser_thread_bundle_(
-            base::test::TaskEnvironment::TimeSource::MOCK_TIME),
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
         perf_data_proto_(GetExamplePerfDataProto()),
         perf_stat_proto_(GetExamplePerfStatProto()) {}
 
@@ -183,10 +182,10 @@
   }
 
  protected:
-  // test_browser_thread_bundle_ must be the first member (or at least before
+  // task_environment_ must be the first member (or at least before
   // any member that cares about tasks) to be initialized first and destroyed
   // last.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::vector<SampledProfile> cached_profile_data_;
 
@@ -215,7 +214,7 @@
   metric_collector_->SaveSerializedPerfProto(
       std::move(sampled_profile),
       TestMetricCollector::PerfProtoType::PERF_TYPE_DATA, std::string());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(cached_profile_data_.empty());
 }
@@ -228,7 +227,7 @@
       std::move(sampled_profile),
       TestMetricCollector::PerfProtoType::PERF_TYPE_DATA,
       perf_data_proto_.SerializeAsString());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   ASSERT_EQ(1U, cached_profile_data_.size());
 
   const SampledProfile& profile = cached_profile_data_[0];
@@ -298,7 +297,7 @@
   metric_collector_->SaveSerializedPerfProto(
       std::move(sampled_profile),
       TestMetricCollector::PerfProtoType::PERF_TYPE_DATA, perf_data_string);
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_EQ(1U, cached_profile_data_.size());
 
@@ -354,7 +353,7 @@
       std::move(sampled_profile),
       TestMetricCollector::PerfProtoType::PERF_TYPE_STAT,
       perf_stat_proto_.SerializeAsString());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_EQ(1U, cached_profile_data_.size());
 
@@ -379,7 +378,7 @@
       std::move(sampled_profile),
       TestMetricCollector::PerfProtoType::PERF_TYPE_DATA,
       perf_data_proto_.SerializeAsString());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   sampled_profile = std::make_unique<SampledProfile>();
   sampled_profile->set_trigger_event(SampledProfile::RESTORE_SESSION);
@@ -388,7 +387,7 @@
       std::move(sampled_profile),
       TestMetricCollector::PerfProtoType::PERF_TYPE_STAT,
       perf_stat_proto_.SerializeAsString());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   sampled_profile = std::make_unique<SampledProfile>();
   sampled_profile->set_trigger_event(SampledProfile::RESUME_FROM_SUSPEND);
@@ -398,7 +397,7 @@
       std::move(sampled_profile),
       TestMetricCollector::PerfProtoType::PERF_TYPE_DATA,
       perf_data_proto_.SerializeAsString());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   sampled_profile = std::make_unique<SampledProfile>();
   sampled_profile->set_trigger_event(SampledProfile::PERIODIC_COLLECTION);
@@ -406,7 +405,7 @@
       std::move(sampled_profile),
       TestMetricCollector::PerfProtoType::PERF_TYPE_STAT,
       perf_stat_proto_.SerializeAsString());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_EQ(4U, cached_profile_data_.size());
 
@@ -463,7 +462,7 @@
   sampled_profile->set_trigger_event(SampledProfile::PERIODIC_COLLECTION);
 
   metric_collector_->CollectProfile(std::move(sampled_profile));
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(metric_collector_->IsRunning());
   EXPECT_FALSE(metric_collector_->login_time().is_null());
@@ -485,7 +484,7 @@
   EXPECT_TRUE(metric_collector_->IsRunning());
 
   // Fast forward the time by the max collection delay.
-  test_browser_thread_bundle_.FastForwardBy(kMaxCollectionDelay);
+  task_environment_.FastForwardBy(kMaxCollectionDelay);
 
   // Check that the SuspendDone trigger produced one profile.
   ASSERT_EQ(1U, cached_profile_data_.size());
@@ -506,11 +505,11 @@
   // collection interval forward by kPeriodicCollectionInterval. Since we had
   // a SuspendDone collection, we should not see any new profiles during the
   // next periodic collection interval, but see one in the following interval.
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval -
-                                            kMaxCollectionDelay);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval -
+                                  kMaxCollectionDelay);
   EXPECT_TRUE(cached_profile_data_.empty());
 
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
 
   ASSERT_EQ(1U, cached_profile_data_.size());
   const SampledProfile& profile2 = cached_profile_data_[0];
@@ -526,7 +525,7 @@
   EXPECT_TRUE(metric_collector_->IsRunning());
 
   // Fast forward the time by the max collection delay.
-  test_browser_thread_bundle_.FastForwardBy(kMaxCollectionDelay);
+  task_environment_.FastForwardBy(kMaxCollectionDelay);
 
   ASSERT_EQ(1U, cached_profile_data_.size());
 
@@ -546,7 +545,7 @@
   metric_collector_->ScheduleSessionRestoreCollection(1);
 
   // Fast forward the time by the max collection delay.
-  test_browser_thread_bundle_.FastForwardBy(kMaxCollectionDelay);
+  task_environment_.FastForwardBy(kMaxCollectionDelay);
   // This should find no new session restore profiles.
   EXPECT_TRUE(cached_profile_data_.empty());
 
@@ -554,12 +553,12 @@
   // collection interval forward by kPeriodicCollectionInterval. Since we had
   // a SessionRestore collection, we should not see any new profiles during the
   // current periodic collection interval, but see one in the next interval.
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval -
-                                            kMaxCollectionDelay * 2);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval -
+                                  kMaxCollectionDelay * 2);
   EXPECT_TRUE(cached_profile_data_.empty());
 
   // Advance clock another collection interval. We should find a profile.
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
   ASSERT_EQ(1U, cached_profile_data_.size());
   const SampledProfile& profile2 = cached_profile_data_[0];
   EXPECT_EQ(SampledProfile::PERIODIC_COLLECTION, profile2.trigger_event());
@@ -567,7 +566,7 @@
   // Advance the clock another periodic collection interval. This run should
   // include a new periodic collection, but no session restore.
   cached_profile_data_.clear();
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
   ASSERT_EQ(1U, cached_profile_data_.size());
   const SampledProfile& profile3 = cached_profile_data_[0];
   EXPECT_EQ(SampledProfile::PERIODIC_COLLECTION, profile3.trigger_event());
@@ -579,7 +578,7 @@
 
   // Advance the clock by a periodic collection interval. We must have a
   // periodic collection profile.
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
 
   ASSERT_EQ(1U, cached_profile_data_.size());
 
diff --git a/chrome/browser/metrics/perf/metric_provider_unittest.cc b/chrome/browser/metrics/perf/metric_provider_unittest.cc
index 255bbdbb..583c6848 100644
--- a/chrome/browser/metrics/perf/metric_provider_unittest.cc
+++ b/chrome/browser/metrics/perf/metric_provider_unittest.cc
@@ -87,8 +87,7 @@
 class MetricProviderTest : public testing::Test {
  public:
   MetricProviderTest()
-      : test_browser_thread_bundle_(
-            base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
 
   void SetUp() override {
     CollectionParams test_params;
@@ -104,16 +103,16 @@
     metric_provider_ = std::make_unique<MetricProvider>(
         std::make_unique<TestMetricCollector>(test_params));
     metric_provider_->Init();
-    test_browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   void TearDown() override { metric_provider_.reset(); }
 
  protected:
-  // test_browser_thread_bundle_ must be the first member (or at least before
+  // task_environment_ must be the first member (or at least before
   // any member that cares about tasks) to be initialized first and destroyed
   // last.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<MetricProvider> metric_provider_;
 
@@ -128,7 +127,7 @@
 }
 
 TEST_F(MetricProviderTest, DisabledBeforeLogin) {
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
 
   // There are no cached profiles after a profiling interval.
   std::vector<SampledProfile> stored_profiles;
@@ -138,7 +137,7 @@
 
 TEST_F(MetricProviderTest, EnabledOnLogin) {
   metric_provider_->OnUserLoggedIn();
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
 
   // We should find a cached PERIODIC_COLLECTION profile after a profiling
   // interval.
@@ -156,10 +155,10 @@
 
 TEST_F(MetricProviderTest, DisabledOnDeactivate) {
   metric_provider_->OnUserLoggedIn();
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   metric_provider_->Deactivate();
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
 
   // There are no cached profiles after a profiling interval.
   std::vector<SampledProfile> stored_profiles;
@@ -169,14 +168,14 @@
 
 TEST_F(MetricProviderTest, SuspendDone) {
   metric_provider_->OnUserLoggedIn();
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   const auto kSuspendDuration = base::TimeDelta::FromMinutes(3);
 
   metric_provider_->SuspendDone(kSuspendDuration);
 
   // Fast forward the time by the max collection delay.
-  test_browser_thread_bundle_.FastForwardBy(kMaxCollectionDelay);
+  task_environment_.FastForwardBy(kMaxCollectionDelay);
 
   // Check that the SuspendDone trigger produced one profile.
   std::vector<SampledProfile> stored_profiles;
@@ -193,14 +192,14 @@
 
 TEST_F(MetricProviderTest, OnSessionRestoreDone) {
   metric_provider_->OnUserLoggedIn();
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   const int kRestoredTabs = 7;
 
   metric_provider_->OnSessionRestoreDone(kRestoredTabs);
 
   // Fast forward the time by the max collection delay.
-  test_browser_thread_bundle_.FastForwardBy(kMaxCollectionDelay);
+  task_environment_.FastForwardBy(kMaxCollectionDelay);
 
   std::vector<SampledProfile> stored_profiles;
   EXPECT_TRUE(metric_provider_->GetSampledProfiles(&stored_profiles));
diff --git a/chrome/browser/metrics/perf/perf_events_collector_unittest.cc b/chrome/browser/metrics/perf/perf_events_collector_unittest.cc
index 2fe1d6d..a1c4628 100644
--- a/chrome/browser/metrics/perf/perf_events_collector_unittest.cc
+++ b/chrome/browser/metrics/perf/perf_events_collector_unittest.cc
@@ -165,8 +165,7 @@
 class PerfCollectorTest : public testing::Test {
  public:
   PerfCollectorTest()
-      : test_browser_thread_bundle_(
-            base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
 
   void SaveProfile(std::unique_ptr<SampledProfile> sampled_profile) {
     cached_profile_data_.resize(cached_profile_data_.size() + 1);
@@ -193,10 +192,10 @@
   }
 
  protected:
-  // test_browser_thread_bundle_ must be the first member (or at least before
+  // task_environment_ must be the first member (or at least before
   // any member that cares about tasks) to be initialized first and destroyed
   // last.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::vector<SampledProfile> cached_profile_data_;
 
@@ -213,7 +212,7 @@
                    ->IncognitoLaunched());
   EXPECT_TRUE(TestIncognitoObserver::CreateWithIncognitoLaunched(true)
                   ->IncognitoLaunched());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_GT(perf_collector_->max_frequencies_mhz().size(), 0u);
 }
 
@@ -225,7 +224,7 @@
 
   // Advance the clock by a periodic collection interval. We shouldn't find a
   // profile because the cache is full.
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
   EXPECT_TRUE(cached_profile_data_.empty());
 }
 
@@ -236,7 +235,7 @@
   PerfStatProto perf_stat_proto = GetExamplePerfStatProto();
   EXPECT_GT(perf_data_proto.ByteSize(), 0);
   EXPECT_GT(perf_stat_proto.ByteSize(), 0);
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   auto sampled_profile = std::make_unique<SampledProfile>();
   sampled_profile->set_trigger_event(SampledProfile::PERIODIC_COLLECTION);
@@ -248,11 +247,11 @@
       TestPerfCollector::PerfProtoType::PERF_TYPE_DATA, true,
       perf_data_proto.SerializeAsString());
 
-  // Run the TestBrowserThreadBundle queue until it's empty as the above
+  // Run the BrowserTaskEnvironment queue until it's empty as the above
   // ParseOutputProtoIfValid call posts a task to asynchronously collect process
   // and thread types and the profile cache will be updated asynchronously via
   // another PostTask request after this collection completes.
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_EQ(1U, cached_profile_data_.size());
 
@@ -275,7 +274,7 @@
       std::move(incognito_observer), std::move(sampled_profile),
       TestPerfCollector::PerfProtoType::PERF_TYPE_STAT, false,
       perf_stat_proto.SerializeAsString());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_EQ(1U, cached_profile_data_.size());
 
@@ -298,7 +297,7 @@
       std::move(incognito_observer), std::move(sampled_profile),
       TestPerfCollector::PerfProtoType::PERF_TYPE_DATA, true,
       perf_data_proto.SerializeAsString());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(cached_profile_data_.empty());
 
@@ -310,7 +309,7 @@
       std::move(incognito_observer), std::move(sampled_profile),
       TestPerfCollector::PerfProtoType::PERF_TYPE_STAT, false,
       perf_stat_proto.SerializeAsString());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(cached_profile_data_.empty());
 
@@ -325,7 +324,7 @@
       std::move(incognito_observer), std::move(sampled_profile),
       TestPerfCollector::PerfProtoType::PERF_TYPE_DATA, true,
       perf_data_proto.SerializeAsString());
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_EQ(1U, cached_profile_data_.size());
 
@@ -653,7 +652,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::FieldTrialList field_trial_list_;
 
diff --git a/chrome/browser/metrics/perf/profile_provider_chromeos_unittest.cc b/chrome/browser/metrics/perf/profile_provider_chromeos_unittest.cc
index e3ed2bd6..8cea968 100644
--- a/chrome/browser/metrics/perf/profile_provider_chromeos_unittest.cc
+++ b/chrome/browser/metrics/perf/profile_provider_chromeos_unittest.cc
@@ -145,8 +145,7 @@
 class ProfileProviderTest : public testing::Test {
  public:
   ProfileProviderTest()
-      : test_browser_thread_bundle_(
-            base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
 
   void SetUp() override {
     // ProfileProvider requires chromeos::LoginState and
@@ -165,10 +164,10 @@
   }
 
  protected:
-  // test_browser_thread_bundle_ must be the first member (or at least before
+  // task_environment_ must be the first member (or at least before
   // any member that cares about tasks) to be initialized first and destroyed
   // last.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestProfileProvider> profile_provider_;
 
@@ -186,7 +185,7 @@
 
 TEST_F(ProfileProviderTest, UserLoginLogout) {
   // No user is logged in, so no collection is scheduled to run.
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
 
   std::vector<SampledProfile> stored_profiles;
   EXPECT_FALSE(profile_provider_->GetSampledProfiles(&stored_profiles));
@@ -200,7 +199,7 @@
 
   // Run all pending tasks. SetLoggedInState has activated timers for periodic
   // collection causing timer based pending tasks.
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
   // We should find two profiles, one for each collector.
   EXPECT_TRUE(profile_provider_->GetSampledProfiles(&stored_profiles));
   ExpectTwoStoredPerfProfiles<SampledProfile::PERIODIC_COLLECTION>(
@@ -212,7 +211,7 @@
       chromeos::LoginState::LOGGED_IN_NONE,
       chromeos::LoginState::LOGGED_IN_USER_NONE);
   // Run all pending tasks.
-  test_browser_thread_bundle_.FastForwardBy(kPeriodicCollectionInterval);
+  task_environment_.FastForwardBy(kPeriodicCollectionInterval);
   // We should find no new profiles.
   stored_profiles.clear();
   EXPECT_FALSE(profile_provider_->GetSampledProfiles(&stored_profiles));
@@ -223,7 +222,7 @@
   // No user is logged in, so no collection is done on resume from suspend.
   profile_provider_->SuspendDone(base::TimeDelta::FromMinutes(10));
   // Run all pending tasks.
-  test_browser_thread_bundle_.FastForwardBy(kMaxCollectionDelay);
+  task_environment_.FastForwardBy(kMaxCollectionDelay);
 
   std::vector<SampledProfile> stored_profiles;
   EXPECT_FALSE(profile_provider_->GetSampledProfiles(&stored_profiles));
@@ -243,7 +242,7 @@
   // Trigger a canceled suspend (zero sleep duration).
   profile_provider_->SuspendDone(base::TimeDelta::FromSeconds(0));
   // Run all pending tasks.
-  test_browser_thread_bundle_.FastForwardBy(kMaxCollectionDelay);
+  task_environment_.FastForwardBy(kMaxCollectionDelay);
 
   // We should find no profiles.
   std::vector<SampledProfile> stored_profiles;
@@ -261,7 +260,7 @@
   // Trigger a resume from suspend.
   profile_provider_->SuspendDone(base::TimeDelta::FromMinutes(10));
   // Run all pending tasks.
-  test_browser_thread_bundle_.FastForwardBy(kMaxCollectionDelay);
+  task_environment_.FastForwardBy(kMaxCollectionDelay);
 
   // We should find two profiles, one for each collector.
   std::vector<SampledProfile> stored_profiles;
@@ -274,7 +273,7 @@
   // No user is logged in, so no collection is done on session restore.
   profile_provider_->OnSessionRestoreDone(10);
   // Run all pending tasks.
-  test_browser_thread_bundle_.FastForwardBy(kMaxCollectionDelay);
+  task_environment_.FastForwardBy(kMaxCollectionDelay);
 
   std::vector<SampledProfile> stored_profiles;
   EXPECT_FALSE(profile_provider_->GetSampledProfiles(&stored_profiles));
@@ -294,7 +293,7 @@
   // Trigger a session restore.
   profile_provider_->OnSessionRestoreDone(10);
   // Run all pending tasks.
-  test_browser_thread_bundle_.FastForwardBy(kMaxCollectionDelay);
+  task_environment_.FastForwardBy(kMaxCollectionDelay);
 
   // We should find two profiles, one for each collector.
   std::vector<SampledProfile> stored_profiles;
@@ -333,7 +332,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(ProfileProviderFeatureParamsTest);
@@ -360,7 +359,7 @@
   // Before destroying ScopedFeatureList, we need to finish SetUp() of each
   // registered collector, which accesses field trial params on its own
   // dedicated sequence.
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 TEST_F(ProfileProviderFeatureParamsTest, HeapCollectorEnabled) {
@@ -389,7 +388,7 @@
   // Before destroying ScopedFeatureList, we need to finish SetUp() of each
   // registered collector, which accesses field trial params on its own
   // dedicated sequence.
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 }  // namespace metrics
diff --git a/chrome/browser/metrics/perf/windowed_incognito_observer_unittest.cc b/chrome/browser/metrics/perf/windowed_incognito_observer_unittest.cc
index 9e665424..7554fb3 100644
--- a/chrome/browser/metrics/perf/windowed_incognito_observer_unittest.cc
+++ b/chrome/browser/metrics/perf/windowed_incognito_observer_unittest.cc
@@ -85,7 +85,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // The associated testing browser profile.
   std::unique_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/metrics/plugin_metrics_provider_unittest.cc b/chrome/browser/metrics/plugin_metrics_provider_unittest.cc
index 3ae25560..48a5fb4 100644
--- a/chrome/browser/metrics/plugin_metrics_provider_unittest.cc
+++ b/chrome/browser/metrics/plugin_metrics_provider_unittest.cc
@@ -66,7 +66,7 @@
 }
 
 TEST_F(PluginMetricsProviderTest, Plugins) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   PluginMetricsProvider provider(prefs());
 
@@ -118,7 +118,7 @@
 }
 
 TEST_F(PluginMetricsProviderTest, RecordCurrentStateWithDelay) {
-  content::TestBrowserThreadBundle thread_bundle(
+  content::BrowserTaskEnvironment task_environment(
       base::test::TaskEnvironment::TimeSource::MOCK_TIME);
 
   PluginMetricsProvider provider(prefs());
@@ -126,14 +126,14 @@
   EXPECT_TRUE(provider.RecordCurrentStateWithDelay());
   EXPECT_FALSE(provider.RecordCurrentStateWithDelay());
 
-  thread_bundle.FastForwardBy(PluginMetricsProvider::GetRecordStateDelay());
+  task_environment.FastForwardBy(PluginMetricsProvider::GetRecordStateDelay());
   base::RunLoop().RunUntilIdle();
 
   EXPECT_TRUE(provider.RecordCurrentStateWithDelay());
 }
 
 TEST_F(PluginMetricsProviderTest, RecordCurrentStateIfPending) {
-  content::TestBrowserThreadBundle thread_bundle(
+  content::BrowserTaskEnvironment task_environment(
       base::test::TaskEnvironment::TimeSource::MOCK_TIME);
 
   PluginMetricsProvider provider(prefs());
@@ -152,7 +152,7 @@
 }
 
 TEST_F(PluginMetricsProviderTest, ProvideStabilityMetricsWhenPendingTask) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   PluginMetricsProvider provider(prefs());
 
diff --git a/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc b/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
index 8b981cd2..6070aae 100644
--- a/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
+++ b/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
@@ -618,7 +618,7 @@
     EXPECT_EQ(expected.size() + expected_total_memory_entries, entries.size());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ukm::TestAutoSetUkmRecorder test_ukm_recorder_;
 
  private:
diff --git a/chrome/browser/metrics/subprocess_metrics_provider_unittest.cc b/chrome/browser/metrics/subprocess_metrics_provider_unittest.cc
index f60583b..58923485 100644
--- a/chrome/browser/metrics/subprocess_metrics_provider_unittest.cc
+++ b/chrome/browser/metrics/subprocess_metrics_provider_unittest.cc
@@ -109,7 +109,7 @@
   // A thread-bundle makes the tests appear on the UI thread, something that is
   // checked in methods called from the SubprocessMetricsProvider class under
   // test. This must be constructed before the |provider_| field.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   SubprocessMetricsProvider provider_;
   std::unique_ptr<base::StatisticsRecorder> test_recorder_;
diff --git a/chrome/browser/metrics/thread_watcher_android_unittest.cc b/chrome/browser/metrics/thread_watcher_android_unittest.cc
index 926f30a5..121a3413 100644
--- a/chrome/browser/metrics/thread_watcher_android_unittest.cc
+++ b/chrome/browser/metrics/thread_watcher_android_unittest.cc
@@ -42,7 +42,7 @@
   // Do not delay the ThreadWatcherList initialization for this test.
   ThreadWatcherList::g_initialize_delay_seconds = 0;
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   std::unique_ptr<WatchDogThread> watchdog_thread_(new WatchDogThread());
   watchdog_thread_->StartAndWaitForTesting();
diff --git a/chrome/browser/metrics/thread_watcher_unittest.cc b/chrome/browser/metrics/thread_watcher_unittest.cc
index 6c2cf9f2..3cb731bf 100644
--- a/chrome/browser/metrics/thread_watcher_unittest.cc
+++ b/chrome/browser/metrics/thread_watcher_unittest.cc
@@ -305,11 +305,11 @@
   ThreadWatcherList* thread_watcher_list_;
 
   ThreadWatcherTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD),
         setup_complete_(&lock_),
         initialized_(false) {
     // Make sure UI and IO threads are started and ready.
-    thread_bundle_.RunIOThreadUntilIdle();
+    task_environment_.RunIOThreadUntilIdle();
 
     watchdog_thread_.reset(new WatchDogThread());
     watchdog_thread_->StartAndWaitForTesting();
@@ -371,7 +371,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::Lock lock_;
   base::ConditionVariable setup_complete_;
   bool initialized_;
@@ -706,7 +706,7 @@
     }
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::Lock lock_;
   base::ConditionVariable done_;
 
diff --git a/chrome/browser/native_file_system/chrome_native_file_system_permission_context_unittest.cc b/chrome/browser/native_file_system/chrome_native_file_system_permission_context_unittest.cc
index bfa9ec3..96a1eab6 100644
--- a/chrome/browser/native_file_system/chrome_native_file_system_permission_context_unittest.cc
+++ b/chrome/browser/native_file_system/chrome_native_file_system_permission_context_unittest.cc
@@ -114,7 +114,7 @@
   const base::FilePath kTestPath =
       base::FilePath(FILE_PATH_LITERAL("/foo/bar"));
 
-  content::TestBrowserThreadBundle task_environment_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir temp_dir_;
   scoped_refptr<ChromeNativeFileSystemPermissionContext> permission_context_;
   content::RenderViewHostTestEnabler render_view_host_test_enabler_;
diff --git a/chrome/browser/net/dns_probe_runner_unittest.cc b/chrome/browser/net/dns_probe_runner_unittest.cc
index cc0e6dc9..7599a13 100644
--- a/chrome/browser/net/dns_probe_runner_unittest.cc
+++ b/chrome/browser/net/dns_probe_runner_unittest.cc
@@ -16,7 +16,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 
 using base::RunLoop;
-using content::TestBrowserThreadBundle;
+using content::BrowserTaskEnvironment;
 
 namespace chrome_browser_net {
 
@@ -97,7 +97,7 @@
     return network_context_.get();
   }
 
-  TestBrowserThreadBundle bundle_;
+  BrowserTaskEnvironment bundle_;
   std::unique_ptr<network::mojom::NetworkContext> network_context_;
   std::unique_ptr<DnsProbeRunner> runner_;
 };
diff --git a/chrome/browser/net/dns_probe_service_factory_unittest.cc b/chrome/browser/net/dns_probe_service_factory_unittest.cc
index e6c6edd3..08c09e2 100644
--- a/chrome/browser/net/dns_probe_service_factory_unittest.cc
+++ b/chrome/browser/net/dns_probe_service_factory_unittest.cc
@@ -21,7 +21,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 
 using base::RunLoop;
-using content::TestBrowserThreadBundle;
+using content::BrowserTaskEnvironment;
 using error_page::DnsProbeStatus;
 
 namespace chrome_browser_net {
@@ -98,7 +98,7 @@
   }
 
   base::SimpleTestTickClock tick_clock_;
-  TestBrowserThreadBundle bundle_;
+  BrowserTaskEnvironment bundle_;
   std::unique_ptr<FakeHostResolverNetworkContext> network_context_;
   std::unique_ptr<FakeDnsConfigChangeManager> dns_config_change_manager_;
   std::unique_ptr<DnsProbeService> service_;
diff --git a/chrome/browser/net/trial_comparison_cert_verifier_controller_unittest.cc b/chrome/browser/net/trial_comparison_cert_verifier_controller_unittest.cc
index d64e19b..cf4f3f39 100644
--- a/chrome/browser/net/trial_comparison_cert_verifier_controller_unittest.cc
+++ b/chrome/browser/net/trial_comparison_cert_verifier_controller_unittest.cc
@@ -208,7 +208,7 @@
  private:
   scoped_refptr<CertificateReportingServiceTestHelper>
       reporting_service_test_helper_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<safe_browsing::SafeBrowsingService> sb_service_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   TestingProfile* profile_;
diff --git a/chrome/browser/notifications/chrome_ash_message_center_client_unittest.cc b/chrome/browser/notifications/chrome_ash_message_center_client_unittest.cc
index f8e0f0b..7fc259e 100644
--- a/chrome/browser/notifications/chrome_ash_message_center_client_unittest.cc
+++ b/chrome/browser/notifications/chrome_ash_message_center_client_unittest.cc
@@ -103,7 +103,7 @@
         user_manager::UserManager::Get());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager testing_profile_manager_;
   std::unique_ptr<ChromeAshMessageCenterClient> client_;
   std::unique_ptr<user_manager::ScopedUserManager> user_manager_enabler_;
diff --git a/chrome/browser/notifications/notification_channels_provider_android_unittest.cc b/chrome/browser/notifications/notification_channels_provider_android_unittest.cc
index 970529f..e509f7d8 100644
--- a/chrome/browser/notifications/notification_channels_provider_android_unittest.cc
+++ b/chrome/browser/notifications/notification_channels_provider_android_unittest.cc
@@ -149,7 +149,7 @@
     return ContentSettingsPattern::FromURLNoWildcard(GURL(kTestOrigin));
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::test::ScopedFeatureList scoped_feature_list_;
   std::unique_ptr<TestingProfile> profile_;
 
diff --git a/chrome/browser/notifications/notification_platform_bridge_chromeos_unittest.cc b/chrome/browser/notifications/notification_platform_bridge_chromeos_unittest.cc
index 12ff3d9..bc42f448 100644
--- a/chrome/browser/notifications/notification_platform_bridge_chromeos_unittest.cc
+++ b/chrome/browser/notifications/notification_platform_bridge_chromeos_unittest.cc
@@ -16,7 +16,7 @@
 // Regression test for https://crbug.com/840105
 TEST(NotificationPlatformBridgeChromeOsTest, Update) {
   message_center::MessageCenter::Initialize();
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile profile;
   NotificationPlatformBridgeChromeOs bridge;
 
diff --git a/chrome/browser/notifications/notification_platform_bridge_win_unittest.cc b/chrome/browser/notifications/notification_platform_bridge_win_unittest.cc
index dda24ae7c..7774778 100644
--- a/chrome/browser/notifications/notification_platform_bridge_win_unittest.cc
+++ b/chrome/browser/notifications/notification_platform_bridge_win_unittest.cc
@@ -49,7 +49,7 @@
 class NotificationPlatformBridgeWinTest : public testing::Test {
  public:
   NotificationPlatformBridgeWinTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
 
   ~NotificationPlatformBridgeWinTest() override = default;
 
@@ -91,7 +91,7 @@
     return toast2;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeWinTest);
diff --git a/chrome/browser/notifications/notification_system_observer_unittest.cc b/chrome/browser/notifications/notification_system_observer_unittest.cc
index 126efd39..a8fd3247 100644
--- a/chrome/browser/notifications/notification_system_observer_unittest.cc
+++ b/chrome/browser/notifications/notification_system_observer_unittest.cc
@@ -44,7 +44,7 @@
   StubNotificationUIManager* ui_manager() { return ui_manager_.get(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   TestingProfile* profile_ = nullptr;
   std::unique_ptr<StubNotificationUIManager> ui_manager_;
diff --git a/chrome/browser/notifications/notification_trigger_scheduler_unittest.cc b/chrome/browser/notifications/notification_trigger_scheduler_unittest.cc
index 8c369a5..3f614c01 100644
--- a/chrome/browser/notifications/notification_trigger_scheduler_unittest.cc
+++ b/chrome/browser/notifications/notification_trigger_scheduler_unittest.cc
@@ -38,7 +38,7 @@
 class NotificationTriggerSchedulerTest : public testing::Test {
  protected:
   NotificationTriggerSchedulerTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
 
   class ProfileTestData {
    public:
@@ -58,7 +58,7 @@
     MockNotificationTriggerScheduler* scheduler_;
   };
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(NotificationTriggerSchedulerTest,
@@ -92,6 +92,6 @@
   EXPECT_CALL(*data2.scheduler_,
               TriggerNotificationsForStoragePartition(partition2));
 
-  thread_bundle_.FastForwardBy(delta);
+  task_environment_.FastForwardBy(delta);
   base::RunLoop().RunUntilIdle();
 }
diff --git a/chrome/browser/notifications/persistent_notification_handler_unittest.cc b/chrome/browser/notifications/persistent_notification_handler_unittest.cc
index 9e0433f..e7d973d 100644
--- a/chrome/browser/notifications/persistent_notification_handler_unittest.cc
+++ b/chrome/browser/notifications/persistent_notification_handler_unittest.cc
@@ -86,7 +86,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileWithPermissionManager profile_;
   NotificationDisplayServiceTester display_service_tester_;
 
diff --git a/chrome/browser/notifications/platform_notification_service_unittest.cc b/chrome/browser/notifications/platform_notification_service_unittest.cc
index a0f5b5f..d00e88b 100644
--- a/chrome/browser/notifications/platform_notification_service_unittest.cc
+++ b/chrome/browser/notifications/platform_notification_service_unittest.cc
@@ -111,7 +111,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 
   std::unique_ptr<NotificationDisplayServiceTester> display_service_tester_;
diff --git a/chrome/browser/offline_pages/android/offline_page_auto_fetcher_service_unittest.cc b/chrome/browser/offline_pages/android/offline_page_auto_fetcher_service_unittest.cc
index 4f577764..6ab5f460 100644
--- a/chrome/browser/offline_pages/android/offline_page_auto_fetcher_service_unittest.cc
+++ b/chrome/browser/offline_pages/android/offline_page_auto_fetcher_service_unittest.cc
@@ -69,7 +69,7 @@
   }
 
   void TearDown() override {
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     service_.reset();
   }
   RequestCoordinator* request_coordinator() {
@@ -89,13 +89,13 @@
           completed = true;
           result = std::move(requests);
         }));
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     CHECK(completed);
     return result;
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   MockDelegate delegate_;
   TestOfflinePageModel offline_page_model_;
 
@@ -111,7 +111,7 @@
               Run(OfflinePageAutoFetcherScheduleResult::kScheduled));
   service_->TrySchedule(false, GURL("http://foo.com"), kTabId,
                         result_callback.Get());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(1ul, GetRequestsSync().size());
 }
 
@@ -123,7 +123,7 @@
               Run(OfflinePageAutoFetcherScheduleResult::kOtherError));
   service_->TrySchedule(false, GURL("ftp://foo.com"), kTabId,
                         result_callback.Get());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(0ul, GetRequestsSync().size());
 }
 
@@ -142,7 +142,7 @@
                         result_callback.Get());
   service_->TrySchedule(false, GURL("http://foo.com#Z"), kTabId,
                         result_callback.Get());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(1ul, GetRequestsSync().size());
 }
 
@@ -177,7 +177,7 @@
   service_->TrySchedule(true, GURL("http://foo.com/5"), kTabId,
                         result_callback.Get());
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 TEST_F(OfflinePageAutoFetcherServiceTest,
@@ -196,30 +196,30 @@
                         result_callback.Get());
   service_->TrySchedule(true, GURL("http://foo.com/4"), kTabId,
                         result_callback.Get());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 TEST_F(OfflinePageAutoFetcherServiceTest, CancelSuccess) {
   service_->TrySchedule(false, GURL("http://foo.com"), kTabId,
                         base::DoNothing());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   service_->CancelSchedule(GURL("http://foo.com"));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(0ul, GetRequestsSync().size());
 }
 
 TEST_F(OfflinePageAutoFetcherServiceTest, CancelNotExist) {
   service_->TrySchedule(false, GURL("http://foo.com"), kTabId,
                         base::DoNothing());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   service_->CancelSchedule(GURL("http://NOT-FOO.com"));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(1ul, GetRequestsSync().size());
 }
 
 TEST_F(OfflinePageAutoFetcherServiceTest, CancelQueueEmpty) {
   service_->CancelSchedule(GURL("http://foo.com"));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 // Simulate a completed auto fetch request, and verify that
@@ -239,7 +239,7 @@
                              kTestRequest.url().spec(), kTabId, kOfflineId));
   service_->OnCompleted(kTestRequest,
                         RequestNotifier::BackgroundSavePageResult::SUCCESS);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 // Simulate a failed auto-fetch request, and verify that
@@ -249,7 +249,7 @@
   EXPECT_CALL(offline_page_model_, GetPageByOfflineId_(_)).Times(0);
   service_->OnCompleted(
       kTestRequest, RequestNotifier::BackgroundSavePageResult::LOADING_FAILURE);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 // Simulate a completed non-auto-fetch request, and verify that
@@ -261,7 +261,7 @@
   service_->OnCompleted(kTestRequest,
                         RequestNotifier::BackgroundSavePageResult::SUCCESS);
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 }  // namespace
diff --git a/chrome/browser/offline_pages/background_loader_offliner_unittest.cc b/chrome/browser/offline_pages/background_loader_offliner_unittest.cc
index 8b6f3cf..67de9a7e 100644
--- a/chrome/browser/offline_pages/background_loader_offliner_unittest.cc
+++ b/chrome/browser/offline_pages/background_loader_offliner_unittest.cc
@@ -282,7 +282,7 @@
   void OnProgress(const SavePageRequest& request, int64_t bytes);
   void OnCancel(const SavePageRequest& request);
   void OnCanDownload(bool allowed);
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::RenderViewHostTestEnabler rvhte_;
   TestingProfile profile_;
   std::unique_ptr<OfflinerPolicy> policy_;
@@ -301,7 +301,7 @@
 };
 
 BackgroundLoaderOfflinerTest::BackgroundLoaderOfflinerTest()
-    : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+    : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
       load_termination_listener_(nullptr),
       model_(nullptr),
       completion_callback_called_(false),
diff --git a/chrome/browser/offline_pages/download_archive_manager_unittest.cc b/chrome/browser/offline_pages/download_archive_manager_unittest.cc
index 8528bd4..95f50177 100644
--- a/chrome/browser/offline_pages/download_archive_manager_unittest.cc
+++ b/chrome/browser/offline_pages/download_archive_manager_unittest.cc
@@ -35,7 +35,7 @@
   DownloadArchiveManager* archive_manager() { return archive_manager_.get(); }
 
  private:
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   sync_preferences::TestingPrefServiceSyncable prefs_;
   std::unique_ptr<DownloadArchiveManager> archive_manager_;
   DISALLOW_COPY_AND_ASSIGN(DownloadArchiveManagerTest);
diff --git a/chrome/browser/offline_pages/offline_page_mhtml_archiver_unittest.cc b/chrome/browser/offline_pages/offline_page_mhtml_archiver_unittest.cc
index b9c0de2..afd57dfe 100644
--- a/chrome/browser/offline_pages/offline_page_mhtml_archiver_unittest.cc
+++ b/chrome/browser/offline_pages/offline_page_mhtml_archiver_unittest.cc
@@ -159,7 +159,7 @@
                            int64_t file_size,
                            const std::string& digest);
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::FilePath archive_dir_path_;
   base::HistogramTester histogram_tester_;
 
@@ -177,7 +177,7 @@
 };
 
 OfflinePageMHTMLArchiverTest::OfflinePageMHTMLArchiverTest()
-    : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
+    : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD),
       last_result_(OfflinePageArchiver::ArchiverResult::ERROR_DEVICE_FULL),
       last_file_size_(0L) {}
 
diff --git a/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc b/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc
index 6cffebb..397d409 100644
--- a/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc
+++ b/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc
@@ -418,7 +418,7 @@
   void CreateFileWithContentOnIO(const std::string& content,
                                  const base::Closure& callback);
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   TestingProfile* profile_;
   std::unique_ptr<content::WebContents> web_contents_;
@@ -435,7 +435,7 @@
   // fresh GCM token automatically. These two lines mock out InstanceID (the
   // component which actually requests the token from play services). Without
   // this, each test takes an extra 30s waiting on the token (because
-  // content::TestBrowserThreadBundle tries to finish all pending tasks before
+  // content::BrowserTaskEnvironment tries to finish all pending tasks before
   // ending the test).
   instance_id::InstanceIDAndroid::ScopedBlockOnAsyncTasksForTesting
       block_async_;
@@ -464,7 +464,7 @@
 };
 
 OfflinePageRequestHandlerTest::OfflinePageRequestHandlerTest()
-    : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
+    : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD),
       profile_manager_(TestingBrowserProcess::GetGlobal()),
       last_offline_id_(0),
       response_(net::ERR_IO_PENDING),
diff --git a/chrome/browser/offline_pages/offline_page_utils_unittest.cc b/chrome/browser/offline_pages/offline_page_utils_unittest.cc
index 5f06667..abd677cd 100644
--- a/chrome/browser/offline_pages/offline_page_utils_unittest.cc
+++ b/chrome/browser/offline_pages/offline_page_utils_unittest.cc
@@ -126,7 +126,7 @@
       const base::FilePath& file_name);
 
   TestScopedOfflineClock clock_;
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   int64_t offline_id_;
   GURL url_;
   TestingProfile profile_;
@@ -139,7 +139,7 @@
   // fresh GCM token automatically. These two lines mock out InstanceID (the
   // component which actually requests the token from play services). Without
   // this, each test takes an extra 30s waiting on the token (because
-  // content::TestBrowserThreadBundle tries to finish all pending tasks before
+  // content::BrowserTaskEnvironment tries to finish all pending tasks before
   // ending the test).
   instance_id::InstanceIDAndroid::ScopedBlockOnAsyncTasksForTesting
       block_async_;
diff --git a/chrome/browser/offline_pages/prefetch/prefetch_background_task_handler_impl_unittest.cc b/chrome/browser/offline_pages/prefetch/prefetch_background_task_handler_impl_unittest.cc
index 58d7803c..bfb354d 100644
--- a/chrome/browser/offline_pages/prefetch/prefetch_background_task_handler_impl_unittest.cc
+++ b/chrome/browser/offline_pages/prefetch/prefetch_background_task_handler_impl_unittest.cc
@@ -36,7 +36,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
   std::unique_ptr<PrefetchBackgroundTaskHandlerImpl> task_handler_;
diff --git a/chrome/browser/offline_pages/prefetch/prefetch_instance_id_proxy_unittest.cc b/chrome/browser/offline_pages/prefetch/prefetch_instance_id_proxy_unittest.cc
index 236d5462..bce8e33 100644
--- a/chrome/browser/offline_pages/prefetch/prefetch_instance_id_proxy_unittest.cc
+++ b/chrome/browser/offline_pages/prefetch/prefetch_instance_id_proxy_unittest.cc
@@ -47,7 +47,7 @@
  private:
   void GetTokenCompleted(const std::string& token, InstanceID::Result result);
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<PrefetchInstanceIDProxy> proxy_;
 
diff --git a/chrome/browser/optimization_guide/optimization_guide_hints_manager_unittest.cc b/chrome/browser/optimization_guide/optimization_guide_hints_manager_unittest.cc
index 274c1b7..7b145e35 100644
--- a/chrome/browser/optimization_guide/optimization_guide_hints_manager_unittest.cc
+++ b/chrome/browser/optimization_guide/optimization_guide_hints_manager_unittest.cc
@@ -187,7 +187,7 @@
     }
     optimization_guide_service_ =
         std::make_unique<TestOptimizationGuideService>(
-            browser_thread_bundle_.GetMainThreadTaskRunner());
+            task_environment_.GetMainThreadTaskRunner());
     pref_service_ = std::make_unique<TestingPrefServiceSimple>();
     optimization_guide::prefs::RegisterProfilePrefs(pref_service_->registry());
 
@@ -198,7 +198,7 @@
     hints_manager_ = std::make_unique<OptimizationGuideHintsManager>(
         optimization_guide_service_.get(), temp_dir(), pref_service_.get(),
         db_provider_.get(), top_host_provider, url_loader_factory_);
-    hints_manager_->SetClockForTesting(browser_thread_bundle_.GetMockClock());
+    hints_manager_->SetClockForTesting(task_environment_.GetMockClock());
 
     // Add observer is called after the HintCache is fully initialized,
     // indicating that the OptimizationGuideHintsManager is ready to process
@@ -275,7 +275,7 @@
   }
 
   void MoveClockForwardBy(base::TimeDelta time_delta) {
-    browser_thread_bundle_.FastForwardBy(time_delta);
+    task_environment_.FastForwardBy(time_delta);
     RunUntilIdle();
   }
 
@@ -297,7 +297,7 @@
 
  protected:
   void RunUntilIdle() {
-    browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     base::RunLoop().RunUntilIdle();
   }
 
@@ -311,7 +311,7 @@
                               serialized_config.size()));
   }
 
-  content::TestBrowserThreadBundle browser_thread_bundle_ = {
+  content::BrowserTaskEnvironment task_environment_ = {
       base::test::TaskEnvironment::MainThreadType::UI,
       base::test::TaskEnvironment::TimeSource::MOCK_TIME};
 
diff --git a/chrome/browser/performance_manager/performance_manager_tab_helper_unittest.cc b/chrome/browser/performance_manager/performance_manager_tab_helper_unittest.cc
index 3154e97..80dca0ad 100644
--- a/chrome/browser/performance_manager/performance_manager_tab_helper_unittest.cc
+++ b/chrome/browser/performance_manager/performance_manager_tab_helper_unittest.cc
@@ -192,7 +192,7 @@
   DeleteContents();
 
   // Allow content/ to settle.
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   size_t num_hosts = CountAllRenderProcessHosts();
 
@@ -203,7 +203,7 @@
         ASSERT_EQ(0u, graph->GetAllPageNodeImpls().size());
       }));
 
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 }
 
 namespace {
diff --git a/chrome/browser/performance_manager/performance_manager_test_harness.cc b/chrome/browser/performance_manager/performance_manager_test_harness.cc
index df41d80..41fd230 100644
--- a/chrome/browser/performance_manager/performance_manager_test_harness.cc
+++ b/chrome/browser/performance_manager/performance_manager_test_harness.cc
@@ -20,7 +20,7 @@
 void PerformanceManagerTestHarness::TearDown() {
   // Have the performance manager destroy itself.
   PerformanceManager::Destroy(std::move(perf_man_));
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   Super::TearDown();
 }
diff --git a/chrome/browser/performance_manager/persistence/site_data/non_recording_site_data_cache_unittest.cc b/chrome/browser/performance_manager/persistence/site_data/non_recording_site_data_cache_unittest.cc
index d191d304..38a04618 100644
--- a/chrome/browser/performance_manager/persistence/site_data/non_recording_site_data_cache_unittest.cc
+++ b/chrome/browser/performance_manager/persistence/site_data/non_recording_site_data_cache_unittest.cc
@@ -47,7 +47,7 @@
   const url::Origin kTestOrigin =
       url::Origin::Create(GURL("http://www.foo.com"));
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Ensure that the database used by the data store owned by
   // |recording_data_cache_| gets created in memory. This avoid having to wait
diff --git a/chrome/browser/performance_manager/persistence/site_data/site_data_cache_impl_unittest.cc b/chrome/browser/performance_manager/persistence/site_data/site_data_cache_impl_unittest.cc
index 7f92043..15ec003 100644
--- a/chrome/browser/performance_manager/persistence/site_data/site_data_cache_impl_unittest.cc
+++ b/chrome/browser/performance_manager/persistence/site_data/site_data_cache_impl_unittest.cc
@@ -64,9 +64,7 @@
 
   void TearDown() override { WaitForAsyncOperationsToComplete(); }
 
-  void WaitForAsyncOperationsToComplete() {
-    test_browser_thread_bundle_.RunUntilIdle();
-  }
+  void WaitForAsyncOperationsToComplete() { task_environment_.RunUntilIdle(); }
 
   // Populates |writer_|, |reader_| and |data_| to refer to a tab navigated to
   // |kTestOrigin| that updated its title in background. Populates |writer2_|,
@@ -121,7 +119,7 @@
   }
 
   base::SimpleTestTickClock test_clock_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::test::ScopedFeatureList scoped_feature_list_;
   TestingProfile profile_;
 
diff --git a/chrome/browser/performance_manager/persistence/site_data/unittest_utils.cc b/chrome/browser/performance_manager/persistence/site_data/unittest_utils.cc
index b69f31b9..dd5c5ca1 100644
--- a/chrome/browser/performance_manager/persistence/site_data/unittest_utils.cc
+++ b/chrome/browser/performance_manager/persistence/site_data/unittest_utils.cc
@@ -58,7 +58,7 @@
   // Make sure destruction unregisters the instance.
   EXPECT_EQ(nullptr, PerformanceManager::GetInstance());
 
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 }
 
 }  // namespace testing
diff --git a/chrome/browser/performance_manager/persistence/site_data/unittest_utils.h b/chrome/browser/performance_manager/persistence/site_data/unittest_utils.h
index 218f4a6b..10ce6de 100644
--- a/chrome/browser/performance_manager/persistence/site_data/unittest_utils.h
+++ b/chrome/browser/performance_manager/persistence/site_data/unittest_utils.h
@@ -63,7 +63,7 @@
 
  private:
   std::unique_ptr<PerformanceManager> performance_manager_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(TestWithPerformanceManager);
 };
diff --git a/chrome/browser/performance_manager/webui_graph_dump_impl_unittest.cc b/chrome/browser/performance_manager/webui_graph_dump_impl_unittest.cc
index d0eff2b..610965e 100644
--- a/chrome/browser/performance_manager/webui_graph_dump_impl_unittest.cc
+++ b/chrome/browser/performance_manager/webui_graph_dump_impl_unittest.cc
@@ -113,7 +113,7 @@
 }  // namespace
 
 TEST(WebUIGraphDumpImplTest, ChangeStream) {
-  content::TestBrowserThreadBundle browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   GraphImpl graph;
   MockMultiplePagesWithMultipleProcessesGraph mock_graph(&graph);
@@ -135,7 +135,7 @@
   TestChangeStream change_stream;
   impl_proxy->SubscribeToChanges(change_stream.GetProxy());
 
-  browser_thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 
   // Validate that the initial graph state dump is complete.
   EXPECT_EQ(0u, change_stream.num_changes());
@@ -184,7 +184,7 @@
       NodeBase::GetSerializationId(mock_graph.child_frame.get());
   mock_graph.child_frame.reset();
 
-  browser_thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 
   EXPECT_EQ(1u, change_stream.num_changes());
   EXPECT_FALSE(base::Contains(change_stream.id_set(), child_frame_id));
@@ -194,7 +194,7 @@
   ASSERT_TRUE(main_page_it != change_stream.page_map().end());
   EXPECT_EQ(kAnotherURL, main_page_it->second->main_frame_url);
 
-  browser_thread_bundle.RunUntilIdle();
+  task_environment.RunUntilIdle();
 }
 
 }  // namespace performance_manager
diff --git a/chrome/browser/permissions/chooser_context_base_unittest.cc b/chrome/browser/permissions/chooser_context_base_unittest.cc
index 2c0a4ef..6edb6228 100644
--- a/chrome/browser/permissions/chooser_context_base_unittest.cc
+++ b/chrome/browser/permissions/chooser_context_base_unittest.cc
@@ -54,7 +54,7 @@
   Profile* profile() { return &profile_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 
  protected:
diff --git a/chrome/browser/permissions/permission_util_unittest.cc b/chrome/browser/permissions/permission_util_unittest.cc
index 7e9b182..7799294 100644
--- a/chrome/browser/permissions/permission_util_unittest.cc
+++ b/chrome/browser/permissions/permission_util_unittest.cc
@@ -13,7 +13,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 
 class PermissionUtilTest : public testing::Test {
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(PermissionUtilTest, ScopedRevocationReporter) {
diff --git a/chrome/browser/platform_util_unittest.cc b/chrome/browser/platform_util_unittest.cc
index 160e170b..f122ebd6 100644
--- a/chrome/browser/platform_util_unittest.cc
+++ b/chrome/browser/platform_util_unittest.cc
@@ -139,7 +139,7 @@
   void SetUpPlatformFixture(const base::FilePath&) {}
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 #endif
diff --git a/chrome/browser/plugins/plugin_info_host_impl_unittest.cc b/chrome/browser/plugins/plugin_info_host_impl_unittest.cc
index e85013a9..1a78810 100644
--- a/chrome/browser/plugins/plugin_info_host_impl_unittest.cc
+++ b/chrome/browser/plugins/plugin_info_host_impl_unittest.cc
@@ -176,7 +176,7 @@
 
  private:
   base::ShadowingAtExitManager at_exit_manager_;  // Destroys the PluginService.
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile profile_;
   PluginInfoHostImpl::Context context_;
   HostContentSettingsMap* host_content_settings_map_;
diff --git a/chrome/browser/policy/browser_dm_token_storage_linux_unittest.cc b/chrome/browser/policy/browser_dm_token_storage_linux_unittest.cc
index b8e53cf4..9cd1cc7 100644
--- a/chrome/browser/policy/browser_dm_token_storage_linux_unittest.cc
+++ b/chrome/browser/policy/browser_dm_token_storage_linux_unittest.cc
@@ -47,7 +47,7 @@
 
 class BrowserDMTokenStorageLinuxTest : public testing::Test {
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(BrowserDMTokenStorageLinuxTest, InitClientId) {
diff --git a/chrome/browser/policy/browser_dm_token_storage_mac_unittest.cc b/chrome/browser/policy/browser_dm_token_storage_mac_unittest.cc
index a0ec15bc..b42d484d 100644
--- a/chrome/browser/policy/browser_dm_token_storage_mac_unittest.cc
+++ b/chrome/browser/policy/browser_dm_token_storage_mac_unittest.cc
@@ -37,7 +37,7 @@
 
 class BrowserDMTokenStorageMacTest : public testing::Test {
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(BrowserDMTokenStorageMacTest, InitClientId) {
diff --git a/chrome/browser/policy/browser_dm_token_storage_unittest.cc b/chrome/browser/policy/browser_dm_token_storage_unittest.cc
index fa7dc48..4affad47 100644
--- a/chrome/browser/policy/browser_dm_token_storage_unittest.cc
+++ b/chrome/browser/policy/browser_dm_token_storage_unittest.cc
@@ -36,7 +36,7 @@
   FakeBrowserDMTokenStorage storage_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(BrowserDMTokenStorageTest, RetrieveClientId) {
diff --git a/chrome/browser/policy/browser_dm_token_storage_win_unittest.cc b/chrome/browser/policy/browser_dm_token_storage_win_unittest.cc
index dce9c304..ba48573b 100644
--- a/chrome/browser/policy/browser_dm_token_storage_win_unittest.cc
+++ b/chrome/browser/policy/browser_dm_token_storage_win_unittest.cc
@@ -82,7 +82,7 @@
                            dm_token.size(), REG_BINARY) == ERROR_SUCCESS);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   registry_util::RegistryOverrideManager registry_override_manager_;
 };
 
diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
index 22e809a..339637f 100644
--- a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
+++ b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
@@ -88,7 +88,7 @@
 class UserPolicySigninServiceTest : public testing::Test {
  public:
   UserPolicySigninServiceTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         test_account_id_(AccountId::FromUserEmailGaiaId(
             kTestUser,
             signin::GetTestGaiaIdForEmail(kTestUser))),
@@ -279,7 +279,7 @@
 
   // BrowserPolicyConnector and UrlFetcherFactory want to initialize and free
   // various components asynchronously via tasks, so create fake threads here.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Used in conjunction with OnRegisterCompleted() to test client registration
   // callbacks.
diff --git a/chrome/browser/policy/machine_level_user_cloud_policy_register_watcher_unittest.cc b/chrome/browser/policy/machine_level_user_cloud_policy_register_watcher_unittest.cc
index 89dc55bb..19911bcf 100644
--- a/chrome/browser/policy/machine_level_user_cloud_policy_register_watcher_unittest.cc
+++ b/chrome/browser/policy/machine_level_user_cloud_policy_register_watcher_unittest.cc
@@ -113,7 +113,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   FakeMachineLevelUserCloudPolicyController controller_;
   MachineLevelUserCloudPolicyRegisterWatcher watcher_;
diff --git a/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc b/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc
index 161fd08..9d78aa9 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc
+++ b/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc
@@ -54,7 +54,7 @@
   AutocompleteActionPredictorTable::Rows test_db_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<PredictorDatabase> db_;
 };
diff --git a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
index 6756802..b95ca14 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
+++ b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
@@ -306,7 +306,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<AutocompleteActionPredictor> predictor_;
 };
diff --git a/chrome/browser/predictors/loading_data_collector_unittest.cc b/chrome/browser/predictors/loading_data_collector_unittest.cc
index cd1d8c7..b94b0f83 100644
--- a/chrome/browser/predictors/loading_data_collector_unittest.cc
+++ b/chrome/browser/predictors/loading_data_collector_unittest.cc
@@ -44,7 +44,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
   std::unique_ptr<StrictMock<MockResourcePrefetchPredictor>> mock_predictor_;
diff --git a/chrome/browser/predictors/loading_predictor_config_unittest.cc b/chrome/browser/predictors/loading_predictor_config_unittest.cc
index fefeb66..5531858 100644
--- a/chrome/browser/predictors/loading_predictor_config_unittest.cc
+++ b/chrome/browser/predictors/loading_predictor_config_unittest.cc
@@ -22,7 +22,7 @@
   Profile* profile() { return &profile_; }
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/predictors/loading_predictor_unittest.cc b/chrome/browser/predictors/loading_predictor_unittest.cc
index 8a635ab..980f8f0 100644
--- a/chrome/browser/predictors/loading_predictor_unittest.cc
+++ b/chrome/browser/predictors/loading_predictor_unittest.cc
@@ -90,7 +90,7 @@
  protected:
   virtual void SetPreference();
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<LoadingPredictor> predictor_;
   StrictMock<MockResourcePrefetchPredictor>* mock_predictor_;
diff --git a/chrome/browser/predictors/loading_stats_collector_unittest.cc b/chrome/browser/predictors/loading_stats_collector_unittest.cc
index 5b2ffe6..f310106 100644
--- a/chrome/browser/predictors/loading_stats_collector_unittest.cc
+++ b/chrome/browser/predictors/loading_stats_collector_unittest.cc
@@ -44,7 +44,7 @@
                                    RedirectStatus expected_status);
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<StrictMock<MockResourcePrefetchPredictor>> mock_predictor_;
   std::unique_ptr<LoadingStatsCollector> stats_collector_;
diff --git a/chrome/browser/predictors/preconnect_manager_unittest.cc b/chrome/browser/predictors/preconnect_manager_unittest.cc
index c69e9a2..f67da57 100644
--- a/chrome/browser/predictors/preconnect_manager_unittest.cc
+++ b/chrome/browser/predictors/preconnect_manager_unittest.cc
@@ -171,7 +171,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<StrictMock<MockNetworkContext>> mock_network_context_;
   std::unique_ptr<StrictMock<MockPreconnectManagerDelegate>> mock_delegate_;
diff --git a/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc b/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc
index 6d62825..ff9fa61 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc
@@ -46,7 +46,7 @@
   void TestDeleteData();
   void TestDeleteAllData();
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<base::SequencedTaskRunner> task_runner_;
   TestingProfile profile_;
   std::unique_ptr<PredictorDatabase> db_;
diff --git a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
index 9b82442..16b6fd4 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
@@ -133,7 +133,7 @@
 
   void InitializeSampleData();
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   scoped_refptr<base::TestSimpleTaskRunner> db_task_runner_;
 
diff --git a/chrome/browser/prefs/proxy_policy_unittest.cc b/chrome/browser/prefs/proxy_policy_unittest.cc
index e184554f..073fb73d 100644
--- a/chrome/browser/prefs/proxy_policy_unittest.cc
+++ b/chrome/browser/prefs/proxy_policy_unittest.cc
@@ -123,7 +123,7 @@
     return std::move(prefs);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::CommandLine command_line_;
   MockConfigurationPolicyProvider provider_;
   std::unique_ptr<PolicyServiceImpl> policy_service_;
diff --git a/chrome/browser/prerender/prerender_unittest.cc b/chrome/browser/prerender/prerender_unittest.cc
index 25f5818..c9a3f122 100644
--- a/chrome/browser/prerender/prerender_unittest.cc
+++ b/chrome/browser/prerender/prerender_unittest.cc
@@ -428,7 +428,7 @@
 
  private:
   // Needed to pass PrerenderManager's DCHECKs.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   TestingProfile profile_;
   base::SimpleTestTickClock tick_clock_;
diff --git a/chrome/browser/previews/previews_lite_page_decider_unittest.cc b/chrome/browser/previews/previews_lite_page_decider_unittest.cc
index 9f9172ea..72df7cb 100644
--- a/chrome/browser/previews/previews_lite_page_decider_unittest.cc
+++ b/chrome/browser/previews/previews_lite_page_decider_unittest.cc
@@ -178,7 +178,7 @@
             profile(),
             std::make_unique<data_reduction_proxy::DataStoreImpl>(
                 profile()->GetPath()),
-            thread_bundle()->GetMainThreadTaskRunner());
+            task_environment()->GetMainThreadTaskRunner());
 
     decider_ = std::make_unique<PreviewsLitePageDecider>(
         web_contents()->GetBrowserContext());
diff --git a/chrome/browser/previews/previews_lite_page_url_loader_interceptor_unittest.cc b/chrome/browser/previews/previews_lite_page_url_loader_interceptor_unittest.cc
index 727062d..455840b 100644
--- a/chrome/browser/previews/previews_lite_page_url_loader_interceptor_unittest.cc
+++ b/chrome/browser/previews/previews_lite_page_url_loader_interceptor_unittest.cc
@@ -39,7 +39,7 @@
 class PreviewsLitePageURLLoaderInterceptorTest : public testing::Test {
  public:
   PreviewsLitePageURLLoaderInterceptorTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         shared_factory_(
             base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
                 &test_url_loader_factory_)) {}
@@ -77,7 +77,7 @@
   PreviewsLitePageURLLoaderInterceptor& interceptor() { return *interceptor_; }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  private:
   base::Optional<bool> callback_was_empty_;
diff --git a/chrome/browser/previews/previews_ui_tab_helper_unittest.cc b/chrome/browser/previews/previews_ui_tab_helper_unittest.cc
index 5670851..c2866ab 100644
--- a/chrome/browser/previews/previews_ui_tab_helper_unittest.cc
+++ b/chrome/browser/previews/previews_ui_tab_helper_unittest.cc
@@ -77,7 +77,7 @@
             profile(),
             std::make_unique<data_reduction_proxy::DataStoreImpl>(
                 profile()->GetPath()),
-            thread_bundle()->GetMainThreadTaskRunner());
+            task_environment()->GetMainThreadTaskRunner());
   }
 
   void SetCommittedPreviewsType(previews::PreviewsType previews_type) {
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc
index 9c68968..bf22c59 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc
@@ -213,7 +213,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/printing/cloud_print/gcd_api_flow_unittest.cc b/chrome/browser/printing/cloud_print/gcd_api_flow_unittest.cc
index f312905..e58b93c 100644
--- a/chrome/browser/printing/cloud_print/gcd_api_flow_unittest.cc
+++ b/chrome/browser/printing/cloud_print/gcd_api_flow_unittest.cc
@@ -82,7 +82,7 @@
   MockDelegate* mock_delegate_;
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   signin::IdentityTestEnvironment identity_test_environment_;
   scoped_refptr<network::WeakWrapperSharedURLLoaderFactory>
       test_shared_url_loader_factory_;
diff --git a/chrome/browser/printing/cloud_print/privet_http_unittest.cc b/chrome/browser/printing/cloud_print/privet_http_unittest.cc
index df210fa..b729e21 100644
--- a/chrome/browser/printing/cloud_print/privet_http_unittest.cc
+++ b/chrome/browser/printing/cloud_print/privet_http_unittest.cc
@@ -986,7 +986,7 @@
 class PrivetHttpWithServerTest : public ::testing::Test {
  protected:
   PrivetHttpWithServerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         shared_url_loader_factory_(
             base::MakeRefCounted<network::TestSharedURLLoaderFactory>()) {}
 
@@ -1004,7 +1004,7 @@
         "test", server_->host_port_pair(), shared_url_loader_factory_);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<EmbeddedTestServer> server_;
   std::unique_ptr<PrivetHTTPClientImpl> client_;
   scoped_refptr<network::TestSharedURLLoaderFactory> shared_url_loader_factory_;
diff --git a/chrome/browser/printing/cloud_print/privet_local_printer_lister_unittest.cc b/chrome/browser/printing/cloud_print/privet_local_printer_lister_unittest.cc
index ec884a040..f8cd765 100644
--- a/chrome/browser/printing/cloud_print/privet_local_printer_lister_unittest.cc
+++ b/chrome/browser/printing/cloud_print/privet_local_printer_lister_unittest.cc
@@ -137,7 +137,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   scoped_refptr<TestServiceDiscoveryClient> test_service_discovery_client_;
   std::unique_ptr<PrivetLocalPrinterLister> local_printer_lister_;
   StrictMock<MockLocalPrinterListerDelegate> delegate_;
diff --git a/chrome/browser/printing/cloud_print/privet_notifications_unittest.cc b/chrome/browser/printing/cloud_print/privet_notifications_unittest.cc
index 9ac3c06..4481a9f8 100644
--- a/chrome/browser/printing/cloud_print/privet_notifications_unittest.cc
+++ b/chrome/browser/printing/cloud_print/privet_notifications_unittest.cc
@@ -108,7 +108,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   network::TestURLLoaderFactory test_url_loader_factory_;
   scoped_refptr<network::WeakWrapperSharedURLLoaderFactory>
       test_shared_url_loader_factory_;
@@ -266,7 +266,7 @@
   Profile* profile() { return profile_; }
 
   // The thread bundle must be first so it is destroyed last.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<NotificationDisplayServiceTester> display_service_;
 
diff --git a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
index 495eab8..b44ea23b0 100644
--- a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
+++ b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
@@ -309,7 +309,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir temp_user_data_dir_;
 
   mojo::NamedPlatformChannel::ServerName startup_server_name_;
@@ -354,7 +354,7 @@
 };
 
 CloudPrintProxyPolicyStartupTest::CloudPrintProxyPolicyStartupTest()
-    : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {
+    : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD) {
   // Although is really a unit test which runs in the browser_tests binary, it
   // doesn't get the unit setup which normally happens in the unit test binary.
   ChromeUnitTestSuite::InitializeProviders();
diff --git a/chrome/browser/printing/print_job_unittest.cc b/chrome/browser/printing/print_job_unittest.cc
index 44e928a..6849fb44 100644
--- a/chrome/browser/printing/print_job_unittest.cc
+++ b/chrome/browser/printing/print_job_unittest.cc
@@ -91,7 +91,7 @@
   // Test the multi-threaded nature of PrintJob to make sure we can use it with
   // known lifetime.
 
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   content::NotificationRegistrar registrar;
   TestPrintNotificationObserver observer;
   registrar.Add(&observer, content::NOTIFICATION_ALL,
@@ -113,7 +113,7 @@
 
 TEST(PrintJobTest, SimplePrintLateInit) {
   volatile bool check = false;
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   scoped_refptr<PrintJob> job(new TestPrintJob(&check));
   job = nullptr;
   EXPECT_TRUE(check);
@@ -143,7 +143,7 @@
 
 #if defined(OS_WIN)
 TEST(PrintJobTest, PageRangeMapping) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   int page_count = 4;
   std::vector<int> input_full = {0, 1, 2, 3};
diff --git a/chrome/browser/process_singleton_posix_unittest.cc b/chrome/browser/process_singleton_posix_unittest.cc
index e64aa49..83db765 100644
--- a/chrome/browser/process_singleton_posix_unittest.cc
+++ b/chrome/browser/process_singleton_posix_unittest.cc
@@ -72,8 +72,7 @@
 
   ProcessSingletonPosixTest()
       : kill_callbacks_(0),
-        test_browser_thread_bundle_(
-            content::TestBrowserThreadBundle::REAL_IO_THREAD),
+        task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD),
         wait_event_(base::WaitableEvent::ResetPolicy::MANUAL,
                     base::WaitableEvent::InitialState::NOT_SIGNALED),
         signal_event_(base::WaitableEvent::ResetPolicy::MANUAL,
@@ -262,7 +261,7 @@
     kill_callbacks_++;
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir temp_dir_;
   base::WaitableEvent wait_event_;
   base::WaitableEvent signal_event_;
diff --git a/chrome/browser/profile_resetter/profile_resetter_unittest.cc b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
index d47d678..48ebf99 100644
--- a/chrome/browser/profile_resetter/profile_resetter_unittest.cc
+++ b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
@@ -203,13 +203,12 @@
 
   MOCK_METHOD0(Callback, void(void));
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   network::TestURLLoaderFactory test_url_loader_factory_;
 };
 
 ConfigParserTest::ConfigParserTest()
-    : test_browser_thread_bundle_(
-          content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+    : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
 ConfigParserTest::~ConfigParserTest() {}
 
diff --git a/chrome/browser/profile_resetter/triggered_profile_resetter_win_unittest.cc b/chrome/browser/profile_resetter/triggered_profile_resetter_win_unittest.cc
index 3c17536d..4e88d9f9 100644
--- a/chrome/browser/profile_resetter/triggered_profile_resetter_win_unittest.cc
+++ b/chrome/browser/profile_resetter/triggered_profile_resetter_win_unittest.cc
@@ -41,7 +41,7 @@
     trial->group();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
   void SetRegTimestampAndToolName(const base::string16& toolname,
diff --git a/chrome/browser/profiles/profile_activity_metrics_recorder_unittest.cc b/chrome/browser/profiles/profile_activity_metrics_recorder_unittest.cc
index d2b7bb7..4034d950 100644
--- a/chrome/browser/profiles/profile_activity_metrics_recorder_unittest.cc
+++ b/chrome/browser/profiles/profile_activity_metrics_recorder_unittest.cc
@@ -30,9 +30,10 @@
 class ProfileActivityMetricsRecorderTest : public testing::Test {
  public:
   ProfileActivityMetricsRecorderTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
         profile_manager_(TestingBrowserProcess::GetGlobal()) {
-    base::SetRecordActionTaskRunner(thread_bundle_.GetMainThreadTaskRunner());
+    base::SetRecordActionTaskRunner(
+        task_environment_.GetMainThreadTaskRunner());
   }
 
   void SetUp() override {
@@ -80,10 +81,12 @@
 
   TestingProfileManager* profile_manager() { return &profile_manager_; }
   base::HistogramTester* histograms() { return &histogram_tester_; }
-  content::TestBrowserThreadBundle* thread_bundle() { return &thread_bundle_; }
+  content::BrowserTaskEnvironment* task_environment() {
+    return &task_environment_;
+  }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   TestingProfileManager profile_manager_;
   base::HistogramTester histogram_tester_;
@@ -155,7 +158,7 @@
   SimulateUserActionAndExpectRecording(/*bucket=*/1);
 
   // Profile 1: Session lasts 2 minutes.
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromMinutes(2));
+  task_environment()->FastForwardBy(base::TimeDelta::FromMinutes(2));
 
   // Profile 3: Browser is activated for the first time. The profile is assigned
   // bucket 2.
@@ -169,7 +172,7 @@
                                   /*bucket=*/1, /*count=*/2);
 
   // Profile 3: Session lasts 2 minutes.
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromMinutes(2));
+  task_environment()->FastForwardBy(base::TimeDelta::FromMinutes(2));
 
   // Profile 2: Browser is activated for the first time. The profile is assigned
   // bucket 3.
@@ -193,11 +196,11 @@
                                   /*bucket=*/1, /*count=*/1);
 
   // Wait 2 minutes before doing another user interaction.
-  thread_bundle()->FastForwardBy(base::TimeDelta::FromMinutes(2));
+  task_environment()->FastForwardBy(base::TimeDelta::FromMinutes(2));
   SimulateUserEvent();
 
   // Stay inactive so the session ends.
-  thread_bundle()->FastForwardBy(kInactivityTimeout * 2);
+  task_environment()->FastForwardBy(kInactivityTimeout * 2);
 
   // The inactive time is not recorded.
   histograms()->ExpectBucketCount("Profile.SessionDuration.PerProfile",
diff --git a/chrome/browser/profiles/profile_attributes_storage_unittest.cc b/chrome/browser/profiles/profile_attributes_storage_unittest.cc
index befdeca..2d275238 100644
--- a/chrome/browser/profiles/profile_attributes_storage_unittest.cc
+++ b/chrome/browser/profiles/profile_attributes_storage_unittest.cc
@@ -179,7 +179,7 @@
   TestingProfileManager testing_profile_manager_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ProfileAttributesTestObserver observer_;
 };
 
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.h b/chrome/browser/profiles/profile_info_cache_unittest.h
index f7ad7fd..489d819 100644
--- a/chrome/browser/profiles/profile_info_cache_unittest.h
+++ b/chrome/browser/profiles/profile_info_cache_unittest.h
@@ -56,9 +56,9 @@
   void ResetCache();
 
  private:
-  // TestBrowserThreadBundle needs to be up through the destruction of the
+  // BrowserTaskEnvironment needs to be up through the destruction of the
   // TestingProfileManager below.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  protected:
   TestingProfileManager testing_profile_manager_;
diff --git a/chrome/browser/profiles/profile_list_desktop_unittest.cc b/chrome/browser/profiles/profile_list_desktop_unittest.cc
index 474c312..a961cfc 100644
--- a/chrome/browser/profiles/profile_list_desktop_unittest.cc
+++ b/chrome/browser/profiles/profile_list_desktop_unittest.cc
@@ -84,7 +84,7 @@
   int change_count() const { return mock_observer_->change_count(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager manager_;
   std::unique_ptr<MockObserver> mock_observer_;
   std::unique_ptr<AvatarMenu> avatar_menu_;
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc
index 7d4db54..0409165 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -243,7 +243,7 @@
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
 #endif
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // The path to temporary directory used to contain the test operations.
   base::ScopedTempDir temp_dir_;
diff --git a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
index b10c5d1..9275f84 100644
--- a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
+++ b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
@@ -59,7 +59,7 @@
   }
 
   void TearDown() override {
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
 
     // Delete all profiles and ensure their shortcuts got removed.
     const size_t num_profiles =
@@ -70,7 +70,7 @@
       const base::FilePath profile_path = entry->GetPath();
       base::string16 profile_name = entry->GetName();
       profile_attributes_storage_->RemoveProfile(profile_path);
-      thread_bundle_.RunUntilIdle();
+      task_environment_.RunUntilIdle();
       ASSERT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_name));
       // The icon file is not deleted until the profile directory is deleted.
       const base::FilePath icon_path =
@@ -97,7 +97,7 @@
     // Also create a non-badged shortcut for Chrome, which is conveniently done
     // by |CreateProfileShortcut()| since there is only one profile.
     profile_shortcut_manager_->CreateProfileShortcut(profile_1_path_);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     // Verify that there's now an unbadged, unmamed shortcut for the single
     // profile.
     ValidateSingleProfileShortcut(location, profile_1_path_);
@@ -136,7 +136,7 @@
     ShellUtil::CreateOrUpdateShortcut(
         ShellUtil::SHORTCUT_LOCATION_DESKTOP, properties,
         ShellUtil::SHELL_SHORTCUT_CREATE_IF_NO_SYSTEM_LEVEL);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     // Verify that there's now an unbadged, unmamed shortcut for the single
     // profile.
     ValidateNonProfileShortcut(location);
@@ -174,7 +174,7 @@
     base::CreateCOMSTATaskRunner({base::ThreadPool()})
         ->PostTask(location, base::Bind(&base::win::ValidateShortcut,
                                         shortcut_path, expected_properties));
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   // Calls base::win::ValidateShortcut() with expected properties for the
@@ -256,7 +256,7 @@
                                             std::string(), base::string16(), 0,
                                             std::string(), EmptyAccountId());
     profile_shortcut_manager_->CreateProfileShortcut(profile_path);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     ValidateProfileShortcut(location, profile_name, profile_path);
   }
 
@@ -272,7 +272,7 @@
         base::Bind(&ShellUtil::CreateOrUpdateShortcut, shortcut_location,
                    properties, ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS),
         base::Bind([](bool succeeded) { EXPECT_TRUE(succeeded); }));
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   // Creates a regular (non-profile) desktop shortcut with the given name and
@@ -316,7 +316,7 @@
                     GetProfileAttributesWithPath(profile_path, &entry));
     ASSERT_NE(entry->GetName(), new_profile_name);
     entry->SetName(new_profile_name);
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   base::FilePath GetExePath() {
@@ -341,7 +341,7 @@
     return system_shortcuts_directory;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestingProfileManager> profile_manager_;
   std::unique_ptr<ProfileShortcutManager> profile_shortcut_manager_;
@@ -425,7 +425,7 @@
   profile_attributes_storage_->AddProfile(profile_2_path_, profile_2_name_,
                                           std::string(), base::string16(), 0,
                                           std::string(), EmptyAccountId());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Ensure that the second profile doesn't have a shortcut and that the first
   // profile's shortcut got renamed and badged.
@@ -449,7 +449,7 @@
 
   // Delete one shortcut.
   profile_attributes_storage_->RemoveProfile(profile_2_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_2_name_));
 
   // Verify that the remaining shortcut points at the remaining profile.
@@ -471,7 +471,7 @@
 
   // Delete the profile that doesn't have a shortcut.
   profile_attributes_storage_->RemoveProfile(profile_1_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Verify that the remaining shortcut does not have a profile name.
   ValidateSingleProfileShortcut(FROM_HERE, profile_2_path_);
@@ -495,7 +495,7 @@
 
   // Delete the profile that has a shortcut.
   profile_attributes_storage_->RemoveProfile(profile_2_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Verify that the remaining shortcut is a single profile shortcut.
   ValidateSingleProfileShortcut(FROM_HERE, profile_1_path_);
@@ -530,7 +530,7 @@
   // Delete the third profile and check that its shortcut is gone and no
   // shortcuts have been re-created.
   profile_attributes_storage_->RemoveProfile(profile_3_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   ASSERT_FALSE(base::PathExists(profile_1_shortcut_path));
   ASSERT_FALSE(base::PathExists(profile_2_shortcut_path));
   ASSERT_FALSE(base::PathExists(profile_3_shortcut_path));
@@ -542,7 +542,7 @@
 
   // Delete one shortcut.
   profile_attributes_storage_->RemoveProfile(profile_2_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Verify that an unbadged, default named shortcut for profile1 exists.
   ValidateSingleProfileShortcut(FROM_HERE, profile_1_path_);
@@ -571,7 +571,7 @@
 
   // Ensure that a new shortcut does not get made if the old one was renamed.
   profile_shortcut_manager_->CreateProfileShortcut(profile_2_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_2_name_));
   ValidateProfileShortcutAtPath(FROM_HERE, profile_2_shortcut_path_2,
                                 profile_2_path_);
@@ -580,7 +580,7 @@
   ASSERT_TRUE(base::DeleteFile(profile_2_shortcut_path_2, false));
   EXPECT_FALSE(base::PathExists(profile_2_shortcut_path_2));
   profile_shortcut_manager_->CreateProfileShortcut(profile_2_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   ValidateProfileShortcut(FROM_HERE, profile_2_name_, profile_2_path_);
 }
 
@@ -609,7 +609,7 @@
 
   // Delete the profile and ensure both shortcuts were also deleted.
   profile_attributes_storage_->RemoveProfile(profile_2_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(base::PathExists(profile_2_shortcut_path_1));
   EXPECT_FALSE(base::PathExists(profile_2_shortcut_path_2));
   ValidateSingleProfileShortcutAtPath(FROM_HERE, profile_1_path_,
@@ -707,7 +707,7 @@
   // Delete shortcuts for profile 1 and ensure that they got deleted while the
   // shortcuts for profile 2 were kept.
   profile_shortcut_manager_->RemoveProfileShortcuts(profile_1_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(base::PathExists(profile_1_shortcut_path_1));
   EXPECT_FALSE(base::PathExists(profile_1_shortcut_path_2));
   ValidateProfileShortcutAtPath(FROM_HERE, profile_2_shortcut_path_1,
@@ -730,7 +730,7 @@
 
   // Profile 2 should have a shortcut initially.
   profile_shortcut_manager_->HasProfileShortcuts(profile_2_path_, callback);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(result.has_shortcuts);
 
   // Delete the shortcut and check that the function returns false.
@@ -739,7 +739,7 @@
   ASSERT_TRUE(base::DeleteFile(profile_2_shortcut_path, false));
   EXPECT_FALSE(base::PathExists(profile_2_shortcut_path));
   profile_shortcut_manager_->HasProfileShortcuts(profile_2_path_, callback);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(result.has_shortcuts);
 }
 
@@ -751,7 +751,7 @@
   profile_attributes_storage_->AddProfile(profile_1_path_, profile_1_name_,
                                           std::string(), base::string16(), 0,
                                           std::string(), EmptyAccountId());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   ASSERT_EQ(1u, profile_attributes_storage_->GetNumberOfProfiles());
 
   // Ensure system-level continues to exist and user-level was not created.
@@ -770,7 +770,7 @@
   profile_attributes_storage_->AddProfile(profile_3_path_, profile_3_name_,
                                           std::string(), base::string16(), 0,
                                           std::string(), EmptyAccountId());
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_3_name_));
 
   // Ensure that changing the avatar icon and the name does not result in a
@@ -779,12 +779,12 @@
   ASSERT_TRUE(profile_attributes_storage_->
                   GetProfileAttributesWithPath(profile_3_path_, &entry_3));
   entry_3->SetAvatarIconIndex(3u);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_3_name_));
 
   const base::string16 new_profile_3_name = L"New Name 3";
   entry_3->SetName(new_profile_3_name);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_3_name_));
   EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(new_profile_3_name));
 
@@ -794,7 +794,7 @@
   ASSERT_TRUE(profile_attributes_storage_->
                   GetProfileAttributesWithPath(profile_2_path_, &entry_2));
   entry_2->SetName(new_profile_2_name);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_2_name_));
   ValidateProfileShortcut(FROM_HERE, new_profile_2_name, profile_2_path_);
 }
@@ -809,7 +809,7 @@
   // Delete a profile and verify that only the system-level shortcut still
   // exists.
   profile_attributes_storage_->RemoveProfile(profile_1_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   EXPECT_TRUE(base::PathExists(system_level_shortcut_path));
   EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(base::string16()));
@@ -838,7 +838,7 @@
   // shortcut creation path in |DeleteDesktopShortcuts()|, which is
   // not covered by the |DeleteSecondToLastProfileWithSystemLevelShortcut| test.
   profile_attributes_storage_->RemoveProfile(profile_2_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Verify that only the system-level shortcut still exists.
   EXPECT_TRUE(base::PathExists(system_level_shortcut_path));
@@ -859,7 +859,7 @@
   EXPECT_FALSE(base::PathExists(icon_path));
 
   profile_shortcut_manager_->CreateOrUpdateProfileIcon(profile_1_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_TRUE(base::PathExists(icon_path));
 }
 
@@ -890,7 +890,7 @@
   // Deleting the default profile will unbadge the new profile's icon and should
   // result in an icon that is identical to the unbadged default profile icon.
   profile_attributes_storage_->RemoveProfile(profile_1_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   std::string unbadged_icon_2;
   EXPECT_TRUE(base::ReadFileToString(icon_path_2, &unbadged_icon_2));
@@ -917,7 +917,7 @@
   ASSERT_TRUE(profile_attributes_storage_->
                   GetProfileAttributesWithPath(profile_1_path_, &entry_1));
   entry_1->SetAvatarIconIndex(1u);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   std::string new_badged_icon_1;
   EXPECT_TRUE(base::ReadFileToString(icon_path_1, &new_badged_icon_1));
@@ -925,7 +925,7 @@
 
   // Ensure the new icon is not the unbadged icon.
   profile_attributes_storage_->RemoveProfile(profile_2_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   std::string unbadged_icon_1;
   EXPECT_TRUE(base::ReadFileToString(icon_path_1, &unbadged_icon_1));
@@ -933,7 +933,7 @@
 
   // Ensure the icon doesn't change on avatar change without 2 profiles.
   entry_1->SetAvatarIconIndex(1u);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   std::string unbadged_icon_1_a;
   EXPECT_TRUE(base::ReadFileToString(icon_path_1, &unbadged_icon_1_a));
@@ -1078,7 +1078,7 @@
 
   // Delete profile1.
   profile_attributes_storage_->RemoveProfile(profile_1_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(ProfileShortcutExistsAtDefaultPath(new_profile_1_name));
   // Check that nothing is changed for profile2 and profile3.
   ValidateProfileShortcut(FROM_HERE, profile_2_name_, profile_2_path_);
@@ -1091,7 +1091,7 @@
       GetDefaultShortcutPathForProfile(profile_2_name_)));
   EXPECT_TRUE(base::PathExists(profile_3_shortcut_path));
   profile_attributes_storage_->RemoveProfile(profile_2_path_);
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_FALSE(base::PathExists(
       GetDefaultShortcutPathForProfile(profile_2_name_)));
   // Only profile3 exists. There should be a single profile shortcut only.
diff --git a/chrome/browser/profiles/profile_statistics_unittest.cc b/chrome/browser/profiles/profile_statistics_unittest.cc
index f75a535..ee45d552 100644
--- a/chrome/browser/profiles/profile_statistics_unittest.cc
+++ b/chrome/browser/profiles/profile_statistics_unittest.cc
@@ -94,7 +94,7 @@
   TestingProfileManager* manager() { return &manager_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager manager_;
 };
 
diff --git a/chrome/browser/profiling_host/background_profiling_triggers_unittest.cc b/chrome/browser/profiling_host/background_profiling_triggers_unittest.cc
index 20217cd..21f76a09 100644
--- a/chrome/browser/profiling_host/background_profiling_triggers_unittest.cc
+++ b/chrome/browser/profiling_host/background_profiling_triggers_unittest.cc
@@ -117,7 +117,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager testing_profile_manager_;
 
   ProfilingProcessHost host_;
diff --git a/chrome/browser/profiling_host/chrome_client_connection_manager_unittest.cc b/chrome/browser/profiling_host/chrome_client_connection_manager_unittest.cc
index 357fd15..1857ac4 100644
--- a/chrome/browser/profiling_host/chrome_client_connection_manager_unittest.cc
+++ b/chrome/browser/profiling_host/chrome_client_connection_manager_unittest.cc
@@ -13,7 +13,7 @@
 namespace heap_profiling {
 
 TEST(ChromeClientConnectionManager, ShouldProfileNewRenderer) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   ChromeClientConnectionManager manager(nullptr, Mode::kNone);
 
diff --git a/chrome/browser/push_messaging/budget_database_unittest.cc b/chrome/browser/push_messaging/budget_database_unittest.cc
index ac7e02b..e9c244e3 100644
--- a/chrome/browser/push_messaging/budget_database_unittest.cc
+++ b/chrome/browser/push_messaging/budget_database_unittest.cc
@@ -98,7 +98,7 @@
   std::vector<BudgetState> prediction_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   BudgetDatabase db_;
   base::HistogramTester histogram_tester_;
diff --git a/chrome/browser/push_messaging/push_messaging_app_identifier_unittest.cc b/chrome/browser/push_messaging/push_messaging_app_identifier_unittest.cc
index 6ca0cea0..d23a0e2 100644
--- a/chrome/browser/push_messaging/push_messaging_app_identifier_unittest.cc
+++ b/chrome/browser/push_messaging/push_messaging_app_identifier_unittest.cc
@@ -55,7 +55,7 @@
   PushMessagingAppIdentifier different_sw_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/push_messaging/push_messaging_service_unittest.cc b/chrome/browser/push_messaging/push_messaging_service_unittest.cc
index 15091682..763e96b 100644
--- a/chrome/browser/push_messaging/push_messaging_service_unittest.cc
+++ b/chrome/browser/push_messaging/push_messaging_service_unittest.cc
@@ -143,7 +143,7 @@
   PushMessagingTestingProfile* profile() { return &profile_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   PushMessagingTestingProfile profile_;
 
 #if defined(OS_ANDROID)
diff --git a/chrome/browser/resource_coordinator/local_site_characteristics_data_store_unittest.cc b/chrome/browser/resource_coordinator/local_site_characteristics_data_store_unittest.cc
index bd29874..31dbe039 100644
--- a/chrome/browser/resource_coordinator/local_site_characteristics_data_store_unittest.cc
+++ b/chrome/browser/resource_coordinator/local_site_characteristics_data_store_unittest.cc
@@ -64,9 +64,7 @@
 
   void TearDown() override { WaitForAsyncOperationsToComplete(); }
 
-  void WaitForAsyncOperationsToComplete() {
-    test_browser_thread_bundle_.RunUntilIdle();
-  }
+  void WaitForAsyncOperationsToComplete() { task_environment_.RunUntilIdle(); }
 
   // Populates |writer_|, |reader_| and |data_| to refer to a tab navigated to
   // |kTestOrigin| that updated its title in background. Populates |writer2_|,
@@ -122,7 +120,7 @@
 
   base::SimpleTestTickClock test_clock_;
   ScopedSetTickClockForTesting scoped_set_tick_clock_for_testing_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::test::ScopedFeatureList scoped_feature_list_;
   TestingProfile profile_;
 
diff --git a/chrome/browser/resource_coordinator/local_site_characteristics_non_recording_data_store_unittest.cc b/chrome/browser/resource_coordinator/local_site_characteristics_non_recording_data_store_unittest.cc
index ed4b80fd..af9cc4ea 100644
--- a/chrome/browser/resource_coordinator/local_site_characteristics_non_recording_data_store_unittest.cc
+++ b/chrome/browser/resource_coordinator/local_site_characteristics_non_recording_data_store_unittest.cc
@@ -35,13 +35,11 @@
     WaitForAsyncOperationsToComplete();
   }
 
-  void WaitForAsyncOperationsToComplete() {
-    test_browser_thread_bundle_.RunUntilIdle();
-  }
+  void WaitForAsyncOperationsToComplete() { task_environment_.RunUntilIdle(); }
 
  protected:
   base::test::ScopedFeatureList scoped_feature_list_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile parent_profile_;
   TestingProfile profile_;
   std::unique_ptr<LocalSiteCharacteristicsDataStore> recording_data_store_;
diff --git a/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos_unittest.cc b/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos_unittest.cc
index 8488a66d..8852b54 100644
--- a/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos_unittest.cc
+++ b/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos_unittest.cc
@@ -28,7 +28,7 @@
   ~TabManagerDelegateTest() override {}
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 constexpr bool kIsFocused = true;
diff --git a/chrome/browser/resource_coordinator/tab_memory_metrics_reporter_unittest.cc b/chrome/browser/resource_coordinator/tab_memory_metrics_reporter_unittest.cc
index a060877..693fd32 100644
--- a/chrome/browser/resource_coordinator/tab_memory_metrics_reporter_unittest.cc
+++ b/chrome/browser/resource_coordinator/tab_memory_metrics_reporter_unittest.cc
@@ -115,7 +115,7 @@
   scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
 
   std::unique_ptr<content::TestWebContentsFactory> test_web_contents_factory_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile testing_profile_;
   content::WebContents* contents1_;
   content::WebContents* contents2_;
diff --git a/chrome/browser/safe_browsing/advanced_protection_status_manager_factory_unittest.cc b/chrome/browser/safe_browsing/advanced_protection_status_manager_factory_unittest.cc
index 12b2ab5..d426913 100644
--- a/chrome/browser/safe_browsing/advanced_protection_status_manager_factory_unittest.cc
+++ b/chrome/browser/safe_browsing/advanced_protection_status_manager_factory_unittest.cc
@@ -13,7 +13,7 @@
 // Check that AdvancedProtectionStatusManagerFactory returns the same object
 // for both off-the-record profile and regular profile.
 TEST(AdvancedProtectionStatusManagerFactoryTest, OffTheRecordUseSameService) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   TestingProfile::Builder builder;
   std::unique_ptr<TestingProfile> testing_profile = builder.Build();
diff --git a/chrome/browser/safe_browsing/certificate_reporting_service_unittest.cc b/chrome/browser/safe_browsing/certificate_reporting_service_unittest.cc
index 97678ca..923878d 100644
--- a/chrome/browser/safe_browsing/certificate_reporting_service_unittest.cc
+++ b/chrome/browser/safe_browsing/certificate_reporting_service_unittest.cc
@@ -366,7 +366,7 @@
 class CertificateReportingServiceTest : public ::testing::Test {
  public:
   CertificateReportingServiceTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD),
         io_task_runner_(
             base::CreateSingleThreadTaskRunner({content::BrowserThread::IO})) {}
 
@@ -441,7 +441,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
 
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win_unittest.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win_unittest.cc
index d96df4e..7753847 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win_unittest.cc
+++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win_unittest.cc
@@ -174,7 +174,7 @@
   // We need this because we need UI and IO threads during tests. The thread
   // bundle should be the first member of the class so that it will be destroyed
   // last.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   bool metrics_enabled_;
   base::CommandLine command_line_;
@@ -787,7 +787,7 @@
   // We need this because we need UI and IO threads during tests. The thread
   // bundle should be the first member of the class so that it will be destroyed
   // last.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   ChromeCleanerController::State initial_state_;
 
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win_unittest.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win_unittest.cc
index cef0ecc..bc01411 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win_unittest.cc
+++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win_unittest.cc
@@ -145,7 +145,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Test fixture parameters.
   ChromeMetricsStatus metrics_status_;
@@ -344,7 +344,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   TestingProfile* testing_profile_;
 
diff --git a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
index 74360f1..1bc6e7ca 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
@@ -238,7 +238,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<ClientSideDetectionService> csd_service_;
 
   network::TestURLLoaderFactory test_url_loader_factory_;
diff --git a/chrome/browser/safe_browsing/client_side_model_loader_unittest.cc b/chrome/browser/safe_browsing/client_side_model_loader_unittest.cc
index 982e83e..ed44827e 100644
--- a/chrome/browser/safe_browsing/client_side_model_loader_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_model_loader_unittest.cc
@@ -109,7 +109,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   network::TestURLLoaderFactory test_url_loader_factory_;
   scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_;
   std::unique_ptr<base::FieldTrialList> field_trials_;
diff --git a/chrome/browser/safe_browsing/download_protection/binary_fcm_service_unittest.cc b/chrome/browser/safe_browsing/download_protection/binary_fcm_service_unittest.cc
index 4e0bd57..56b6594e 100644
--- a/chrome/browser/safe_browsing/download_protection/binary_fcm_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection/binary_fcm_service_unittest.cc
@@ -37,7 +37,7 @@
   Profile* profile() { return &profile_; }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<BinaryFCMService> binary_fcm_service_;
 };
diff --git a/chrome/browser/safe_browsing/download_protection/download_feedback_service_unittest.cc b/chrome/browser/safe_browsing/download_protection/download_feedback_service_unittest.cc
index a5712f6..8744bec4 100644
--- a/chrome/browser/safe_browsing/download_protection/download_feedback_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection/download_feedback_service_unittest.cc
@@ -153,7 +153,7 @@
 
  protected:
   base::ScopedTempDir temp_dir_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
   FakeDownloadFeedbackFactory download_feedback_factory_;
 };
diff --git a/chrome/browser/safe_browsing/download_protection/download_feedback_unittest.cc b/chrome/browser/safe_browsing/download_protection/download_feedback_unittest.cc
index 95a89ac..162383a 100644
--- a/chrome/browser/safe_browsing/download_protection/download_feedback_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection/download_feedback_unittest.cc
@@ -133,7 +133,7 @@
   base::ScopedTempDir temp_dir_;
   base::FilePath upload_file_path_;
   std::string upload_file_data_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
   scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
   FakeUploaderFactory two_phase_uploader_factory_;
diff --git a/chrome/browser/safe_browsing/download_protection/file_analyzer_unittest.cc b/chrome/browser/safe_browsing/download_protection/file_analyzer_unittest.cc
index 375329c..b9250cb 100644
--- a/chrome/browser/safe_browsing/download_protection/file_analyzer_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection/file_analyzer_unittest.cc
@@ -55,7 +55,7 @@
   base::ScopedTempDir temp_dir_;
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::InProcessUtilityThreadHelper in_process_utility_thread_helper_;
 };
 
diff --git a/chrome/browser/safe_browsing/download_protection/multipart_uploader_unittest.cc b/chrome/browser/safe_browsing/download_protection/multipart_uploader_unittest.cc
index 32f1258..ecd9732 100644
--- a/chrome/browser/safe_browsing/download_protection/multipart_uploader_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection/multipart_uploader_unittest.cc
@@ -21,10 +21,10 @@
 class MultipartUploadRequestTest : public testing::Test {
  public:
   MultipartUploadRequestTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 class MockMultipartUploadRequest : public MultipartUploadRequest {
@@ -72,7 +72,7 @@
                                    std::make_unique<std::string>("response"));
       }));
   mock_request.Start();
-  thread_bundle_.FastForwardUntilNoTasksRemain();
+  task_environment_.FastForwardUntilNoTasksRemain();
 }
 
 }  // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/download_protection/two_phase_uploader_unittest.cc b/chrome/browser/safe_browsing/download_protection/two_phase_uploader_unittest.cc
index 0d8325d3..914b08e 100644
--- a/chrome/browser/safe_browsing/download_protection/two_phase_uploader_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection/two_phase_uploader_unittest.cc
@@ -70,7 +70,7 @@
 class TwoPhaseUploaderTest : public testing::Test {
  public:
   TwoPhaseUploaderTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {
     // Make sure the Network Service is started before making a NetworkContext.
     content::GetNetworkService();
     content::RunAllPendingInMessageLoop(content::BrowserThread::IO);
@@ -89,7 +89,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   const scoped_refptr<base::SequencedTaskRunner> task_runner_ =
       base::CreateSequencedTaskRunner({base::ThreadPool(), base::MayBlock(),
                                        base::TaskPriority::BEST_EFFORT});
diff --git a/chrome/browser/safe_browsing/incident_reporting/delayed_callback_runner_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/delayed_callback_runner_unittest.cc
index 6c1f19c..565b56e5 100644
--- a/chrome/browser/safe_browsing/incident_reporting/delayed_callback_runner_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/delayed_callback_runner_unittest.cc
@@ -89,7 +89,7 @@
     return callbacks_[name].deleted;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<safe_browsing::DelayedCallbackRunner> instance_;
 
  private:
diff --git a/chrome/browser/safe_browsing/incident_reporting/download_metadata_manager_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/download_metadata_manager_unittest.cc
index ec8ef04..e442986 100644
--- a/chrome/browser/safe_browsing/incident_reporting/download_metadata_manager_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/download_metadata_manager_unittest.cc
@@ -248,7 +248,7 @@
       downloads->push_back(zero_item_.get());
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   NiceMock<MockDownloadMetadataManager> manager_;
   TestingProfile profile_;
   NiceMock<content::MockDownloadManager> download_manager_;
diff --git a/chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc
index fe4d184..ccd0ed9 100644
--- a/chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc
@@ -145,7 +145,7 @@
     // uses it in destructor.
     test_user_manager_.reset();
     // Finish any pending tasks before deleting the TestingBrowserProcess.
-    browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
 #endif
     profile_manager_.reset();
     TestingBrowserProcess::DeleteInstance();
@@ -179,7 +179,7 @@
     return std::make_unique<ExtensionTestingProfile>(profile);
   }
 
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
 
  private:
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
index 5c40203..8d18a9d5 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc
@@ -332,7 +332,7 @@
   bool DelayedAnalysisRan() const { return delayed_analysis_ran_; }
 
   // Fakes BrowserThreads and the main MessageLoop.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Replaces the main MessageLoop's TaskRunner with a TaskRunner on which time
   // is mocked to allow testing of things bound to timers below.
diff --git a/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
index 416e4001..cbd52462 100644
--- a/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc
@@ -286,7 +286,7 @@
     callback.Run(std::unique_ptr<ClientIncidentReport_DownloadDetails>());
   }
 
-  content::TestBrowserThreadBundle browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   int profile_number_;
 
diff --git a/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc
index e7d29413..869f4d32 100644
--- a/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc
@@ -101,7 +101,7 @@
   TestingProfile* profile_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   registry_util::RegistryOverrideManager registry_override_manager_;
   TestingProfileManager profile_manager_;
 
diff --git a/chrome/browser/safe_browsing/incident_reporting/resource_request_detector_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/resource_request_detector_unittest.cc
index d26c527..df61cf3 100644
--- a/chrome/browser/safe_browsing/incident_reporting/resource_request_detector_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/resource_request_detector_unittest.cc
@@ -148,7 +148,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  public:
   StrictMock<safe_browsing::MockIncidentReceiver>* mock_incident_receiver_;
diff --git a/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
index 179fba9..d962d478 100644
--- a/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
@@ -128,7 +128,7 @@
 
   static const char kProfileName_[];
   static const TestData kTestData_[];
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile* profile_;
   scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
 
diff --git a/chrome/browser/safe_browsing/telemetry/android/android_telemetry_service_unittest.cc b/chrome/browser/safe_browsing/telemetry/android/android_telemetry_service_unittest.cc
index b27e622e..6b7f561 100644
--- a/chrome/browser/safe_browsing/telemetry/android/android_telemetry_service_unittest.cc
+++ b/chrome/browser/safe_browsing/telemetry/android/android_telemetry_service_unittest.cc
@@ -95,7 +95,7 @@
   void ResetProfile() { telemetry_service_->profile_ = profile(); }
 
  protected:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingBrowserProcess* browser_process_;
   std::unique_ptr<download::MockDownloadItem> download_item_;
   base::HistogramTester histograms_;
diff --git a/chrome/browser/search/background/ntp_background_service_unittest.cc b/chrome/browser/search/background/ntp_background_service_unittest.cc
index c84bef7..176ffc7 100644
--- a/chrome/browser/search/background/ntp_background_service_unittest.cc
+++ b/chrome/browser/search/background/ntp_background_service_unittest.cc
@@ -24,11 +24,10 @@
 class NtpBackgroundServiceTest : public testing::Test {
  public:
   NtpBackgroundServiceTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         test_shared_loader_factory_(
             base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
-                &test_url_loader_factory_)) {
-  }
+                &test_url_loader_factory_)) {}
 
   ~NtpBackgroundServiceTest() override {}
 
@@ -56,7 +55,7 @@
 
  private:
   // Required to run tests from UI and threads.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   network::TestURLLoaderFactory test_url_loader_factory_;
   scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_;
diff --git a/chrome/browser/search/instant_service_unittest.cc b/chrome/browser/search/instant_service_unittest.cc
index afeec0f..13e14062 100644
--- a/chrome/browser/search/instant_service_unittest.cc
+++ b/chrome/browser/search/instant_service_unittest.cc
@@ -145,7 +145,7 @@
   EXPECT_TRUE(instant_service_->ToggleShortcutsVisibility(false));
   EXPECT_FALSE(pref_service->GetBoolean(prefs::kNtpShortcutsVisible));
   EXPECT_FALSE(instant_service_->most_visited_info_->is_visible);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   // Show shortcuts, and check that a notification was sent.
   EXPECT_CALL(mock_observer, MostVisitedInfoChanged(testing::_)).Times(1);
@@ -301,7 +301,7 @@
 
   instant_service_->SelectLocalBackgroundImage(path);
 
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   bool file_exists = base::PathExists(copy_path);
 
@@ -323,7 +323,7 @@
   SetUserSelectedDefaultSearchProvider("https://www.search.com");
   instant_service_->UpdateThemeInfo();
 
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   bool file_exists = base::PathExists(path);
 
@@ -347,7 +347,7 @@
   instant_service_->SetCustomBackgroundInfo(kUrl, "", "", GURL(), "");
   instant_service_->UpdateThemeInfo();
 
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   bool file_exists = base::PathExists(path);
 
@@ -438,7 +438,7 @@
   base::ThreadPoolInstance::Get()->FlushForTesting();
 
   instant_service_->SelectLocalBackgroundImage(path);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   ThemeBackgroundInfo* theme_info = instant_service_->GetInitializedThemeInfo();
   EXPECT_TRUE(base::StartsWith(theme_info->custom_background_url.spec(),
@@ -463,7 +463,7 @@
   base::ThreadPoolInstance::Get()->FlushForTesting();
 
   instant_service_->SelectLocalBackgroundImage(path);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   EXPECT_TRUE(
       pref_service->GetBoolean(prefs::kNtpCustomBackgroundLocalToDevice));
@@ -473,7 +473,7 @@
   pref_service->SetUserPref(
       prefs::kNtpCustomBackgroundDict,
       std::make_unique<base::Value>(GetBackgroundInfoAsDict(kUrl)));
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   ThemeBackgroundInfo* theme_info = instant_service_->GetInitializedThemeInfo();
   EXPECT_EQ(kUrl, theme_info->custom_background_url);
@@ -576,7 +576,7 @@
   base::ThreadPoolInstance::Get()->FlushForTesting();
 
   instant_service_->SelectLocalBackgroundImage(path);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   theme_info = instant_service_->GetInitializedThemeInfo();
   EXPECT_TRUE(base::StartsWith(theme_info->custom_background_url.spec(),
@@ -603,7 +603,7 @@
   // Background color will not update if no background is set.
   instant_service_->UpdateCustomBackgroundColorAsync(
       base::TimeTicks::Now(), image, image_fetcher::RequestMetadata());
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_FALSE(CheckBackgroundColor(
       SK_ColorRED,
       pref_service->GetDictionary(prefs::kNtpCustomBackgroundDict)));
@@ -621,7 +621,7 @@
   // Background color will not update if background timestamp has changed.
   instant_service_->UpdateCustomBackgroundColorAsync(
       base::TimeTicks::Now(), image, image_fetcher::RequestMetadata());
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_FALSE(CheckBackgroundColor(
       SK_ColorRED,
       pref_service->GetDictionary(prefs::kNtpCustomBackgroundDict)));
@@ -630,7 +630,7 @@
   instant_service_->UpdateCustomBackgroundColorAsync(
       instant_service_->GetBackgroundUpdatedTimestampForTesting(), image,
       image_fetcher::RequestMetadata());
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_TRUE(CheckBackgroundColor(
       SK_ColorRED,
       pref_service->GetDictionary(prefs::kNtpCustomBackgroundDict)));
@@ -665,13 +665,13 @@
       instant_service_->GetBackgroundUpdatedTimestampForTesting();
 
   instant_service_->SelectLocalBackgroundImage(path);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   // Background color will not update if a local image was uploaded in the
   // meantime.
   instant_service_->UpdateCustomBackgroundColorAsync(
       time_set, image, image_fetcher::RequestMetadata());
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_FALSE(CheckBackgroundColor(
       SK_ColorRED,
       pref_service->GetDictionary(prefs::kNtpCustomBackgroundDict)));
@@ -690,7 +690,7 @@
 
   instant_service_->AddValidBackdropCollectionForTesting(kValidId);
   instant_service_->SetCustomBackgroundInfo(GURL(), "", "", GURL(), kValidId);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   ThemeBackgroundInfo* theme_info = instant_service_->GetInitializedThemeInfo();
   EXPECT_EQ(kValidId, theme_info->collection_id);
@@ -700,7 +700,7 @@
   CollectionImage image2;
   instant_service_->SetNextCollectionImageForTesting(image2);
   instant_service_->SetCustomBackgroundInfo(GURL(), "", "", GURL(), kInvalidId);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   theme_info = instant_service_->GetInitializedThemeInfo();
   EXPECT_EQ(std::string(), theme_info->collection_id);
@@ -720,7 +720,7 @@
   instant_service_->AddValidBackdropCollectionForTesting(kValidId);
 
   instant_service_->SetCustomBackgroundInfo(kUrl, "", "", GURL(), kValidId);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   ThemeBackgroundInfo* theme_info = instant_service_->GetInitializedThemeInfo();
   EXPECT_EQ(kValidId, theme_info->collection_id);
@@ -745,7 +745,7 @@
 
   instant_service_->AddValidBackdropCollectionForTesting(kValidId);
   instant_service_->SetCustomBackgroundInfo(GURL(), "", "", GURL(), kValidId);
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
 
   ThemeBackgroundInfo* theme_info = instant_service_->GetInitializedThemeInfo();
   EXPECT_EQ(kValidId, theme_info->collection_id);
@@ -758,7 +758,7 @@
 
   // Should not refresh background.
   theme_info = instant_service_->GetInitializedThemeInfo();
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_EQ(kValidId, theme_info->collection_id);
   EXPECT_EQ(kImageUrl1, theme_info->custom_background_url);
   EXPECT_TRUE(instant_service_->IsCustomBackgroundSet());
@@ -767,7 +767,7 @@
 
   // Should refresh background after >24 hours.
   theme_info = instant_service_->GetInitializedThemeInfo();
-  thread_bundle()->RunUntilIdle();
+  task_environment()->RunUntilIdle();
   EXPECT_EQ(kValidId, theme_info->collection_id);
   EXPECT_EQ(kImageUrl2, theme_info->custom_background_url);
   EXPECT_TRUE(instant_service_->IsCustomBackgroundSet());
diff --git a/chrome/browser/search/most_visited_iframe_source_unittest.cc b/chrome/browser/search/most_visited_iframe_source_unittest.cc
index ddd87b7..27d7ad8 100644
--- a/chrome/browser/search/most_visited_iframe_source_unittest.cc
+++ b/chrome/browser/search/most_visited_iframe_source_unittest.cc
@@ -71,7 +71,7 @@
   // else happen on the IO thread. This setup is a hacky way to satisfy all
   // those constraints.
   MostVisitedIframeSourceTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         instant_io_context_(NULL),
         response_(NULL) {}
 
@@ -117,7 +117,7 @@
     response_ = data;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   net::TestURLRequestContext test_url_request_context_;
   content::MockResourceContext resource_context_;
diff --git a/chrome/browser/search/one_google_bar/one_google_bar_loader_impl_unittest.cc b/chrome/browser/search/one_google_bar/one_google_bar_loader_impl_unittest.cc
index 34383ee..8ddf1425 100644
--- a/chrome/browser/search/one_google_bar/one_google_bar_loader_impl_unittest.cc
+++ b/chrome/browser/search/one_google_bar/one_google_bar_loader_impl_unittest.cc
@@ -54,7 +54,7 @@
             /*account_consistency_mirror_required=*/false) {}
 
   explicit OneGoogleBarLoaderImplTest(bool account_consistency_mirror_required)
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         test_shared_loader_factory_(
             base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
                 &test_url_loader_factory_)),
@@ -98,7 +98,7 @@
  private:
   // variations::AppendVariationHeaders and SafeJsonParser require a
   // threads and a ServiceManagerConnection to be set.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestServiceManagerContext service_manager_context_;
 
   data_decoder::TestingJsonParser::ScopedFactoryOverride factory_override_;
diff --git a/chrome/browser/search/promos/promo_service_unittest.cc b/chrome/browser/search/promos/promo_service_unittest.cc
index 5719b89..ff906664 100644
--- a/chrome/browser/search/promos/promo_service_unittest.cc
+++ b/chrome/browser/search/promos/promo_service_unittest.cc
@@ -27,7 +27,7 @@
 class PromoServiceTest : public testing::Test {
  public:
   PromoServiceTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         test_shared_loader_factory_(
             base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
                 &test_url_loader_factory_)) {}
@@ -55,7 +55,7 @@
 
  private:
   // Required to run tests from UI and threads.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Required to use SafeJsonParser.
   content::TestServiceManagerContext service_manager_context_;
diff --git a/chrome/browser/search/search_suggest/search_suggest_loader_impl_unittest.cc b/chrome/browser/search/search_suggest/search_suggest_loader_impl_unittest.cc
index 2371b02..6dc228e6 100644
--- a/chrome/browser/search/search_suggest/search_suggest_loader_impl_unittest.cc
+++ b/chrome/browser/search/search_suggest/search_suggest_loader_impl_unittest.cc
@@ -58,7 +58,7 @@
             /*account_consistency_mirror_required=*/false) {}
 
   explicit SearchSuggestLoaderImplTest(bool account_consistency_mirror_required)
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         test_shared_loader_factory_(
             base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
                 &test_url_loader_factory_)) {}
@@ -99,7 +99,7 @@
  private:
   // variations::AppendVariationHeaders and SafeJsonParser require a
   // thread and a ServiceManagerConnection to be set.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestServiceManagerContext service_manager_context_;
 
   data_decoder::TestingJsonParser::ScopedFactoryOverride factory_override_;
diff --git a/chrome/browser/search_engines/template_url_fetcher_unittest.cc b/chrome/browser/search_engines/template_url_fetcher_unittest.cc
index 60d7a31..53b2b438d 100644
--- a/chrome/browser/search_engines/template_url_fetcher_unittest.cc
+++ b/chrome/browser/search_engines/template_url_fetcher_unittest.cc
@@ -103,7 +103,8 @@
   int requests_completed() const { return requests_completed_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;  // To set up BrowserThreads.
+  content::BrowserTaskEnvironment
+      task_environment_;  // To set up BrowserThreads.
   TemplateURLServiceTestUtil test_util_;
   std::unique_ptr<TemplateURLFetcher> template_url_fetcher_;
   content::URLLoaderInterceptor url_loader_interceptor_;
@@ -120,7 +121,7 @@
 };
 
 TemplateURLFetcherTest::TemplateURLFetcherTest()
-    : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+    : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
       url_loader_interceptor_(
           base::BindRepeating(&TemplateURLFetcherTest::HandleRequest,
                               base::Unretained(this))),
diff --git a/chrome/browser/search_engines/template_url_service_sync_unittest.cc b/chrome/browser/search_engines/template_url_service_sync_unittest.cc
index e3c78b4..774be22 100644
--- a/chrome/browser/search_engines/template_url_service_sync_unittest.cc
+++ b/chrome/browser/search_engines/template_url_service_sync_unittest.cc
@@ -244,7 +244,7 @@
       syncer::SyncChangeList changes);
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   // We keep two TemplateURLServices to test syncing between them.
   std::unique_ptr<TemplateURLServiceTestUtil> test_util_a_;
   std::unique_ptr<TemplateURLServiceTestUtil> test_util_b_;
diff --git a/chrome/browser/search_engines/template_url_service_unittest.cc b/chrome/browser/search_engines/template_url_service_unittest.cc
index aa97df7..25a04840 100644
--- a/chrome/browser/search_engines/template_url_service_unittest.cc
+++ b/chrome/browser/search_engines/template_url_service_unittest.cc
@@ -180,7 +180,8 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;  // To set up BrowserThreads.
+  content::BrowserTaskEnvironment
+      task_environment_;  // To set up BrowserThreads.
   std::unique_ptr<TemplateURLServiceTestUtil> test_util_;
 
   DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTest);
diff --git a/chrome/browser/serial/serial_chooser_context_unittest.cc b/chrome/browser/serial/serial_chooser_context_unittest.cc
index 50cff7f..ce156e92 100644
--- a/chrome/browser/serial/serial_chooser_context_unittest.cc
+++ b/chrome/browser/serial/serial_chooser_context_unittest.cc
@@ -31,7 +31,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   MockPermissionObserver mock_observer_;
 };
diff --git a/chrome/browser/services_unittest.cc b/chrome/browser/services_unittest.cc
index 279fd5a2..393d265 100644
--- a/chrome/browser/services_unittest.cc
+++ b/chrome/browser/services_unittest.cc
@@ -20,7 +20,8 @@
 class ServicesTest : public testing::Test {
  public:
   ServicesTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::MainThreadType::IO) {}
+      : task_environment_(content::BrowserTaskEnvironment::MainThreadType::IO) {
+  }
 
   template <typename Interface>
   bool IsConnected(mojo::Remote<Interface>* remote) {
@@ -32,7 +33,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::InProcessUtilityThreadHelper in_process_utility_thread_helper_;
 
   DISALLOW_COPY_AND_ASSIGN(ServicesTest);
diff --git a/chrome/browser/sessions/session_restore_stats_collector_unittest.cc b/chrome/browser/sessions/session_restore_stats_collector_unittest.cc
index e641ab0..0e22e9b 100644
--- a/chrome/browser/sessions/session_restore_stats_collector_unittest.cc
+++ b/chrome/browser/sessions/session_restore_stats_collector_unittest.cc
@@ -344,8 +344,8 @@
     stats_collector_->DeferTab(controller);
   }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
-  // |test_browser_thread_bundle_| needs to still be alive when
+  content::BrowserTaskEnvironment task_environment_;
+  // |task_environment_| needs to still be alive when
   // |testing_profile_| is destroyed.
   TestingProfile testing_profile_;
 
diff --git a/chrome/browser/sessions/tab_loader_unittest.cc b/chrome/browser/sessions/tab_loader_unittest.cc
index 1dd4a9a..219de8c 100644
--- a/chrome/browser/sessions/tab_loader_unittest.cc
+++ b/chrome/browser/sessions/tab_loader_unittest.cc
@@ -58,13 +58,15 @@
 
     TabLoaderTester::SetConstructionCallbackForTesting(nullptr);
     test_web_contents_factory_.reset();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
     test_policy_.reset();
   }
 
   void SimulateLoadTimeout() {
-    // Unfortunately there's no mock time in BrowserThreadBundle. Fast-forward
-    // things and simulate firing the timer.
+    // Unfortunately there's no mock time in BrowserTaskEnvironment.
+    // Fast-forward things and simulate firing the timer.
+    // TODO(crbug.com/905412): TaskEnvironment::TimeSource::MOCK_TIME now
+    // supports this.
     EXPECT_TRUE(tab_loader_.force_load_timer().IsRunning());
     clock_.SetNowTicks(tab_loader_.force_load_time());
     tab_loader_.force_load_timer().Stop();
@@ -147,7 +149,7 @@
   base::RepeatingCallback<void(TabLoader*)> construction_callback_;
 
   std::unique_ptr<content::TestWebContentsFactory> test_web_contents_factory_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile testing_profile_;
   std::unique_ptr<testing::ScopedAlwaysLoadSessionRestoreTestPolicy>
       test_policy_;
diff --git a/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer_unittest.cc b/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer_unittest.cc
index 731eb84..d8fcaee 100644
--- a/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer_unittest.cc
+++ b/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer_unittest.cc
@@ -123,7 +123,7 @@
         SharingServiceFactory::GetForBrowserContext(menu_.GetBrowserContext()));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   MockRenderViewContextMenu menu_{/* incognito= */ false};
   std::unique_ptr<content::WebContents> web_contents_;
   std::unique_ptr<ClickToCallContextMenuObserver> observer_;
diff --git a/chrome/browser/sharing/click_to_call/click_to_call_ui_controller_unittest.cc b/chrome/browser/sharing/click_to_call/click_to_call_ui_controller_unittest.cc
index e04de062..c110aa0 100644
--- a/chrome/browser/sharing/click_to_call/click_to_call_ui_controller_unittest.cc
+++ b/chrome/browser/sharing/click_to_call/click_to_call_ui_controller_unittest.cc
@@ -92,7 +92,7 @@
         SharingServiceFactory::GetForBrowserContext(&profile_));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<content::WebContents> web_contents_;
   ClickToCallUiController* controller_ = nullptr;
diff --git a/chrome/browser/sharing/click_to_call/click_to_call_utils_unittest.cc b/chrome/browser/sharing/click_to_call/click_to_call_utils_unittest.cc
index 9843dc9..cbaf3ada 100644
--- a/chrome/browser/sharing/click_to_call/click_to_call_utils_unittest.cc
+++ b/chrome/browser/sharing/click_to_call/click_to_call_utils_unittest.cc
@@ -80,7 +80,7 @@
   }
 
   base::test::ScopedFeatureList scoped_feature_list_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   bool create_service_ = true;
 
diff --git a/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer_unittest.cc b/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer_unittest.cc
index e6bd6bb..1e0fc529 100644
--- a/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer_unittest.cc
+++ b/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer_unittest.cc
@@ -121,7 +121,7 @@
         SharingServiceFactory::GetForBrowserContext(menu_.GetBrowserContext()));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   MockRenderViewContextMenu menu_{/* incognito= */ false};
   std::unique_ptr<content::WebContents> web_contents_;
   std::unique_ptr<SharedClipboardContextMenuObserver> observer_;
diff --git a/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller_unittest.cc b/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller_unittest.cc
index 9783602a..3afad06a 100644
--- a/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller_unittest.cc
+++ b/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller_unittest.cc
@@ -96,7 +96,7 @@
         SharingServiceFactory::GetForBrowserContext(&profile_));
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<content::WebContents> web_contents_;
   SharedClipboardUiController* controller_ = nullptr;
diff --git a/chrome/browser/sharing/shared_clipboard/shared_clipboard_utils_unittest.cc b/chrome/browser/sharing/shared_clipboard/shared_clipboard_utils_unittest.cc
index 28893cb..71394fa 100644
--- a/chrome/browser/sharing/shared_clipboard/shared_clipboard_utils_unittest.cc
+++ b/chrome/browser/sharing/shared_clipboard/shared_clipboard_utils_unittest.cc
@@ -76,7 +76,7 @@
   }
 
   base::test::ScopedFeatureList scoped_feature_list_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   bool create_service_ = true;
 
diff --git a/chrome/browser/sharing/sharing_device_registration_unittest.cc b/chrome/browser/sharing/sharing_device_registration_unittest.cc
index f1f48d7..3f83d2e6 100644
--- a/chrome/browser/sharing/sharing_device_registration_unittest.cc
+++ b/chrome/browser/sharing/sharing_device_registration_unittest.cc
@@ -160,7 +160,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle task_environment_{
+  content::BrowserTaskEnvironment task_environment_{
       base::test::TaskEnvironment::TimeSource::MOCK_TIME};
 
   sync_preferences::TestingPrefServiceSyncable prefs_;
diff --git a/chrome/browser/sharing/sharing_service_unittest.cc b/chrome/browser/sharing/sharing_service_unittest.cc
index 456b74e..13a873c3 100644
--- a/chrome/browser/sharing/sharing_service_unittest.cc
+++ b/chrome/browser/sharing/sharing_service_unittest.cc
@@ -217,7 +217,7 @@
   }
 
   base::test::ScopedFeatureList scoped_feature_list_;
-  content::TestBrowserThreadBundle task_environment_{
+  content::BrowserTaskEnvironment task_environment_{
       TaskEnvironment::TimeSource::MOCK_TIME};
 
   syncer::FakeDeviceInfoTracker device_info_tracker_;
diff --git a/chrome/browser/shell_integration_linux_unittest.cc b/chrome/browser/shell_integration_linux_unittest.cc
index 035ecd6..0b8745c 100644
--- a/chrome/browser/shell_integration_linux_unittest.cc
+++ b/chrome/browser/shell_integration_linux_unittest.cc
@@ -95,7 +95,7 @@
 }  // namespace
 
 TEST(ShellIntegrationTest, GetDataWriteLocation) {
-  content::TestBrowserThreadBundle test_browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   // Test that it returns $XDG_DATA_HOME.
   {
@@ -122,7 +122,7 @@
 }
 
 TEST(ShellIntegrationTest, GetDataSearchLocations) {
-  content::TestBrowserThreadBundle test_browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   // Test that it returns $XDG_DATA_HOME + $XDG_DATA_DIRS.
   {
@@ -190,7 +190,7 @@
   const char kTestData1[] = "a magical testing string";
   const char kTestData2[] = "a different testing string";
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   // Test that it searches $XDG_DATA_HOME/applications.
   {
@@ -284,7 +284,7 @@
   const char kApp2Filename[] = "chrome-extension2-Profile_Name_.desktop";
   const char kUnrelatedAppFilename[] = "chrome-extension-Other_Profile.desktop";
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   base::ScopedTempDir temp_dir;
   ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
diff --git a/chrome/browser/signin/account_consistency_mode_manager_unittest.cc b/chrome/browser/signin/account_consistency_mode_manager_unittest.cc
index c0c7261..102a5b1 100644
--- a/chrome/browser/signin/account_consistency_mode_manager_unittest.cc
+++ b/chrome/browser/signin/account_consistency_mode_manager_unittest.cc
@@ -39,7 +39,7 @@
 
 // Check the default account consistency method.
 TEST(AccountConsistencyModeManagerTest, DefaultValue) {
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   std::unique_ptr<TestingProfile> profile =
       BuildTestingProfile(/*is_new_profile=*/false);
 
@@ -60,7 +60,7 @@
 }
 
 TEST(AccountConsistencyModeManagerTest, Basic) {
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   struct TestCase {
     signin::AccountConsistencyMethod method;
@@ -97,7 +97,7 @@
 // startup.
 TEST(AccountConsistencyModeManagerTest, SigninAllowedChangesDiceState) {
   ScopedAccountConsistencyDice scoped_dice;
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   std::unique_ptr<TestingProfile> profile =
       BuildTestingProfile(/*is_new_profile=*/false);
 
@@ -133,7 +133,7 @@
 // The command line switch "disallow-signin" only affects the current run.
 TEST(AccountConsistencyModeManagerTest, DisallowSigninSwitch) {
   ScopedAccountConsistencyDice scoped_dice;
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   std::unique_ptr<TestingProfile> profile =
       BuildTestingProfile(/*is_new_profile=*/false);
 
@@ -165,7 +165,7 @@
 
 // Checks that Dice migration happens when the reconcilor is created.
 TEST(AccountConsistencyModeManagerTest, MigrateAtCreation) {
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   std::unique_ptr<TestingProfile> profile =
       BuildTestingProfile(/*is_new_profile=*/false);
 
@@ -191,7 +191,7 @@
 }
 
 TEST(AccountConsistencyModeManagerTest, ForceDiceMigration) {
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   std::unique_ptr<TestingProfile> profile =
       BuildTestingProfile(/*is_new_profile=*/false);
   EXPECT_EQ(signin::AccountConsistencyMethod::kDiceMigration,
@@ -223,7 +223,7 @@
 
 // Checks that new profiles are migrated at creation.
 TEST(AccountConsistencyModeManagerTest, NewProfile) {
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   ScopedAccountConsistencyDiceMigration scoped_dice_migration;
   std::unique_ptr<TestingProfile> profile =
       BuildTestingProfile(/*is_new_profile=*/true);
@@ -233,7 +233,7 @@
 
 TEST(AccountConsistencyModeManagerTest, DiceOnlyForRegularProfile) {
   ScopedAccountConsistencyDice scoped_dice;
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   {
     // Regular profile.
@@ -291,7 +291,7 @@
 #if defined(OS_CHROMEOS)
 TEST(AccountConsistencyModeManagerTest, MirrorDisabledForNonUnicorn) {
   // Creation of this object sets the current thread's id as UI thread.
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   TestingProfile profile;
   EXPECT_FALSE(
@@ -304,7 +304,7 @@
 
 TEST(AccountConsistencyModeManagerTest, MirrorEnabledByPreference) {
   // Creation of this object sets the current thread's id as UI thread.
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   TestingProfile::Builder profile_builder;
   {
@@ -329,7 +329,7 @@
 #if BUILDFLAG(ENABLE_MIRROR)
 // Test that Mirror is enabled for child accounts.
 TEST(AccountConsistencyModeManagerTest, MirrorChildAccount) {
-  content::TestBrowserThreadBundle test_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile profile;
   profile.SetSupervisedUserId(supervised_users::kChildAccountSUID);
   EXPECT_TRUE(
diff --git a/chrome/browser/signin/chrome_signin_client_unittest.cc b/chrome/browser/signin/chrome_signin_client_unittest.cc
index a9453723..4c8010b 100644
--- a/chrome/browser/signin/chrome_signin_client_unittest.cc
+++ b/chrome/browser/signin/chrome_signin_client_unittest.cc
@@ -87,7 +87,7 @@
   SigninClient* signin_client() { return signin_client_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<Profile> profile_;
   SigninClient* signin_client_;
 };
diff --git a/chrome/browser/signin/chrome_signin_helper_unittest.cc b/chrome/browser/signin/chrome_signin_helper_unittest.cc
index 5106024..0dffe57 100644
--- a/chrome/browser/signin/chrome_signin_helper_unittest.cc
+++ b/chrome/browser/signin/chrome_signin_helper_unittest.cc
@@ -103,11 +103,11 @@
 class ChromeSigninHelperTest : public testing::Test {
  protected:
   ChromeSigninHelperTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
   ~ChromeSigninHelperTest() override {}
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<net::TestDelegate> test_request_delegate_;
 };
 
diff --git a/chrome/browser/signin/chrome_signin_proxying_url_loader_factory_unittest.cc b/chrome/browser/signin/chrome_signin_proxying_url_loader_factory_unittest.cc
index f9fa315b..0985941 100644
--- a/chrome/browser/signin/chrome_signin_proxying_url_loader_factory_unittest.cc
+++ b/chrome/browser/signin/chrome_signin_proxying_url_loader_factory_unittest.cc
@@ -108,7 +108,7 @@
     proxying_factory_.reset();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<network::SimpleURLLoader> loader_;
   std::unique_ptr<ProxyingURLLoaderFactory> proxying_factory_;
   network::TestURLLoaderFactory test_factory_;
diff --git a/chrome/browser/signin/chrome_signin_status_metrics_provider_delegate_unittest.cc b/chrome/browser/signin/chrome_signin_status_metrics_provider_delegate_unittest.cc
index 1291a591..093bd912 100644
--- a/chrome/browser/signin/chrome_signin_status_metrics_provider_delegate_unittest.cc
+++ b/chrome/browser/signin/chrome_signin_status_metrics_provider_delegate_unittest.cc
@@ -14,7 +14,7 @@
 #if !defined(OS_ANDROID)
 TEST(ChromeSigninStatusMetricsProviderDelegateTest,
      UpdateStatusWhenBrowserAdded) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   std::unique_ptr<ChromeSigninStatusMetricsProviderDelegate> delegate(
       new ChromeSigninStatusMetricsProviderDelegate);
diff --git a/chrome/browser/signin/dice_response_handler_unittest.cc b/chrome/browser/signin/dice_response_handler_unittest.cc
index 0a197fdc..902fa97 100644
--- a/chrome/browser/signin/dice_response_handler_unittest.cc
+++ b/chrome/browser/signin/dice_response_handler_unittest.cc
@@ -697,7 +697,7 @@
 // Tests that the DiceResponseHandler is created for a normal profile but not
 // for an incognito profile.
 TEST(DiceResponseHandlerFactoryTest, NotInIncognito) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile profile;
   EXPECT_THAT(DiceResponseHandler::GetForProfile(&profile), testing::NotNull());
   EXPECT_THAT(
diff --git a/chrome/browser/signin/local_auth_unittest.cc b/chrome/browser/signin/local_auth_unittest.cc
index 7f86dbc7..4a42bab1 100644
--- a/chrome/browser/signin/local_auth_unittest.cc
+++ b/chrome/browser/signin/local_auth_unittest.cc
@@ -27,7 +27,7 @@
   ~LocalAuthTest() override { OSCryptMocker::TearDown(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(LocalAuthTest, SetAndCheckCredentials) {
diff --git a/chrome/browser/signin/signin_global_error_unittest.cc b/chrome/browser/signin/signin_global_error_unittest.cc
index 199e351..98fb1c8 100644
--- a/chrome/browser/signin/signin_global_error_unittest.cc
+++ b/chrome/browser/signin/signin_global_error_unittest.cc
@@ -90,7 +90,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   TestingProfile* profile_;
 
diff --git a/chrome/browser/signin/signin_profile_attributes_updater_unittest.cc b/chrome/browser/signin/signin_profile_attributes_updater_unittest.cc
index 12a7743..871f057c 100644
--- a/chrome/browser/signin/signin_profile_attributes_updater_unittest.cc
+++ b/chrome/browser/signin/signin_profile_attributes_updater_unittest.cc
@@ -58,7 +58,7 @@
     RecreateSigninProfileAttributesUpdater();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   base::FilePath profile_path_;
   signin::IdentityTestEnvironment identity_test_env_;
diff --git a/chrome/browser/signin/signin_ui_util_unittest.cc b/chrome/browser/signin/signin_ui_util_unittest.cc
index fc46814..432178d 100644
--- a/chrome/browser/signin/signin_ui_util_unittest.cc
+++ b/chrome/browser/signin/signin_ui_util_unittest.cc
@@ -82,7 +82,7 @@
  public:
   DiceSigninUiUtilTest()
       : BrowserWithTestWindowTest(
-            content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+            content::BrowserTaskEnvironment::IO_MAINLOOP) {}
   ~DiceSigninUiUtilTest() override = default;
 
   struct CreateDiceTurnSyncOnHelperParams {
diff --git a/chrome/browser/site_isolation/site_isolation_policy_unittest.cc b/chrome/browser/site_isolation/site_isolation_policy_unittest.cc
index 866f69b..7c18dba 100644
--- a/chrome/browser/site_isolation/site_isolation_policy_unittest.cc
+++ b/chrome/browser/site_isolation/site_isolation_policy_unittest.cc
@@ -27,7 +27,7 @@
   TestingProfileManager* manager() { return &manager_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager manager_;
 
   DISALLOW_COPY_AND_ASSIGN(SiteIsolationPolicyTest);
diff --git a/chrome/browser/spellchecker/spell_check_host_chrome_impl_unittest.cc b/chrome/browser/spellchecker/spell_check_host_chrome_impl_unittest.cc
index 83cf0cb..4b51b29 100644
--- a/chrome/browser/spellchecker/spell_check_host_chrome_impl_unittest.cc
+++ b/chrome/browser/spellchecker/spell_check_host_chrome_impl_unittest.cc
@@ -38,7 +38,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile testing_profile_;
   std::unique_ptr<SpellcheckService> spellcheck_;
 
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
index cc3e9ac..ddf9b60 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
@@ -68,7 +68,7 @@
 class SpellcheckCustomDictionaryTest : public testing::Test {
  public:
   SpellcheckCustomDictionaryTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
  protected:
   void SetUp() override {
@@ -115,7 +115,7 @@
     return dictionary.Apply(change);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   TestingProfile profile_;
 };
diff --git a/chrome/browser/spellchecker/spellcheck_service_unittest.cc b/chrome/browser/spellchecker/spellcheck_service_unittest.cc
index c2cab60..7f41b2679 100644
--- a/chrome/browser/spellchecker/spellcheck_service_unittest.cc
+++ b/chrome/browser/spellchecker/spellcheck_service_unittest.cc
@@ -103,7 +103,7 @@
   struct : public base::SupportsUserData {
   } context_;
   TestingPrefServiceSimple prefs_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(SpellcheckServiceUnitTest);
 };
diff --git a/chrome/browser/spellchecker/spelling_service_client_unittest.cc b/chrome/browser/spellchecker/spelling_service_client_unittest.cc
index 4631c94..b595055 100644
--- a/chrome/browser/spellchecker/spelling_service_client_unittest.cc
+++ b/chrome/browser/spellchecker/spelling_service_client_unittest.cc
@@ -127,7 +127,7 @@
     return false;
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingSpellingServiceClient client_;
   TestingProfile profile_;
   base::test::ScopedFeatureList scoped_feature_list_;
@@ -207,7 +207,7 @@
       base::WideToUTF16(test_case.request_text),
       base::BindOnce(&SpellingServiceClientTest::OnTextCheckComplete,
                      base::Unretained(this), 0));
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   // Verify that the expected endpoint was hit (REST vs RPC).
   ASSERT_EQ(requested_url.path(), expected_request_url.path());
diff --git a/chrome/browser/ssl/ssl_error_handler_unittest.cc b/chrome/browser/ssl/ssl_error_handler_unittest.cc
index 5ddb4db..eabf030 100644
--- a/chrome/browser/ssl/ssl_error_handler_unittest.cc
+++ b/chrome/browser/ssl/ssl_error_handler_unittest.cc
@@ -595,7 +595,7 @@
  public:
   SSLErrorHandlerDateInvalidTest()
       : ChromeRenderViewHostTestHarness(
-            content::TestBrowserThreadBundle::REAL_IO_THREAD),
+            content::BrowserTaskEnvironment::REAL_IO_THREAD),
         field_trial_test_(new network_time::FieldTrialTest()),
         clock_(new base::SimpleTestClock),
         tick_clock_(new base::SimpleTestTickClock),
diff --git a/chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc b/chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc
index 46ea0eb..d92a84a0 100644
--- a/chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc
+++ b/chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc
@@ -75,7 +75,7 @@
  private:
   base::ScopedTempDir scoped_dir_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::HistogramTester histogram_tester_;
   TestingProfile testing_profile_;
 
diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service_unittest.cc b/chrome/browser/supervised_user/child_accounts/child_account_service_unittest.cc
index ba5ce09..2ab891da 100644
--- a/chrome/browser/supervised_user/child_accounts/child_account_service_unittest.cc
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service_unittest.cc
@@ -54,7 +54,7 @@
         ->GetAccountsCookieMutator();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestingProfile> profile_;
 };
diff --git a/chrome/browser/supervised_user/kids_management_url_checker_client_unittest.cc b/chrome/browser/supervised_user/kids_management_url_checker_client_unittest.cc
index 9b555ad..84b02f8 100644
--- a/chrome/browser/supervised_user/kids_management_url_checker_client_unittest.cc
+++ b/chrome/browser/supervised_user/kids_management_url_checker_client_unittest.cc
@@ -142,7 +142,7 @@
                void(const GURL& url,
                     safe_search_api::ClientClassification classification));
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile* test_profile_;
   std::unique_ptr<TestingProfileManager> test_profile_manager_;
   std::unique_ptr<KidsManagementURLCheckerClient> url_classifier_;
diff --git a/chrome/browser/supervised_user/supervised_user_service_unittest.cc b/chrome/browser/supervised_user/supervised_user_service_unittest.cc
index 67dcbd1..49a4ad8 100644
--- a/chrome/browser/supervised_user/supervised_user_service_unittest.cc
+++ b/chrome/browser/supervised_user/supervised_user_service_unittest.cc
@@ -212,7 +212,7 @@
 
   std::unique_ptr<IdentityTestEnvironmentProfileAdaptor>
       identity_test_environment_adaptor_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   SupervisedUserService* supervised_user_service_;
 };
@@ -502,7 +502,7 @@
        DISABLED_ExtensionManagementPolicyProviderWithSUInitiatedInstalls) {
   // Enable supervised user initiated installs.
   // TODO(crbug.com/846380): ScopedFeatureList must be initialized before the
-  // TestBrowserThreadBundle in ExtensionServiceTestBase to avoid races between
+  // BrowserTaskEnvironment in ExtensionServiceTestBase to avoid races between
   // threads.
   base::test::ScopedFeatureList scoped_feature_list;
   scoped_feature_list.InitAndEnableFeature(
diff --git a/chrome/browser/supervised_user/supervised_user_settings_service_unittest.cc b/chrome/browser/supervised_user/supervised_user_settings_service_unittest.cc
index 21a5bfd3..b18ed2e 100644
--- a/chrome/browser/supervised_user/supervised_user_settings_service_unittest.cc
+++ b/chrome/browser/supervised_user/supervised_user_settings_service_unittest.cc
@@ -135,7 +135,7 @@
 
   void TearDown() override { settings_service_.Shutdown(); }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::DictionaryValue split_items_;
   std::unique_ptr<base::Value> atomic_setting_value_;
   SupervisedUserSettingsService settings_service_;
diff --git a/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc b/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc
index a1490b6..4ef2f62 100644
--- a/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc
+++ b/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc
@@ -158,7 +158,7 @@
       site_lists_changed_callback_.Run();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 
 #if !defined(OS_ANDROID)
diff --git a/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc b/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc
index 44b0b2c8..d89c91b9 100644
--- a/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc
+++ b/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc
@@ -72,7 +72,7 @@
   ~SyncChromeExtensionsActivityMonitorTest() override {}
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  protected:
   ExtensionsActivityMonitor monitor_;
diff --git a/chrome/browser/sync/profile_sync_service_factory_unittest.cc b/chrome/browser/sync/profile_sync_service_factory_unittest.cc
index 0da9a74..e85985d 100644
--- a/chrome/browser/sync/profile_sync_service_factory_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_factory_unittest.cc
@@ -153,7 +153,7 @@
   Profile* profile() { return profile_.get(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 };
 
diff --git a/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc b/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
index ab0338e..dc218fec 100644
--- a/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
@@ -53,7 +53,7 @@
   typedef FakeRemoteChangeProcessor::URLToFileChangesMap URLToFileChangesMap;
 
   ConflictResolverTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
   ~ConflictResolverTest() override {}
 
   void SetUp() override {
@@ -264,7 +264,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir database_dir_;
   std::unique_ptr<leveldb::Env> in_memory_env_;
 
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
index 7c391446..45b52111 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
@@ -80,7 +80,7 @@
                              public RemoteFileSyncService::Observer {
  public:
   DriveBackendSyncTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         pending_remote_changes_(0),
         pending_local_changes_(0) {}
   ~DriveBackendSyncTest() override {}
@@ -605,7 +605,7 @@
     return sync_worker()->context_->metadata_database_.get();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::ScopedTempDir base_dir_;
   std::unique_ptr<leveldb::Env> in_memory_env_;
diff --git a/chrome/browser/sync_file_system/drive_backend/list_changes_task_unittest.cc b/chrome/browser/sync_file_system/drive_backend/list_changes_task_unittest.cc
index 922dca2..ba9b63d 100644
--- a/chrome/browser/sync_file_system/drive_backend/list_changes_task_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/list_changes_task_unittest.cc
@@ -40,7 +40,7 @@
 class ListChangesTaskTest : public testing::Test {
  public:
   ListChangesTaskTest()
-      : browser_threads_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : browser_threads_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
   ~ListChangesTaskTest() override {}
 
   void SetUp() override {
@@ -199,7 +199,7 @@
   std::string app_root_folder_id_;
   std::string unregistered_app_root_folder_id_;
 
-  content::TestBrowserThreadBundle browser_threads_;
+  content::BrowserTaskEnvironment browser_threads_;
   base::ScopedTempDir database_dir_;
 
   std::unique_ptr<SyncEngineContext> context_;
diff --git a/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer_unittest.cc b/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer_unittest.cc
index b78d82c3..5c21932 100644
--- a/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer_unittest.cc
@@ -54,7 +54,7 @@
 class LocalToRemoteSyncerTest : public testing::Test {
  public:
   LocalToRemoteSyncerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
   ~LocalToRemoteSyncerTest() override {}
 
   void SetUp() override {
@@ -248,7 +248,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir database_dir_;
   std::unique_ptr<leveldb::Env> in_memory_env_;
 
diff --git a/chrome/browser/sync_file_system/drive_backend/register_app_task_unittest.cc b/chrome/browser/sync_file_system/drive_backend/register_app_task_unittest.cc
index a97973d..350fa86 100644
--- a/chrome/browser/sync_file_system/drive_backend/register_app_task_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/register_app_task_unittest.cc
@@ -266,7 +266,7 @@
   int64_t next_file_id_;
   int64_t next_tracker_id_;
 
-  content::TestBrowserThreadBundle browser_threads_;
+  content::BrowserTaskEnvironment browser_threads_;
   base::ScopedTempDir database_dir_;
 
   std::unique_ptr<SyncEngineContext> context_;
diff --git a/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc b/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc
index 732c1500..514da7d4 100644
--- a/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc
@@ -50,7 +50,7 @@
   typedef FakeRemoteChangeProcessor::URLToFileChangesMap URLToFileChangesMap;
 
   RemoteToLocalSyncerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
   ~RemoteToLocalSyncerTest() override {}
 
   void SetUp() override {
@@ -229,7 +229,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir database_dir_;
   std::unique_ptr<leveldb::Env> in_memory_env_;
 
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine_initializer_unittest.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine_initializer_unittest.cc
index 92ff1a0..c403c9e 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine_initializer_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine_initializer_unittest.cc
@@ -212,7 +212,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle browser_threads_;
+  content::BrowserTaskEnvironment browser_threads_;
   base::ScopedTempDir database_dir_;
   std::unique_ptr<leveldb::Env> in_memory_env_;
 
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine_unittest.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine_unittest.cc
index 99f55e88..8825682 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine_unittest.cc
@@ -122,7 +122,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle browser_threads_;
+  content::BrowserTaskEnvironment browser_threads_;
   base::ScopedTempDir profile_dir_;
   std::unique_ptr<drive_backend::SyncEngine> sync_engine_;
 
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc b/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc
index 6859a69..27e1a89 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc
@@ -157,7 +157,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle browser_threads_;
+  content::BrowserTaskEnvironment browser_threads_;
   base::ScopedTempDir profile_dir_;
   std::unique_ptr<leveldb::Env> in_memory_env_;
 
diff --git a/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc b/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc
index f16a785..a1b8d1fb 100644
--- a/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc
+++ b/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc
@@ -40,7 +40,7 @@
 class LocalFileChangeTrackerTest : public testing::Test {
  public:
   LocalFileChangeTrackerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         in_memory_env_(leveldb_chrome::NewMemEnv("LocalFileChangeTrackerTest")),
         file_system_(GURL("http://example.com"),
                      in_memory_env_.get(),
@@ -113,7 +113,7 @@
     change_tracker()->GetAllChangedURLs(urls);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir base_dir_;
   std::unique_ptr<leveldb::Env> in_memory_env_;
   CannedSyncableFileSystem file_system_;
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
index 8a38eba..1653f270 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
@@ -58,7 +58,7 @@
 class LocalFileSyncContextTest : public testing::Test {
  protected:
   LocalFileSyncContextTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD),
         status_(SYNC_FILE_ERROR_FAILED),
         file_error_(base::File::FILE_ERROR_FAILED),
         async_modify_finished_(false),
@@ -346,7 +346,7 @@
   std::unique_ptr<leveldb::Env> in_memory_env_;
 
   // These need to remain until the very end.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
   scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc b/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc
index 46abf010..7d5ceb7 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc
@@ -108,7 +108,7 @@
       public LocalFileSyncService::Observer {
  protected:
   LocalFileSyncServiceTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD),
         num_changes_(0) {}
 
   void SetUp() override {
@@ -197,7 +197,7 @@
     return file_system_->backend()->change_tracker()->num_changes();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::ScopedTempDir temp_dir_;
   std::unique_ptr<leveldb::Env> in_memory_env_;
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_status_unittest.cc b/chrome/browser/sync_file_system/local/local_file_sync_status_unittest.cc
index d043dbe8..b78bccd 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_status_unittest.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_status_unittest.cc
@@ -31,10 +31,10 @@
 class LocalFileSyncStatusTest : public testing::Test {
  public:
   LocalFileSyncStatusTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(LocalFileSyncStatusTest, WritingSimple) {
diff --git a/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc b/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc
index ad1adee6..9a88721 100644
--- a/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc
+++ b/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc
@@ -55,7 +55,7 @@
   // Use the current thread as IO thread so that we can directly call
   // operations in the tests.
   SyncableFileOperationRunnerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
+      : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP),
         in_memory_env_(
             leveldb_chrome::NewMemEnv("SyncableFileOperationRunnerTest")),
         file_system_(GURL("http://example.com"),
@@ -143,7 +143,7 @@
     return base::CreateTemporaryFileInDir(dir_.GetPath(), path);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::ScopedTempDir dir_;
   std::unique_ptr<leveldb::Env> in_memory_env_;
diff --git a/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc b/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc
index 6aa6600..07262a5 100644
--- a/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc
+++ b/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc
@@ -97,7 +97,7 @@
   }
 
   base::ScopedTempDir data_dir_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<leveldb::Env> in_memory_env_;
   CannedSyncableFileSystem file_system_;
 
diff --git a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
index 18e5da70..b507d6fc 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
@@ -129,7 +129,7 @@
 class SyncFileSystemServiceTest : public testing::Test {
  protected:
   SyncFileSystemServiceTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {}
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD) {}
 
   void SetUp() override {
     in_memory_env_ = leveldb_chrome::NewMemEnv("SyncFileSystemServiceTest");
@@ -261,7 +261,7 @@
     sync_service_->SetSyncEnabledForTesting(true);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<leveldb::Env> in_memory_env_;
   TestingProfile profile_;
   std::unique_ptr<CannedSyncableFileSystem> file_system_;
diff --git a/chrome/browser/task_manager/providers/child_process_task_unittest.cc b/chrome/browser/task_manager/providers/child_process_task_unittest.cc
index 4d6a3daa..0defefd 100644
--- a/chrome/browser/task_manager/providers/child_process_task_unittest.cc
+++ b/chrome/browser/task_manager/providers/child_process_task_unittest.cc
@@ -77,7 +77,7 @@
   std::map<base::ProcessHandle, Task*> provided_tasks_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(ChildProcessTaskTest);
 };
diff --git a/chrome/browser/task_manager/providers/fallback_task_provider_unittest.cc b/chrome/browser/task_manager/providers/fallback_task_provider_unittest.cc
index c847db2..0729a61 100644
--- a/chrome/browser/task_manager/providers/fallback_task_provider_unittest.cc
+++ b/chrome/browser/task_manager/providers/fallback_task_provider_unittest.cc
@@ -150,7 +150,7 @@
   std::vector<Task*> seen_tasks() { return seen_tasks_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<FallbackTaskProvider> task_provider_;
   std::vector<Task*> seen_tasks_;
 
diff --git a/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc b/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc
index f3bbf5b8..2e4ade1 100644
--- a/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc
+++ b/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc
@@ -94,7 +94,7 @@
   base::Time start_time_;
   base::TimeDelta cpu_time_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<base::SequencedTaskRunner> blocking_pool_runner_;
   scoped_refptr<SharedSampler> shared_sampler_;
 
diff --git a/chrome/browser/task_manager/sampling/task_group_unittest.cc b/chrome/browser/task_manager/sampling/task_group_unittest.cc
index 44fe39e..c697287 100644
--- a/chrome/browser/task_manager/sampling/task_group_unittest.cc
+++ b/chrome/browser/task_manager/sampling/task_group_unittest.cc
@@ -83,7 +83,7 @@
     task_group_->AddTask(fake_task_.get());
   }
 
-  content::TestBrowserThreadBundle browser_threads_;
+  content::BrowserTaskEnvironment browser_threads_;
   scoped_refptr<base::SequencedTaskRunner> io_task_runner_;
   std::unique_ptr<base::RunLoop> run_loop_;
   std::unique_ptr<TaskGroup> task_group_;
diff --git a/chrome/browser/task_manager/sampling/task_manager_impl_unittest.cc b/chrome/browser/task_manager/sampling/task_manager_impl_unittest.cc
index af13230..5f91a0345 100644
--- a/chrome/browser/task_manager/sampling/task_manager_impl_unittest.cc
+++ b/chrome/browser/task_manager/sampling/task_manager_impl_unittest.cc
@@ -92,7 +92,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::vector<std::unique_ptr<FakeTask>> tasks_;
   DISALLOW_COPY_AND_ASSIGN(TaskManagerImplTest);
 };
diff --git a/chrome/browser/themes/browser_theme_pack_unittest.cc b/chrome/browser/themes/browser_theme_pack_unittest.cc
index b4e6a4b..c9856321 100644
--- a/chrome/browser/themes/browser_theme_pack_unittest.cc
+++ b/chrome/browser/themes/browser_theme_pack_unittest.cc
@@ -114,7 +114,7 @@
 
   ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   scoped_refptr<BrowserThemePack> theme_pack_;
 };
 
diff --git a/chrome/browser/themes/theme_syncable_service_unittest.cc b/chrome/browser/themes/theme_syncable_service_unittest.cc
index 74543546f..d47a9c4a 100644
--- a/chrome/browser/themes/theme_syncable_service_unittest.cc
+++ b/chrome/browser/themes/theme_syncable_service_unittest.cc
@@ -244,7 +244,7 @@
   }
 
   // Needed for setting up extension service.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
 #if defined OS_CHROMEOS
   chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
diff --git a/chrome/browser/tracing/background_tracing_field_trial_unittest.cc b/chrome/browser/tracing/background_tracing_field_trial_unittest.cc
index fb759138..d7a875dc 100644
--- a/chrome/browser/tracing/background_tracing_field_trial_unittest.cc
+++ b/chrome/browser/tracing/background_tracing_field_trial_unittest.cc
@@ -25,7 +25,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 namespace {
diff --git a/chrome/browser/tracing/background_tracing_metrics_provider_unittest.cc b/chrome/browser/tracing/background_tracing_metrics_provider_unittest.cc
index 8187175..984a723 100644
--- a/chrome/browser/tracing/background_tracing_metrics_provider_unittest.cc
+++ b/chrome/browser/tracing/background_tracing_metrics_provider_unittest.cc
@@ -52,7 +52,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(BackgroundTracingMetricsProviderTest, NoTraceData) {
diff --git a/chrome/browser/translate/translate_service_unittest.cc b/chrome/browser/translate/translate_service_unittest.cc
index 99c79b5..96980e26 100644
--- a/chrome/browser/translate/translate_service_unittest.cc
+++ b/chrome/browser/translate/translate_service_unittest.cc
@@ -50,7 +50,7 @@
 
 // Tests that download and history URLs are not translatable.
 TEST(TranslateServiceTest, DownloadsAndHistoryNotTranslated) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TranslateService::InitializeForTesting(
       network::mojom::ConnectionType::CONNECTION_WIFI);
   EXPECT_FALSE(
diff --git a/chrome/browser/ui/android/tab_model/tab_model_unittest.cc b/chrome/browser/ui/android/tab_model/tab_model_unittest.cc
index edc31823..57726c7 100644
--- a/chrome/browser/ui/android/tab_model/tab_model_unittest.cc
+++ b/chrome/browser/ui/android/tab_model/tab_model_unittest.cc
@@ -13,7 +13,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 
 class TabModelTest : public testing::Test {
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 namespace {
diff --git a/chrome/browser/ui/app_list/arc/arc_app_utils_unittest.cc b/chrome/browser/ui/app_list/arc/arc_app_utils_unittest.cc
index 30cd781..593357d5 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_utils_unittest.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_utils_unittest.cc
@@ -95,14 +95,14 @@
 // Tests that IsArcItem does not crash or DCHECK with invalid crx file ids.
 TEST_F(ArcAppUtilsTest, IsArcItemDoesNotCrashWithInvalidCrxFileIds) {
   // TestingProfile checks CurrentlyOn(cotnent::BrowserThread::UI).
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile testing_profile;
   EXPECT_FALSE(arc::IsArcItem(&testing_profile, std::string()));
   EXPECT_FALSE(arc::IsArcItem(&testing_profile, "ShelfWindowWatcher0"));
 }
 
 TEST_F(ArcAppUtilsTest, GetAndroidId) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile testing_profile;
 
   // ARC++ is not running.
diff --git a/chrome/browser/ui/app_list/search/logging/search_ranking_event_logger_unittest.cc b/chrome/browser/ui/app_list/search/logging/search_ranking_event_logger_unittest.cc
index ff1c6e4..e8de4a9 100644
--- a/chrome/browser/ui/app_list/search/logging/search_ranking_event_logger_unittest.cc
+++ b/chrome/browser/ui/app_list/search/logging/search_ranking_event_logger_unittest.cc
@@ -202,7 +202,7 @@
   // all tasks and then all the tasks on the current one to complete as well.
   void Wait() {
     history::BlockUntilHistoryProcessesPendingRequests(history_service_.get());
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   // Wait for a background UKM event to finish processing. This is necessary if
@@ -217,7 +217,7 @@
     run_loop.Run();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedMockClockOverride time_;
   base::ScopedTempDir history_dir_;
   base::test::ScopedFeatureList scoped_feature_list_;
diff --git a/chrome/browser/ui/app_list/search/search_result_ranker/search_result_ranker_unittest.cc b/chrome/browser/ui/app_list/search/search_result_ranker/search_result_ranker_unittest.cc
index 7e5548d7..9a5225d0 100644
--- a/chrome/browser/ui/app_list/search/search_result_ranker/search_result_ranker_unittest.cc
+++ b/chrome/browser/ui/app_list/search/search_result_ranker/search_result_ranker_unittest.cc
@@ -87,7 +87,7 @@
 class SearchResultRankerTest : public testing::Test {
  public:
   SearchResultRankerTest()
-      : thread_bundle_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
   ~SearchResultRankerTest() override {}
 
   // testing::Test overrides:
@@ -137,9 +137,9 @@
 
   history::HistoryService* history_service() { return history_service_.get(); }
 
-  void Wait() { thread_bundle_.RunUntilIdle(); }
+  void Wait() { task_environment_.RunUntilIdle(); }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // This is used only to make the ownership clear for the TestSearchResult
   // objects that the return value of MakeSearchResults() contains raw pointers
diff --git a/chrome/browser/ui/ash/accessibility/accessibility_controller_client_unittest.cc b/chrome/browser/ui/ash/accessibility/accessibility_controller_client_unittest.cc
index 22c02f1d..d220532 100644
--- a/chrome/browser/ui/ash/accessibility/accessibility_controller_client_unittest.cc
+++ b/chrome/browser/ui/ash/accessibility/accessibility_controller_client_unittest.cc
@@ -74,7 +74,7 @@
   ~AccessibilityControllerClientTest() override = default;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestServiceManagerContext context_;
 
   DISALLOW_COPY_AND_ASSIGN(AccessibilityControllerClientTest);
diff --git a/chrome/browser/ui/ash/network/mobile_data_notifications_unittest.cc b/chrome/browser/ui/ash/network/mobile_data_notifications_unittest.cc
index 1f06ce1..0bb9a03 100644
--- a/chrome/browser/ui/ash/network/mobile_data_notifications_unittest.cc
+++ b/chrome/browser/ui/ash/network/mobile_data_notifications_unittest.cc
@@ -155,7 +155,7 @@
     ASSERT_TRUE(ProfileManager::GetActiveUserProfile() == profile);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   session_manager::SessionManager session_manager_;
   std::unique_ptr<MobileDataNotifications> mobile_data_notifications_;
   std::unique_ptr<NetworkConnectTestDelegate> network_connect_delegate_;
diff --git a/chrome/browser/ui/ash/session_controller_client_impl_unittest.cc b/chrome/browser/ui/ash/session_controller_client_impl_unittest.cc
index 7bee1ec..1f856312 100644
--- a/chrome/browser/ui/ash/session_controller_client_impl_unittest.cc
+++ b/chrome/browser/ui/ash/session_controller_client_impl_unittest.cc
@@ -185,7 +185,7 @@
     return profile;
   }
 
-  content::TestBrowserThreadBundle threads_;
+  content::BrowserTaskEnvironment threads_;
   content::TestServiceManagerContext context_;
   std::unique_ptr<TestingProfileManager> profile_manager_;
   std::unique_ptr<AssistantClient> assistant_client_;
diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
index acf1469..c7c699c 100644
--- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
@@ -92,7 +92,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   BookmarkModel* model_;
   TestingPageNavigator navigator_;
diff --git a/chrome/browser/ui/bookmarks/bookmark_ui_utils_desktop_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_ui_utils_desktop_unittest.cc
index 059199f..4648c15c 100644
--- a/chrome/browser/ui/bookmarks/bookmark_ui_utils_desktop_unittest.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_ui_utils_desktop_unittest.cc
@@ -19,7 +19,7 @@
 namespace {
 
 class BookmarkUIUtilsTest : public testing::Test {
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(BookmarkUIUtilsTest, HasBookmarkURLs) {
diff --git a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model_unittest.cc b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model_unittest.cc
index 750cdc4..8056fad9 100644
--- a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model_unittest.cc
+++ b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model_unittest.cc
@@ -48,7 +48,7 @@
   RecentlyUsedFoldersComboModelTest() = default;
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(RecentlyUsedFoldersComboModelTest);
 };
diff --git a/chrome/browser/ui/browser_close_unittest.cc b/chrome/browser/ui/browser_close_unittest.cc
index 7a94866..bbe5a7ef 100644
--- a/chrome/browser/ui/browser_close_unittest.cc
+++ b/chrome/browser/ui/browser_close_unittest.cc
@@ -174,7 +174,7 @@
   std::map<Profile*, std::vector<TestBrowserWindow*>> browser_windows_;
   std::map<Profile*, std::vector<Browser*>> browsers_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   int name_index_;
 };
diff --git a/chrome/browser/ui/chrome_select_file_policy_unittest.cc b/chrome/browser/ui/chrome_select_file_policy_unittest.cc
index ec5252a..eea13ab3 100644
--- a/chrome/browser/ui/chrome_select_file_policy_unittest.cc
+++ b/chrome/browser/ui/chrome_select_file_policy_unittest.cc
@@ -80,7 +80,7 @@
 // Tests if SelectFileDialog::SelectFile returns asynchronously with
 // file-selection dialogs disabled by policy.
 TEST_F(ChromeSelectFilePolicyTest, MAYBE_ExpectAsynchronousListenerCall) {
-  content::TestBrowserThreadBundle test_browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   ScopedTestingLocalState local_state(TestingBrowserProcess::GetGlobal());
 
diff --git a/chrome/browser/ui/cocoa/tab_menu_bridge_unittest.mm b/chrome/browser/ui/cocoa/tab_menu_bridge_unittest.mm
index 2a9121c..be4fcd8 100644
--- a/chrome/browser/ui/cocoa/tab_menu_bridge_unittest.mm
+++ b/chrome/browser/ui/cocoa/tab_menu_bridge_unittest.mm
@@ -132,7 +132,7 @@
 
   NSMenuItem* SeparatorItem() { return [NSMenuItem separatorItem]; }
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<content::RenderViewHostTestEnabler> rvh_test_enabler_;
diff --git a/chrome/browser/ui/cocoa/test/cocoa_profile_test.h b/chrome/browser/ui/cocoa/test/cocoa_profile_test.h
index 83f0385d..5b16721 100644
--- a/chrome/browser/ui/cocoa/test/cocoa_profile_test.h
+++ b/chrome/browser/ui/cocoa/test/cocoa_profile_test.h
@@ -13,7 +13,7 @@
 #include "ui/views/test/scoped_views_test_helper.h"
 
 namespace content {
-class TestBrowserThreadBundle;
+class BrowserTaskEnvironment;
 }
 
 class Browser;
@@ -59,7 +59,7 @@
   virtual Browser* CreateBrowser();
 
  private:
-  std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
+  std::unique_ptr<content::BrowserTaskEnvironment> task_environment_;
 
   views::ScopedViewsTestHelper views_helper_;
 
diff --git a/chrome/browser/ui/cocoa/test/cocoa_profile_test.mm b/chrome/browser/ui/cocoa/test/cocoa_profile_test.mm
index f161761..0ea478a36 100644
--- a/chrome/browser/ui/cocoa/test/cocoa_profile_test.mm
+++ b/chrome/browser/ui/cocoa/test/cocoa_profile_test.mm
@@ -28,7 +28,7 @@
 #include "ui/views/test/widget_test.h"
 
 CocoaProfileTest::CocoaProfileTest()
-    : thread_bundle_(new content::TestBrowserThreadBundle),
+    : task_environment_(new content::BrowserTaskEnvironment),
       views_helper_(std::make_unique<ChromeTestViewsDelegate>()),
       profile_manager_(TestingBrowserProcess::GetGlobal()),
       profile_(nullptr) {}
diff --git a/chrome/browser/ui/in_product_help/active_tab_tracker_unittest.cc b/chrome/browser/ui/in_product_help/active_tab_tracker_unittest.cc
index 3722095..f9b900e6 100644
--- a/chrome/browser/ui/in_product_help/active_tab_tracker_unittest.cc
+++ b/chrome/browser/ui/in_product_help/active_tab_tracker_unittest.cc
@@ -61,9 +61,9 @@
   base::SimpleTestTickClock* clock() { return &clock_; }
 
  private:
-  // A |TestBrowserThreadBundle| is needed for creating and using
+  // A |BrowserTaskEnvironment| is needed for creating and using
   // |WebContents|es in a unit test.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   base::SimpleTestTickClock clock_;
 };
diff --git a/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk_unittest.cc b/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk_unittest.cc
index 0873e93..952451ae 100644
--- a/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk_unittest.cc
+++ b/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk_unittest.cc
@@ -99,7 +99,7 @@
 
 // Flaky, see crbug.com/853079.
 TEST_F(SelectFileDialogImplGtkTest, DISABLED_SelectExistingFolder) {
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedTestingLocalState local_state(TestingBrowserProcess::GetGlobal());
 
   FilePicker file_picker(ui::SelectFileDialog::SELECT_EXISTING_FOLDER);
@@ -114,7 +114,7 @@
 
 // Flaky, see crbug.com/853079.
 TEST_F(SelectFileDialogImplGtkTest, DISABLED_SelectUploadFolder) {
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedTestingLocalState local_state(TestingBrowserProcess::GetGlobal());
 
   FilePicker file_picker(ui::SelectFileDialog::SELECT_UPLOAD_FOLDER);
@@ -129,7 +129,7 @@
 
 // Flaky, see crbug.com/853079.
 TEST_F(SelectFileDialogImplGtkTest, DISABLED_SelectFolder) {
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedTestingLocalState local_state(TestingBrowserProcess::GetGlobal());
 
   FilePicker file_picker(ui::SelectFileDialog::SELECT_FOLDER);
diff --git a/chrome/browser/ui/media_router/media_router_file_dialog_unittest.cc b/chrome/browser/ui/media_router/media_router_file_dialog_unittest.cc
index 2e78d559..734caaffd 100644
--- a/chrome/browser/ui/media_router/media_router_file_dialog_unittest.cc
+++ b/chrome/browser/ui/media_router/media_router_file_dialog_unittest.cc
@@ -116,7 +116,7 @@
   base::FilePath fake_path;
   base::string16 fake_path_name;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(MediaRouterFileDialogTest, SelectFileSuccess) {
diff --git a/chrome/browser/ui/media_router/media_router_ui_service_factory_unittest.cc b/chrome/browser/ui/media_router/media_router_ui_service_factory_unittest.cc
index 2d70f50..29908973 100644
--- a/chrome/browser/ui/media_router/media_router_ui_service_factory_unittest.cc
+++ b/chrome/browser/ui/media_router/media_router_ui_service_factory_unittest.cc
@@ -56,7 +56,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 };
 
diff --git a/chrome/browser/ui/media_router/query_result_manager_unittest.cc b/chrome/browser/ui/media_router/query_result_manager_unittest.cc
index 8bd1b592..0b498ca4 100644
--- a/chrome/browser/ui/media_router/query_result_manager_unittest.cc
+++ b/chrome/browser/ui/media_router/query_result_manager_unittest.cc
@@ -66,7 +66,7 @@
            (default_source && source && *default_source.get() == *source);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   MockMediaRouter mock_router_;
   QueryResultManager query_result_manager_;
   MockObserver mock_observer_;
diff --git a/chrome/browser/ui/page_info/permission_menu_model_unittest.cc b/chrome/browser/ui/page_info/permission_menu_model_unittest.cc
index 3af82399..f470dd4 100644
--- a/chrome/browser/ui/page_info/permission_menu_model_unittest.cc
+++ b/chrome/browser/ui/page_info/permission_menu_model_unittest.cc
@@ -30,7 +30,7 @@
   TestingProfile* profile() { return &profile_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/ui/passwords/credential_manager_dialog_controller_impl_unittest.cc b/chrome/browser/ui/passwords/credential_manager_dialog_controller_impl_unittest.cc
index 4b146c342..72a551e 100644
--- a/chrome/browser/ui/passwords/credential_manager_dialog_controller_impl_unittest.cc
+++ b/chrome/browser/ui/passwords/credential_manager_dialog_controller_impl_unittest.cc
@@ -66,7 +66,7 @@
   PrefService* prefs() { return profile_.GetPrefs(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   StrictMock<PasswordsModelDelegateMock> ui_controller_mock_;
   CredentialManagerDialogControllerImpl controller_;
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
index e65e7fa..c17b3397 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
@@ -142,7 +142,7 @@
   std::vector<std::unique_ptr<autofill::PasswordForm>> GetCurrentForms() const;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::RenderViewHostTestEnabler rvh_enabler_;
   TestingProfile profile_;
   std::unique_ptr<content::WebContents> test_web_contents_;
diff --git a/chrome/browser/ui/passwords/settings/password_manager_presenter_unittest.cc b/chrome/browser/ui/passwords/settings/password_manager_presenter_unittest.cc
index 0a1bd7b5..2bbeac7 100644
--- a/chrome/browser/ui/passwords/settings/password_manager_presenter_unittest.cc
+++ b/chrome/browser/ui/passwords/settings/password_manager_presenter_unittest.cc
@@ -72,7 +72,7 @@
 
   ~PasswordManagerPresenterTest() override {
     store_->ShutdownOnUIThread();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   void AddPasswordEntry(const GURL& origin,
@@ -116,7 +116,7 @@
                      : base::nullopt);
     // The password store posts mutation tasks to a background thread, thus we
     // need to spin the message loop here.
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   int GetPasswordIndex(base::StringPiece origin,
@@ -150,12 +150,12 @@
                      : base::nullopt);
     // The password store posts mutation tasks to a background thread, thus we
     // need to spin the message loop here.
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   void UpdatePasswordLists() {
     mock_controller_.GetPasswordManagerPresenter()->UpdatePasswordLists();
-    thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   MockPasswordUIView& GetUIController() { return mock_controller_; }
@@ -171,7 +171,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   MockPasswordUIView mock_controller_{&profile_};
   scoped_refptr<password_manager::PasswordStore> store_;
diff --git a/chrome/browser/ui/recently_audible_helper_unittest.cc b/chrome/browser/ui/recently_audible_helper_unittest.cc
index b9ae8e71..fbd8d16f 100644
--- a/chrome/browser/ui/recently_audible_helper_unittest.cc
+++ b/chrome/browser/ui/recently_audible_helper_unittest.cc
@@ -108,7 +108,7 @@
 
   // Environment for creating WebContents.
   std::unique_ptr<content::TestWebContentsFactory> test_web_contents_factory_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile testing_profile_;
 
   // A test WebContents and its associated helper.
diff --git a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
index c41ff8f..a0e4a5b 100644
--- a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
+++ b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
@@ -81,7 +81,7 @@
   const TemplateURLServiceFactoryTestUtil* util() const { return &util_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   std::unique_ptr<KeywordEditorController> controller_;
   TemplateURLServiceFactoryTestUtil util_;
diff --git a/chrome/browser/ui/startup/startup_browser_policy_unittest.cc b/chrome/browser/ui/startup/startup_browser_policy_unittest.cc
index 3703280f..289043e 100644
--- a/chrome/browser/ui/startup/startup_browser_policy_unittest.cc
+++ b/chrome/browser/ui/startup/startup_browser_policy_unittest.cc
@@ -101,7 +101,7 @@
   TestingProfile::Builder builder;
   builder.SetPolicyService(GetPolicyService(policy_map));
   // Needed by the builder when building the profile.
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   auto profile = builder.Build();
 
   EXPECT_TRUE(welcome::HasModulesToShow(profile.get()));
@@ -118,7 +118,7 @@
   TestingProfile::Builder builder;
   builder.SetPolicyService(GetPolicyService(policy_map));
   // Needed by the builder when building the profile.
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   auto profile = builder.Build();
 
   TemplateURLServiceFactory::GetInstance()->SetTestingFactory(
diff --git a/chrome/browser/ui/startup/startup_tab_provider_unittest.cc b/chrome/browser/ui/startup/startup_tab_provider_unittest.cc
index 5b6cebb..05fb8031 100644
--- a/chrome/browser/ui/startup/startup_tab_provider_unittest.cc
+++ b/chrome/browser/ui/startup/startup_tab_provider_unittest.cc
@@ -239,7 +239,7 @@
 }
 
 TEST(StartupTabProviderTest, IncognitoProfile) {
-  content::TestBrowserThreadBundle thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
   TestingProfile profile;
   Profile* incognito = profile.GetOffTheRecordProfile();
   StartupTabs output = StartupTabProviderImpl().GetOnboardingTabs(incognito);
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
index 56e1744..3d3eb99 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
@@ -167,7 +167,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   TestingPrefStoreWithCustomReadError* user_prefs_;
   BookmarkModel* model_;
diff --git a/chrome/browser/ui/sync/sync_promo_ui_unittest.cc b/chrome/browser/ui/sync/sync_promo_ui_unittest.cc
index 12bfed6..d458301d 100644
--- a/chrome/browser/ui/sync/sync_promo_ui_unittest.cc
+++ b/chrome/browser/ui/sync/sync_promo_ui_unittest.cc
@@ -34,7 +34,7 @@
         switches::kDisableSync);
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
 
  private:
diff --git a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
index 7243f064..947d70a 100644
--- a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
@@ -398,7 +398,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::RenderViewHostTestEnabler rvh_test_enabler_;
   const std::unique_ptr<TestingProfile> profile_;
 
diff --git a/chrome/browser/ui/toolbar/app_menu_icon_controller_unittest.cc b/chrome/browser/ui/toolbar/app_menu_icon_controller_unittest.cc
index e2d47c8f..7de27b7 100644
--- a/chrome/browser/ui/toolbar/app_menu_icon_controller_unittest.cc
+++ b/chrome/browser/ui/toolbar/app_menu_icon_controller_unittest.cc
@@ -118,7 +118,7 @@
   install_static::ScopedInstallDetails install_details_;
 #endif
   FakeUpgradeDetector upgrade_detector_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 
   DISALLOW_COPY_AND_ASSIGN(AppMenuIconControllerTest);
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel_unittest.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel_unittest.cc
index 81d48c0..5adb8f6b 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel_unittest.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel_unittest.cc
@@ -56,7 +56,7 @@
   }
 
   // We need the UI thread in order to construct UI elements in the view.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ChromeTestViewsDelegate views_delegate_;
   TestingProfile profile_;  // Needs BrowserThread::UI.
 };
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc
index a166f48e..f4f0d25c 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc
@@ -33,7 +33,7 @@
   // and IO tasks on separate threads.
   BookmarkBubbleViewTest()
       : BrowserWithTestWindowTest(
-            content::TestBrowserThreadBundle::REAL_IO_THREAD) {}
+            content::BrowserTaskEnvironment::REAL_IO_THREAD) {}
 
   // testing::Test:
   void SetUp() override {
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc
index 30def22..2f0c693 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc
@@ -84,7 +84,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   BookmarkModel* model_;
   TestingPageNavigator navigator_;
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
index f1a795b..a4037eff 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
@@ -108,7 +108,7 @@
 
   views::TreeView* tree_view() { return editor_->tree_view_; }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   BookmarkModel* model_;
   std::unique_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views_unittest.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views_unittest.cc
index d418cb8..60a04357 100644
--- a/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views_unittest.cc
+++ b/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views_unittest.cc
@@ -103,7 +103,7 @@
   MOCK_METHOD1(OnPickerDone, void(content::DesktopMediaID));
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   views::ScopedViewsTestHelper test_helper_;
   std::map<DesktopMediaID::Type, FakeDesktopMediaList*> media_lists_;
   std::unique_ptr<DesktopMediaPickerViews> picker_views_;
diff --git a/chrome/browser/ui/views/media_router/cast_dialog_no_sinks_view_unittest.cc b/chrome/browser/ui/views/media_router/cast_dialog_no_sinks_view_unittest.cc
index cd2ef0e9..7eef7a3 100644
--- a/chrome/browser/ui/views/media_router/cast_dialog_no_sinks_view_unittest.cc
+++ b/chrome/browser/ui/views/media_router/cast_dialog_no_sinks_view_unittest.cc
@@ -44,7 +44,7 @@
   EXPECT_TRUE(looking_for_sinks_view()->GetVisible());
   EXPECT_FALSE(help_icon_view());
 
-  thread_bundle_.FastForwardBy(base::TimeDelta::FromSeconds(3));
+  task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(3));
   // After three seconds, only the help icon view should be shown.
   EXPECT_FALSE(looking_for_sinks_view());
   EXPECT_TRUE(help_icon_view()->GetVisible());
diff --git a/chrome/browser/ui/views/page_info/page_info_bubble_view_unittest.cc b/chrome/browser/ui/views/page_info/page_info_bubble_view_unittest.cc
index 5b6ad24..8bdfbd5a 100644
--- a/chrome/browser/ui/views/page_info/page_info_bubble_view_unittest.cc
+++ b/chrome/browser/ui/views/page_info/page_info_bubble_view_unittest.cc
@@ -168,7 +168,7 @@
   content::WebContents* web_contents() { return web_contents_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   content::TestWebContentsFactory factory_;
   content::WebContents* web_contents_;  // Weak. Owned by factory_.
diff --git a/chrome/browser/ui/views/page_info/safety_tip_page_info_bubble_view_unittest.cc b/chrome/browser/ui/views/page_info/safety_tip_page_info_bubble_view_unittest.cc
index 7c17c84..9f2c893 100644
--- a/chrome/browser/ui/views/page_info/safety_tip_page_info_bubble_view_unittest.cc
+++ b/chrome/browser/ui/views/page_info/safety_tip_page_info_bubble_view_unittest.cc
@@ -28,7 +28,7 @@
   content::WebContents* web_contents() { return web_contents_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   content::TestWebContentsFactory factory_;
   content::WebContents* web_contents_;  // Weak. Owned by factory_.
diff --git a/chrome/browser/ui/views/tabs/stacked_tab_strip_layout_unittest.cc b/chrome/browser/ui/views/tabs/stacked_tab_strip_layout_unittest.cc
index 05307e42..6cfc6b4a 100644
--- a/chrome/browser/ui/views/tabs/stacked_tab_strip_layout_unittest.cc
+++ b/chrome/browser/ui/views/tabs/stacked_tab_strip_layout_unittest.cc
@@ -126,7 +126,7 @@
     return view_model_.ideal_bounds(index).x();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<StackedTabStripLayout> layout_;
   views::ViewModel view_model_;
 
diff --git a/chrome/browser/ui/views/tabs/tab_strip_unittest.cc b/chrome/browser/ui/views/tabs/tab_strip_unittest.cc
index e9b5177..16467b19 100644
--- a/chrome/browser/ui/views/tabs/tab_strip_unittest.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip_unittest.cc
@@ -987,13 +987,13 @@
   const int initial_width = tab_strip_->tab_at(1)->width();
   EXPECT_LT(initial_width, tab_strip_->tab_at(0)->width());
 
-  thread_bundle_.FastForwardBy(TabAnimation::kAnimationDuration / 2);
+  task_environment_.FastForwardBy(TabAnimation::kAnimationDuration / 2);
 
   EXPECT_GT(tab_strip_->tab_at(1)->width(), initial_width);
   EXPECT_LT(tab_strip_->tab_at(1)->width(), tab_strip_->tab_at(0)->width());
 
   // Fast-forward by more than enough to ensure the animation finishes.
-  thread_bundle_.FastForwardBy(TabAnimation::kAnimationDuration);
+  task_environment_.FastForwardBy(TabAnimation::kAnimationDuration);
 
   EXPECT_EQ(tab_strip_->tab_at(0)->width(), tab_strip_->tab_at(1)->width());
 }
diff --git a/chrome/browser/ui/views/test/view_event_test_base.h b/chrome/browser/ui/views/test/view_event_test_base.h
index d3c7ac55..1d33bd5 100644
--- a/chrome/browser/ui/views/test/view_event_test_base.h
+++ b/chrome/browser/ui/views/test/view_event_test_base.h
@@ -136,7 +136,7 @@
   // Thread for posting background drag events.
   std::unique_ptr<base::Thread> drag_event_thread_;
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
 #if defined(OS_WIN)
   ui::ScopedOleInitializer ole_initializer_;
diff --git a/chrome/browser/ui/webui/about_ui_unittest.cc b/chrome/browser/ui/webui/about_ui_unittest.cc
index 6f43394..bb49f51 100644
--- a/chrome/browser/ui/webui/about_ui_unittest.cc
+++ b/chrome/browser/ui/webui/about_ui_unittest.cc
@@ -127,7 +127,7 @@
         request_url, std::move(wc_getter),
         base::BindRepeating(&TestDataReceiver::OnDataReceived,
                             base::Unretained(data_receiver)));
-    test_browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   const base::FilePath& PreinstalledOfflineResourcesPath() {
@@ -138,7 +138,7 @@
   base::ScopedTempDir preinstalled_offline_resources_dir_;
   base::FilePath arc_tos_dir_;
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   chromeos::system::ScopedFakeStatisticsProvider statistics_provider_;
 
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_userlist_unittest.cc b/chrome/browser/ui/webui/chromeos/login/signin_userlist_unittest.cc
index a235ccc..1b8dec511 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_userlist_unittest.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_userlist_unittest.cc
@@ -78,7 +78,7 @@
   FakeChromeUserManager* user_manager() { return fake_user_manager_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedCrosSettingsTestHelper cros_settings_test_helper_;
   FakeChromeUserManager* fake_user_manager_;
   user_manager::ScopedUserManager user_manager_enabler_;
diff --git a/chrome/browser/ui/webui/downloads/downloads_dom_handler_unittest.cc b/chrome/browser/ui/webui/downloads/downloads_dom_handler_unittest.cc
index 31e1659..d6b30bd 100644
--- a/chrome/browser/ui/webui/downloads/downloads_dom_handler_unittest.cc
+++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler_unittest.cc
@@ -57,7 +57,7 @@
 
  private:
   // NOTE: The initialization order of these members matters.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 
   testing::NiceMock<content::MockDownloadManager> manager_;
diff --git a/chrome/browser/ui/webui/downloads/downloads_list_tracker_unittest.cc b/chrome/browser/ui/webui/downloads/downloads_list_tracker_unittest.cc
index e56ac40..cc6e386 100644
--- a/chrome/browser/ui/webui/downloads/downloads_list_tracker_unittest.cc
+++ b/chrome/browser/ui/webui/downloads/downloads_list_tracker_unittest.cc
@@ -115,7 +115,7 @@
   }
 
   // NOTE: The initialization order of these members matters.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 
   testing::NiceMock<content::MockDownloadManager> manager_;
diff --git a/chrome/browser/ui/webui/favicon_source_unittest.cc b/chrome/browser/ui/webui/favicon_source_unittest.cc
index 85be1622..1d28f49 100644
--- a/chrome/browser/ui/webui/favicon_source_unittest.cc
+++ b/chrome/browser/ui/webui/favicon_source_unittest.cc
@@ -140,7 +140,7 @@
 
  protected:
   const scoped_refptr<base::RefCountedBytes> kDummyIconBytes;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ui::TestNativeTheme theme_;
   TestingProfile profile_;
   MockHistoryUiFaviconRequestHandler* mock_history_ui_favicon_request_handler_;
diff --git a/chrome/browser/ui/webui/fileicon_source_unittest.cc b/chrome/browser/ui/webui/fileicon_source_unittest.cc
index ab56ab3..df29036 100644
--- a/chrome/browser/ui/webui/fileicon_source_unittest.cc
+++ b/chrome/browser/ui/webui/fileicon_source_unittest.cc
@@ -34,7 +34,7 @@
   FileIconSourceTest() = default;
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 const struct FetchFileIconExpectation {
diff --git a/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc b/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc
index a19b61e6..d1f4d86 100644
--- a/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc
+++ b/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc
@@ -90,7 +90,7 @@
     NetworkHandler::Shutdown();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<VersionUpdater> version_updater_;
   FakeUpdateEngineClient* fake_update_engine_client_;  // Not owned.
 
diff --git a/chrome/browser/ui/webui/interventions_internals/interventions_internals_page_handler_unittest.cc b/chrome/browser/ui/webui/interventions_internals/interventions_internals_page_handler_unittest.cc
index 3f8998a..751eafc 100644
--- a/chrome/browser/ui/webui/interventions_internals/interventions_internals_page_handler_unittest.cc
+++ b/chrome/browser/ui/webui/interventions_internals/interventions_internals_page_handler_unittest.cc
@@ -310,7 +310,7 @@
     page_.reset();
   }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  protected:
   TestingProfileManager profile_manager_;
diff --git a/chrome/browser/ui/webui/managed_ui_handler_unittest.cc b/chrome/browser/ui/webui/managed_ui_handler_unittest.cc
index f9a4b1b..c44be27 100644
--- a/chrome/browser/ui/webui/managed_ui_handler_unittest.cc
+++ b/chrome/browser/ui/webui/managed_ui_handler_unittest.cc
@@ -75,7 +75,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle bundle_;
+  content::BrowserTaskEnvironment bundle_;
 
   testing::NiceMock<policy::MockConfigurationPolicyProvider> policy_provider_;
   std::unique_ptr<TestingProfile> profile_;
diff --git a/chrome/browser/ui/webui/management_ui_handler_unittest.cc b/chrome/browser/ui/webui/management_ui_handler_unittest.cc
index c118fd3..df2c6b5 100644
--- a/chrome/browser/ui/webui/management_ui_handler_unittest.cc
+++ b/chrome/browser/ui/webui/management_ui_handler_unittest.cc
@@ -119,7 +119,7 @@
 
  protected:
   TestManagementUIHandler handler_;
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   policy::MockPolicyService policy_service_;
   policy::PolicyMap empty_policy_map_;
   base::string16 device_domain_;
diff --git a/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc b/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc
index e968ba22..a5f48fe 100644
--- a/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc
+++ b/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc
@@ -140,7 +140,7 @@
 
  protected:
   // Must outlive |profile_|.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   // Must outlive |printers_manager_|.
   TestingProfile profile_;
   scoped_refptr<TestPrintBackend> test_backend_;
@@ -230,7 +230,7 @@
   local_printer_handler_->StartGetCapability(
       "printer1", base::BindOnce(&RecordGetCapability, &fetched_caps));
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_TRUE(fetched_caps);
   base::DictionaryValue* dict;
@@ -257,7 +257,7 @@
   local_printer_handler_->StartGetCapability(
       "printer1", base::BindOnce(&RecordGetCapability, &fetched_caps));
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_TRUE(fetched_caps);
   base::DictionaryValue* dict;
@@ -273,7 +273,7 @@
   local_printer_handler_->StartGetCapability(
       "invalid printer", base::BindOnce(&RecordGetCapability, &fetched_caps));
 
-  thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
 
   ASSERT_TRUE(fetched_caps);
   EXPECT_TRUE(fetched_caps->is_none());
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler_unittest.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler_unittest.cc
index 004dec2..dd860f2 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler_unittest.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler_unittest.cc
@@ -416,7 +416,7 @@
   std::vector<PrinterInfo>& printers() { return printers_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<content::TestWebUI> web_ui_;
   content::RenderViewHostTestEnabler rvh_test_enabler_;
diff --git a/chrome/browser/ui/webui/settings/chrome_cleanup_handler_win_unittest.cc b/chrome/browser/ui/webui/settings/chrome_cleanup_handler_win_unittest.cc
index d54baa6a..439859e 100644
--- a/chrome/browser/ui/webui/settings/chrome_cleanup_handler_win_unittest.cc
+++ b/chrome/browser/ui/webui/settings/chrome_cleanup_handler_win_unittest.cc
@@ -20,7 +20,7 @@
 using safe_browsing::MockChromeCleanerProcess;
 
 TEST(ChromeCleanupHandlerTest, GetExtensionsNamesFromIds) {
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_(TestingBrowserProcess::GetGlobal());
 
   // Set up the testing profile to get the extensions registry from it.
diff --git a/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler_unittest.cc b/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler_unittest.cc
index 3a0aa79..f90afb6 100644
--- a/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler_unittest.cc
@@ -78,7 +78,7 @@
 class CupsPrintersHandlerTest : public testing::Test {
  public:
   CupsPrintersHandlerTest()
-      : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
+      : task_environment_(content::BrowserTaskEnvironment::REAL_IO_THREAD),
         profile_(),
         web_ui_(),
         printers_handler_() {}
@@ -94,7 +94,7 @@
 
  protected:
   // Must outlive |profile_|.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   content::TestWebUI web_ui_;
   std::unique_ptr<CupsPrintersHandler> printers_handler_;
diff --git a/chrome/browser/ui/webui/settings/downloads_handler_unittest.cc b/chrome/browser/ui/webui/settings/downloads_handler_unittest.cc
index 7e7628f..ae214f7 100644
--- a/chrome/browser/ui/webui/settings/downloads_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/downloads_handler_unittest.cc
@@ -74,7 +74,7 @@
   DownloadsHandler* handler() { return &handler_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestWebUI test_web_ui_;
   TestingProfile profile_;
 
diff --git a/chrome/browser/ui/webui/settings/metrics_reporting_handler_unittest.cc b/chrome/browser/ui/webui/settings/metrics_reporting_handler_unittest.cc
index b26e2be..8e48009 100644
--- a/chrome/browser/ui/webui/settings/metrics_reporting_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/metrics_reporting_handler_unittest.cc
@@ -77,7 +77,7 @@
   policy::MockConfigurationPolicyProvider* provider() { return &provider_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   content::TestWebUI test_web_ui_;
   std::unique_ptr<ScopedTestingLocalState> local_state_;
   std::unique_ptr<TestingMetricsReportingHandler> handler_;
diff --git a/chrome/browser/ui/webui/settings/on_startup_handler_unittest.cc b/chrome/browser/ui/webui/settings/on_startup_handler_unittest.cc
index 6a2dd31..a014a0e9 100644
--- a/chrome/browser/ui/webui/settings/on_startup_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/on_startup_handler_unittest.cc
@@ -67,7 +67,7 @@
   content::TestWebUI* web_ui() { return &web_ui_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   std::unique_ptr<TestOnStartupHandler> handler_;
   Profile* profile_;
diff --git a/chrome/browser/ui/webui/settings/people_handler_unittest.cc b/chrome/browser/ui/webui/settings/people_handler_unittest.cc
index c055bd1..c8185ac 100644
--- a/chrome/browser/ui/webui/settings/people_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/people_handler_unittest.cc
@@ -1404,7 +1404,7 @@
   base::CommandLine::ForCurrentProcess()->AppendSwitch(switches::kNoFirstRun);
   ASSERT_FALSE(first_run::IsChromeFirstRun());
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   // Decode test parameters.
   bool dice_enabled;
diff --git a/chrome/browser/ui/webui/settings/profile_info_handler_unittest.cc b/chrome/browser/ui/webui/settings/profile_info_handler_unittest.cc
index a522944..13f4b04 100644
--- a/chrome/browser/ui/webui/settings/profile_info_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/profile_info_handler_unittest.cc
@@ -101,7 +101,7 @@
   TestProfileInfoHandler* handler() const { return handler_.get(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   content::TestWebUI web_ui_;
 
diff --git a/chrome/browser/ui/webui/settings/reset_settings_handler_unittest.cc b/chrome/browser/ui/webui/settings/reset_settings_handler_unittest.cc
index 7c8f38e..fce2a80c 100644
--- a/chrome/browser/ui/webui/settings/reset_settings_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/reset_settings_handler_unittest.cc
@@ -81,7 +81,7 @@
 
  private:
   // The order here matters.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   content::TestWebUI web_ui_;
   std::unique_ptr<TestingResetSettingsHandler> handler_;
diff --git a/chrome/browser/ui/webui/settings/settings_manage_profile_handler_unittest.cc b/chrome/browser/ui/webui/settings/settings_manage_profile_handler_unittest.cc
index d7ee5c1..130f939 100644
--- a/chrome/browser/ui/webui/settings/settings_manage_profile_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/settings_manage_profile_handler_unittest.cc
@@ -60,7 +60,7 @@
   TestManageProfileHandler* handler() const { return handler_.get(); }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfileManager profile_manager_;
   content::TestWebUI web_ui_;
 
diff --git a/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc b/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc
index 4f4e08a4..fe49d09ac 100644
--- a/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc
@@ -468,7 +468,7 @@
   const std::string kFlash;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
   TestingProfile* incognito_profile_;
   content::TestWebUI web_ui_;
diff --git a/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc b/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc
index dc033af6..0455cba 100644
--- a/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc
+++ b/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc
@@ -405,7 +405,7 @@
   bool expected_sync_settings_shown_ = false;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   base::ScopedTempDir temp_dir_;
   ScopedTestingLocalState local_state_;
   std::string account_id_;
diff --git a/chrome/browser/ui/webui/signin/login_ui_service_unittest.cc b/chrome/browser/ui/webui/signin/login_ui_service_unittest.cc
index b2fb62b..50b835b8 100644
--- a/chrome/browser/ui/webui/signin/login_ui_service_unittest.cc
+++ b/chrome/browser/ui/webui/signin/login_ui_service_unittest.cc
@@ -43,7 +43,7 @@
   }
 
  protected:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   TestingProfileManager profile_manager_;
   // Test profile used by all tests - this is owned by profile_manager_.
diff --git a/chrome/browser/ui/webui/site_settings_helper_unittest.cc b/chrome/browser/ui/webui/site_settings_helper_unittest.cc
index 0a9cddf2..098d85a 100644
--- a/chrome/browser/ui/webui/site_settings_helper_unittest.cc
+++ b/chrome/browser/ui/webui/site_settings_helper_unittest.cc
@@ -63,7 +63,7 @@
   }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 };
 
 TEST_F(SiteSettingsHelperTest, CheckExceptionOrder) {
@@ -490,7 +490,7 @@
   device::FakeUsbDeviceManager device_manager_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/ui/webui/theme_source_unittest.cc b/chrome/browser/ui/webui/theme_source_unittest.cc
index 71b511c..0c0d54a2 100644
--- a/chrome/browser/ui/webui/theme_source_unittest.cc
+++ b/chrome/browser/ui/webui/theme_source_unittest.cc
@@ -49,7 +49,7 @@
 
   content::URLDataSource::GotDataCallback callback_;
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<TestingProfile> profile_;
   std::unique_ptr<ThemeSource> theme_source_;
diff --git a/chrome/browser/usb/usb_chooser_context_unittest.cc b/chrome/browser/usb/usb_chooser_context_unittest.cc
index 95c8e89..1dd5322 100644
--- a/chrome/browser/usb/usb_chooser_context_unittest.cc
+++ b/chrome/browser/usb/usb_chooser_context_unittest.cc
@@ -83,7 +83,7 @@
   MockDeviceObserver mock_device_observer_;
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/usb/usb_policy_allowed_devices_unittest.cc b/chrome/browser/usb/usb_policy_allowed_devices_unittest.cc
index 3225754f..3a1aad6 100644
--- a/chrome/browser/usb/usb_policy_allowed_devices_unittest.cc
+++ b/chrome/browser/usb/usb_policy_allowed_devices_unittest.cc
@@ -48,7 +48,7 @@
  protected:
   Profile* profile() { return &profile_; }
 
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   device::FakeUsbDeviceManager device_manager_;
 
diff --git a/chrome/browser/vr/test/vr_test_suite.cc b/chrome/browser/vr/test/vr_test_suite.cc
index 351725a..962bda857 100644
--- a/chrome/browser/vr/test/vr_test_suite.cc
+++ b/chrome/browser/vr/test/vr_test_suite.cc
@@ -24,7 +24,7 @@
 void VrTestSuite::Initialize() {
   base::TestSuite::Initialize();
 
-  thread_bundle_ = std::make_unique<content::TestBrowserThreadBundle>();
+  task_environment_ = std::make_unique<content::BrowserTaskEnvironment>();
 
   mojo::core::Init();
 
diff --git a/chrome/browser/vr/test/vr_test_suite.h b/chrome/browser/vr/test/vr_test_suite.h
index e447f1c..2213aeb 100644
--- a/chrome/browser/vr/test/vr_test_suite.h
+++ b/chrome/browser/vr/test/vr_test_suite.h
@@ -8,7 +8,7 @@
 #include "base/test/test_suite.h"
 
 namespace content {
-class TestBrowserThreadBundle;
+class BrowserTaskEnvironment;
 }  // namespace content
 
 namespace vr {
@@ -23,7 +23,7 @@
   void Shutdown() override;
 
  private:
-  std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
+  std::unique_ptr<content::BrowserTaskEnvironment> task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(VrTestSuite);
 };
diff --git a/chrome/browser/wake_lock/wake_lock_permission_context_unittest.cc b/chrome/browser/wake_lock/wake_lock_permission_context_unittest.cc
index 3130df0..fefd8f3 100644
--- a/chrome/browser/wake_lock/wake_lock_permission_context_unittest.cc
+++ b/chrome/browser/wake_lock/wake_lock_permission_context_unittest.cc
@@ -16,7 +16,7 @@
   TestingProfile* profile() { return &profile_; }
 
  private:
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   TestingProfile profile_;
 };
 
diff --git a/chrome/browser/web_applications/components/web_app_shortcut_linux_unittest.cc b/chrome/browser/web_applications/components/web_app_shortcut_linux_unittest.cc
index d4e76bc..1cfd501 100644
--- a/chrome/browser/web_applications/components/web_app_shortcut_linux_unittest.cc
+++ b/chrome/browser/web_applications/components/web_app_shortcut_linux_unittest.cc
@@ -89,7 +89,7 @@
   base::FilePath kTemplateFilepath(kTemplateFilename);
   const char kNoDisplayDesktopFile[] = "[Desktop Entry]\nNoDisplay=true";
 
-  content::TestBrowserThreadBundle test_browser_thread_bundle;
+  content::BrowserTaskEnvironment task_environment;
 
   // No existing shortcuts.
   {
diff --git a/chrome/browser/web_applications/components/web_app_shortcut_mac_unittest.mm b/chrome/browser/web_applications/components/web_app_shortcut_mac_unittest.mm
index 7f57fc8..030cf3e 100644
--- a/chrome/browser/web_applications/components/web_app_shortcut_mac_unittest.mm
+++ b/chrome/browser/web_applications/components/web_app_shortcut_mac_unittest.mm
@@ -103,7 +103,7 @@
   }
 
   // Needed by DCHECK_CURRENTLY_ON in ShortcutInfo destructor.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   base::ScopedTempDir temp_app_data_dir_;
   base::ScopedTempDir temp_destination_dir_;
diff --git a/chrome/browser/web_applications/external_web_app_manager_unittest.cc b/chrome/browser/web_applications/external_web_app_manager_unittest.cc
index 957fbb0..0d68199 100644
--- a/chrome/browser/web_applications/external_web_app_manager_unittest.cc
+++ b/chrome/browser/web_applications/external_web_app_manager_unittest.cc
@@ -173,7 +173,7 @@
 #endif
 
   // To support context of browser threads.
-  content::TestBrowserThreadBundle thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   DISALLOW_COPY_AND_ASSIGN(ScanDirForExternalWebAppsTest);
 };
diff --git a/chrome/browser/win/chrome_elf_init_unittest.cc b/chrome/browser/win/chrome_elf_init_unittest.cc
index 1f21614..258d3ba9 100644
--- a/chrome/browser/win/chrome_elf_init_unittest.cc
+++ b/chrome/browser/win/chrome_elf_init_unittest.cc
@@ -59,7 +59,7 @@
 
   std::unique_ptr<base::win::RegKey> blacklist_registry_key_;
   registry_util::RegistryOverrideManager override_manager_;
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(ChromeBlacklistTrialTest);
diff --git a/chrome/browser/win/conflicts/incompatible_applications_updater_unittest.cc b/chrome/browser/win/conflicts/incompatible_applications_updater_unittest.cc
index 516e1f2..cbcff82 100644
--- a/chrome/browser/win/conflicts/incompatible_applications_updater_unittest.cc
+++ b/chrome/browser/win/conflicts/incompatible_applications_updater_unittest.cc
@@ -171,7 +171,7 @@
   const base::FilePath dll2_;
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedTestingLocalState scoped_testing_local_state_;
   registry_util::RegistryOverrideManager registry_override_manager_;
   base::test::ScopedFeatureList scoped_feature_list_;
diff --git a/chrome/browser/win/conflicts/module_database_unittest.cc b/chrome/browser/win/conflicts/module_database_unittest.cc
index 4e96632..6f74e15 100644
--- a/chrome/browser/win/conflicts/module_database_unittest.cc
+++ b/chrome/browser/win/conflicts/module_database_unittest.cc
@@ -39,9 +39,8 @@
   ModuleDatabaseTest()
       : dll1_(kDll1),
         dll2_(kDll2),
-        test_browser_thread_bundle_(
-            base::test::TaskEnvironment::MainThreadType::UI,
-            base::test::TaskEnvironment::TimeSource::MOCK_TIME),
+        task_environment_(base::test::TaskEnvironment::MainThreadType::UI,
+                          base::test::TaskEnvironment::TimeSource::MOCK_TIME),
         scoped_testing_local_state_(TestingBrowserProcess::GetGlobal()),
         module_database_(std::make_unique<ModuleDatabase>(
             /* third_party_blocking_policy_enabled = */ false)) {
@@ -56,7 +55,7 @@
 
     // Clear the outstanding delayed tasks that were posted by the
     // ModuleDatabase instance.
-    test_browser_thread_bundle_.FastForwardUntilNoTasksRemain();
+    task_environment_.FastForwardUntilNoTasksRemain();
   }
 
   const ModuleDatabase::ModuleMap& modules() {
@@ -65,11 +64,11 @@
 
   ModuleDatabase* module_database() { return module_database_.get(); }
 
-  void RunSchedulerUntilIdle() { test_browser_thread_bundle_.RunUntilIdle(); }
+  void RunSchedulerUntilIdle() { task_environment_.RunUntilIdle(); }
 
   void FastForwardToIdleTimer() {
-    test_browser_thread_bundle_.FastForwardBy(ModuleDatabase::kIdleTimeout);
-    test_browser_thread_bundle_.RunUntilIdle();
+    task_environment_.FastForwardBy(ModuleDatabase::kIdleTimeout);
+    task_environment_.RunUntilIdle();
   }
 
   const base::FilePath dll1_;
@@ -77,7 +76,7 @@
 
  private:
   // Must be before |module_database_|.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   ScopedTestingLocalState scoped_testing_local_state_;
 
diff --git a/chrome/browser/win/conflicts/module_event_sink_impl_unittest.cc b/chrome/browser/win/conflicts/module_event_sink_impl_unittest.cc
index 3471818..64e7beb 100644
--- a/chrome/browser/win/conflicts/module_event_sink_impl_unittest.cc
+++ b/chrome/browser/win/conflicts/module_event_sink_impl_unittest.cc
@@ -52,7 +52,7 @@
   int module_event_count() { return module_event_count_; }
 
   // Must be first.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   std::unique_ptr<ModuleEventSinkImpl> module_event_sink_impl_;
 
@@ -72,12 +72,12 @@
 
   // An invalid load event should not cause a module entry.
   module_event_sink_impl_->OnModuleEvents({kInvalidLoadAddress});
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(0, module_event_count());
 
   // A valid load event should cause a module entry.
   module_event_sink_impl_->OnModuleEvents({kValidLoadAddress});
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(1, module_event_count());
 }
 
@@ -90,6 +90,6 @@
   EXPECT_EQ(0, module_event_count());
 
   module_event_sink_impl_->OnModuleEvents({kLoadAddress1, kLoadAddress2});
-  test_browser_thread_bundle_.RunUntilIdle();
+  task_environment_.RunUntilIdle();
   EXPECT_EQ(2, module_event_count());
 }
diff --git a/chrome/browser/win/conflicts/module_inspector_unittest.cc b/chrome/browser/win/conflicts/module_inspector_unittest.cc
index 09e9257d..9935045 100644
--- a/chrome/browser/win/conflicts/module_inspector_unittest.cc
+++ b/chrome/browser/win/conflicts/module_inspector_unittest.cc
@@ -52,8 +52,7 @@
 class ModuleInspectorTest : public testing::Test {
  public:
   ModuleInspectorTest()
-      : test_browser_thread_bundle_(
-            base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+      : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
 
   std::unique_ptr<ModuleInspector> CreateModuleInspector() {
     auto module_inspector =
@@ -74,11 +73,11 @@
     inspected_modules_.push_back(std::move(inspection_result));
   }
 
-  void RunUntilIdle() { test_browser_thread_bundle_.RunUntilIdle(); }
+  void RunUntilIdle() { task_environment_.RunUntilIdle(); }
   void FastForwardToIdleTimer() {
-    test_browser_thread_bundle_.FastForwardBy(
+    task_environment_.FastForwardBy(
         ModuleInspector::kFlushInspectionResultsTimerTimeout);
-    test_browser_thread_bundle_.RunUntilIdle();
+    task_environment_.RunUntilIdle();
   }
 
   const std::vector<ModuleInspectionResult>& inspected_modules() {
@@ -87,11 +86,11 @@
 
   void ClearInspectedModules() { inspected_modules_.clear(); }
 
-  // A TestBrowserThreadBundle is required instead of a TaskEnvironment
+  // A BrowserTaskEnvironment is required instead of a TaskEnvironment
   // because of AfterStartupTaskUtils (DCHECK for BrowserThread::UI).
   //
   // Must be before the ModuleInspector.
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
 
   // Holds a working UtilWin service implementation.
   base::Optional<UtilWinImpl> util_win_impl_;
diff --git a/chrome/browser/win/conflicts/third_party_conflicts_manager_unittest.cc b/chrome/browser/win/conflicts/third_party_conflicts_manager_unittest.cc
index 2329a977..d4e4223f 100644
--- a/chrome/browser/win/conflicts/third_party_conflicts_manager_unittest.cc
+++ b/chrome/browser/win/conflicts/third_party_conflicts_manager_unittest.cc
@@ -77,7 +77,7 @@
   void RemoveObserver(ModuleDatabaseObserver* observer) override {}
 
  private:
-  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+  content::BrowserTaskEnvironment task_environment_;
   ScopedTestingLocalState scoped_testing_local_state_;
 
   // Temp directory used to host module list.