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

Unified Diff: chrome/test/base/bookmark_load_observer.h

Issue 10479018: Add base::RunLoop and update ui_test_utils to use it to reduce flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: darin feedback Created 8 years, 6 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/test/base/bookmark_load_observer.h
diff --git a/chrome/test/base/bookmark_load_observer.h b/chrome/test/base/bookmark_load_observer.h
index 0619838e4ab160134c4cadfb3526160c5927d460..ed6ccc794e977ab59e48f28ed3ba717f2dd585f1 100644
--- a/chrome/test/base/bookmark_load_observer.h
+++ b/chrome/test/base/bookmark_load_observer.h
@@ -8,6 +8,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/memory/weak_ptr.h"
+#include "base/run_loop.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
// BookmarkLoadObserver is used when blocking until the BookmarkModel
@@ -15,7 +17,8 @@
// loop is quit.
class BookmarkLoadObserver : public BookmarkModelObserver {
public:
- BookmarkLoadObserver();
+ explicit BookmarkLoadObserver(
+ const base::WeakPtr<base::RunLoop>& run_loop);
jar (doing other things) 2012/06/23 02:43:19 nit: wrapping probably not needed.
jbates 2012/06/25 20:04:57 Done.
virtual ~BookmarkLoadObserver();
virtual void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE;
@@ -40,6 +43,7 @@ class BookmarkLoadObserver : public BookmarkModelObserver {
const BookmarkNode* node) OVERRIDE {}
private:
+ base::WeakPtr<base::RunLoop> run_loop_;
DISALLOW_COPY_AND_ASSIGN(BookmarkLoadObserver);
};

Powered by Google App Engine
This is Rietveld 408576698