Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2070)

Unified Diff: chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc

Issue 2342523002: Forcibly clear worker ref counts on shutdown. (Closed)
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
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 0018fa3baff5442656aedc1bc7e329cba1d57041..942c08e9313ed09a6aaec457a948391243281783 100644
--- a/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
@@ -25,6 +25,7 @@
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/syncable_prefs/pref_service_syncable.h"
#include "components/syncable_prefs/pref_service_syncable_factory.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "extensions/browser/quota_service.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -73,11 +74,11 @@ class StateStoreTest : public PlatformStateStoreTestBase {
StateStoreTest()
: profile_(nullptr),
task_runner_(new base::TestSimpleTaskRunner()),
- thread_task_runner_handle_(task_runner_),
profile_manager_(TestingBrowserProcess::GetGlobal()) {}
void SetUp() override {
PlatformStateStoreTestBase::SetUp();
+ base::MessageLoop::current()->SetTaskRunner(task_runner_);
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
ASSERT_TRUE(profile_manager_.SetUp());
CreateProfile();
@@ -119,6 +120,7 @@ class StateStoreTest : public PlatformStateStoreTestBase {
static const char kProfileName_[];
static const TestData kTestData_[];
+ content::TestBrowserThreadBundle thread_bundle_;
TestingProfile* profile_;
scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
@@ -130,7 +132,6 @@ class StateStoreTest : public PlatformStateStoreTestBase {
extensions::QuotaService::ScopedDisablePurgeForTesting
disable_purge_for_testing_;
base::ScopedTempDir temp_dir_;
- base::ThreadTaskRunnerHandle thread_task_runner_handle_;
TestingProfileManager profile_manager_;
DISALLOW_COPY_AND_ASSIGN(StateStoreTest);

Powered by Google App Engine
This is Rietveld 408576698