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

Unified Diff: chrome/browser/sync/util/event_sys_unittest.cc

Issue 251080: Sync: Remove pthreads from event_sys code. Remove asynch version of GaiaAuthe... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/sync/util/event_sys-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/util/event_sys_unittest.cc
===================================================================
--- chrome/browser/sync/util/event_sys_unittest.cc (revision 27909)
+++ chrome/browser/sync/util/event_sys_unittest.cc (working copy)
@@ -9,9 +9,11 @@
#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/message_loop.h"
#include "base/port.h"
#include "build/build_config.h"
#include "chrome/browser/sync/util/event_sys-inl.h"
+#include "chrome/browser/sync/util/pthread_helpers.h"
#include "testing/gtest/include/gtest/gtest.h"
using std::endl;
@@ -196,6 +198,12 @@
}
static void* ThreadMain(void* arg) {
+ // Make sure each thread gets a current MessageLoop in TLS.
+ // This test should use chrome threads for testing, but I'll leave it like
+ // this for the moment since it requires a big chunk of rewriting and I
+ // want the test passing while I checkpoint my CL. Technically speaking,
+ // there should be no functional difference.
+ MessageLoop message_loop;
ThreadArgs args = *reinterpret_cast<ThreadArgs*>(arg);
pthread_mutex_lock(args.thread_running_mutex);
*args.thread_running = true;
« no previous file with comments | « chrome/browser/sync/util/event_sys-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698