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

Unified Diff: ppapi/shared_impl/ppapi_globals.h

Issue 10702188: Fix unit test to allow repeated successful runs by avoiding a function static variable in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify with a member variable Created 8 years, 5 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: ppapi/shared_impl/ppapi_globals.h
diff --git a/ppapi/shared_impl/ppapi_globals.h b/ppapi/shared_impl/ppapi_globals.h
index 00fb9b16e12ef8e1f9151dca5172a71866fd4ab4..d97b207114b0f40630c4d133bb7fefcff4d8d08b 100644
--- a/ppapi/shared_impl/ppapi_globals.h
+++ b/ppapi/shared_impl/ppapi_globals.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
#include "base/threading/thread_local.h" // For testing purposes only.
#include "ppapi/c/dev/ppb_console_dev.h"
#include "ppapi/c/pp_instance.h"
@@ -105,7 +106,8 @@ class PPAPI_SHARED_EXPORT PpapiGlobals {
// Returns the base::MessageLoopProxy for the main thread. Note that this must
// be called on the main thread the first time so that it can initialize
// its static data.
- base::MessageLoopProxy* GetMainThreadMessageLoop();
+ // Virtual for testing.
brettw 2012/07/13 16:36:22 I think you can revert this part.
+ virtual base::MessageLoopProxy* GetMainThreadMessageLoop();
// Returns the command line for the process.
virtual std::string GetCmdLine() = 0;
@@ -126,6 +128,8 @@ class PPAPI_SHARED_EXPORT PpapiGlobals {
static PpapiGlobals* ppapi_globals_;
+ scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
+
DISALLOW_COPY_AND_ASSIGN(PpapiGlobals);
};

Powered by Google App Engine
This is Rietveld 408576698