Index: net/cookies/cookie_store_test_callbacks.h |
diff --git a/net/cookies/cookie_store_test_callbacks.h b/net/cookies/cookie_store_test_callbacks.h |
index 3b86873fa437423c0067712c55ad02deeb893ac8..4ebc62f4db827b0d0a764638dac0c4958338072c 100644 |
--- a/net/cookies/cookie_store_test_callbacks.h |
+++ b/net/cookies/cookie_store_test_callbacks.h |
@@ -8,6 +8,7 @@ |
#include <string> |
#include <vector> |
+#include "base/run_loop.h" |
#include "net/cookies/canonical_cookie.h" |
#include "net/cookies/cookie_store.h" |
@@ -26,6 +27,9 @@ class CookieCallback { |
// Indicates whether the callback has been called. |
bool did_run() { return did_run_; } |
mmenke
2016/01/27 16:55:42
This is no longer needed - the fact that the messa
xunjieli
2016/01/27 18:35:02
Done.
|
+ // Waits until the callback is invoked. |
+ void WaitUntilDone(); |
+ |
protected: |
// Constructs a callback that expects to be called in the given thread and |
// will, upon execution, send a QUIT to the constructing thread. |
@@ -35,6 +39,8 @@ class CookieCallback { |
// send a QUIT to the constructing thread. |
CookieCallback(); |
+ ~CookieCallback(); |
+ |
// Tests whether the current thread was the caller's thread. |
// Sends a QUIT to the constructing thread. |
void CallbackEpilogue(); |
@@ -43,8 +49,7 @@ class CookieCallback { |
bool did_run_; |
base::Thread* run_in_thread_; |
base::MessageLoop* run_in_loop_; |
- base::MessageLoop* parent_loop_; |
- base::MessageLoop* loop_to_quit_; |
+ scoped_ptr<base::RunLoop> loop_to_quit_; |
mmenke
2016/01/27 16:55:42
No need to use a scoped_ptr.
xunjieli
2016/01/27 18:35:02
Done.
|
}; |
// Callback implementations for the asynchronous CookieStore methods. |