summaryrefslogtreecommitdiffstats
path: root/chrome/test/signaling_task.h
diff options
context:
space:
mode:
authorchron@chromium.org <chron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 02:10:46 +0000
committerchron@chromium.org <chron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 02:10:46 +0000
commitab23dbedf7ff80bc6de6cb4da5d6d965f5525a4d (patch)
tree53ef4c5e622999b4185ee28f2e965c8ad9517325 /chrome/test/signaling_task.h
parent83a18417667c673f30ca30a59cbbec2dd54c82d9 (diff)
downloadchromium_src-ab23dbedf7ff80bc6de6cb4da5d6d965f5525a4d.zip
chromium_src-ab23dbedf7ff80bc6de6cb4da5d6d965f5525a4d.tar.gz
chromium_src-ab23dbedf7ff80bc6de6cb4da5d6d965f5525a4d.tar.bz2
Add token serialization to token_service.
The token service now supports serialization of tokens into the web database. The token service doesn't actually know the email of the user though, and it's assumed that whoever is using the token service does. Not sure whether that's a bad choice or not, open to suggestions. This CL adds a new DB table. Design comments / corrections are welcome. Testing in Chromium OS is in progress and not yet done. This CL will not be submitted prior to more Chromium OS testing. BUG=47092,47093 TEST=Unit tests included Review URL: http://codereview.chromium.org/3061025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/signaling_task.h')
-rw-r--r--chrome/test/signaling_task.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/chrome/test/signaling_task.h b/chrome/test/signaling_task.h
new file mode 100644
index 0000000..23063e1
--- /dev/null
+++ b/chrome/test/signaling_task.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// A simple callback that you can use to wait for events on a thread.
+
+#ifndef CHROME_TEST_SIGNALING_TASK_H_
+#define CHROME_TEST_SIGNALING_TASK_H_
+#pragma once
+
+#include "base/waitable_event.h"
+
+using base::WaitableEvent;
+
+class SignalingTask : public Task {
+ public:
+ explicit SignalingTask(WaitableEvent* event) : event_(event) {
+ }
+
+ virtual void Run() {
+ event_->Signal();
+ }
+
+ private:
+ WaitableEvent* event_;
+};
+
+#endif // CHROME_TEST_SIGNALING_TASK_H_