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

Unified Diff: chrome/browser/metrics/thread_watcher_unittest.cc

Issue 2024723002: DO NOT COMMIT (will be split in sub-components) - clang-tidy WaitableEvent refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: fix presubmits Created 4 years, 7 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
« no previous file with comments | « chrome/browser/extensions/extension_messages_apitest.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/thread_watcher_unittest.cc
diff --git a/chrome/browser/metrics/thread_watcher_unittest.cc b/chrome/browser/metrics/thread_watcher_unittest.cc
index fbe49751eff2462d3f146d1e58f9908834e92864..5ba8b8760b6830d1de79a441ed22aba13ab970d9 100644
--- a/chrome/browser/metrics/thread_watcher_unittest.cc
+++ b/chrome/browser/metrics/thread_watcher_unittest.cc
@@ -246,13 +246,12 @@ class ThreadWatcherTest : public ::testing::Test {
static const TimeDelta kSleepTime;
static const TimeDelta kUnresponsiveTime;
static const BrowserThread::ID io_thread_id;
- static const std::string io_thread_name;
+ static const char io_thread_name[];
static const BrowserThread::ID db_thread_id;
- static const std::string db_thread_name;
- static const std::string crash_on_hang_seconds;
- static const std::string crash_on_hang_thread_names;
- static const std::string thread_names_and_live_threshold;
- static const std::string crash_on_hang_thread_data;
+ static const char db_thread_name[];
+ static const char crash_on_hang_thread_names[];
+ static const char thread_names_and_live_threshold[];
+ static const char crash_on_hang_thread_data[];
CustomThreadWatcher* io_watcher_;
CustomThreadWatcher* db_watcher_;
ThreadWatcherList* thread_watcher_list_;
@@ -333,13 +332,13 @@ const TimeDelta ThreadWatcherTest::kSleepTime =
const TimeDelta ThreadWatcherTest::kUnresponsiveTime =
TimeDelta::FromMilliseconds(500);
const BrowserThread::ID ThreadWatcherTest::io_thread_id = BrowserThread::IO;
-const std::string ThreadWatcherTest::io_thread_name = "IO";
+const char ThreadWatcherTest::io_thread_name[] = "IO";
const BrowserThread::ID ThreadWatcherTest::db_thread_id = BrowserThread::DB;
-const std::string ThreadWatcherTest::db_thread_name = "DB";
-const std::string ThreadWatcherTest::crash_on_hang_thread_names = "UI,IO";
-const std::string ThreadWatcherTest::thread_names_and_live_threshold =
+const char ThreadWatcherTest::db_thread_name[] = "DB";
+const char ThreadWatcherTest::crash_on_hang_thread_names[] = "UI,IO";
+const char ThreadWatcherTest::thread_names_and_live_threshold[] =
"UI:4,IO:4";
-const std::string ThreadWatcherTest::crash_on_hang_thread_data =
+const char ThreadWatcherTest::crash_on_hang_thread_data[] =
"UI:5:12,IO:5:12,FILE:5:12";
TEST_F(ThreadWatcherTest, ThreadNamesOnlyArgs) {
@@ -778,7 +777,9 @@ class JankTimeBombTest : public ::testing::Test {
}
static void WaitForWatchDogThreadPostTask() {
- base::WaitableEvent watchdog_thread_event(false, false);
+ base::WaitableEvent watchdog_thread_event(
+ base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
PostAndWaitForWatchdogThread(&watchdog_thread_event);
}
« no previous file with comments | « chrome/browser/extensions/extension_messages_apitest.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698