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

Unified Diff: chrome/browser/extensions/api/messaging/native_messaging_test_util.cc

Issue 2835233002: Fix integration tests in src/chrome and src/extensions so that we can turn on IO thread checks wi... (Closed)
Patch Set: ready for review Created 3 years, 8 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/extensions/api/messaging/native_messaging_test_util.cc
diff --git a/chrome/browser/extensions/api/messaging/native_messaging_test_util.cc b/chrome/browser/extensions/api/messaging/native_messaging_test_util.cc
index ebd91a7b10b56cdeb395db284e00c5d9eb4f126d..3c28d3e494a2434e5fd2ce797a6caa93881d0b18 100644
--- a/chrome/browser/extensions/api/messaging/native_messaging_test_util.cc
+++ b/chrome/browser/extensions/api/messaging/native_messaging_test_util.cc
@@ -12,6 +12,7 @@
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/threading/thread_restrictions.h"
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/common/chrome_paths.h"
@@ -68,6 +69,7 @@ const char ScopedTestNativeMessagingHost::kExtensionId[] =
ScopedTestNativeMessagingHost::ScopedTestNativeMessagingHost() {}
void ScopedTestNativeMessagingHost::RegisterTestHost(bool user_level) {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
ScopedTestNativeMessagingHost test_host;
@@ -99,6 +101,9 @@ void ScopedTestNativeMessagingHost::RegisterTestHost(bool user_level) {
test_user_data_dir.AppendASCII("missing_nm_binary.exe"), user_level));
}
-ScopedTestNativeMessagingHost::~ScopedTestNativeMessagingHost() {}
+ScopedTestNativeMessagingHost::~ScopedTestNativeMessagingHost() {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ ignore_result(temp_dir_.Delete());
+}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698