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

Side by Side 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: add DEPS file 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | ppapi/shared_impl/ppapi_globals.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_
6 #define PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ 6 #define PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h"
11 #include "base/threading/thread_local.h" // For testing purposes only. 12 #include "base/threading/thread_local.h" // For testing purposes only.
12 #include "ppapi/c/dev/ppb_console_dev.h" 13 #include "ppapi/c/dev/ppb_console_dev.h"
13 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_module.h" 15 #include "ppapi/c/pp_module.h"
15 #include "ppapi/shared_impl/api_id.h" 16 #include "ppapi/shared_impl/api_id.h"
16 #include "ppapi/shared_impl/ppapi_shared_export.h" 17 #include "ppapi/shared_impl/ppapi_shared_export.h"
17 18
18 namespace base { 19 namespace base {
19 class Lock; 20 class Lock;
20 class MessageLoopProxy; 21 class MessageLoopProxy;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 virtual bool IsPluginGlobals() const; 120 virtual bool IsPluginGlobals() const;
120 121
121 private: 122 private:
122 // Return the thread-local pointer which is used only for unit testing. It 123 // Return the thread-local pointer which is used only for unit testing. It
123 // should always be NULL when running in production. It allows separate 124 // should always be NULL when running in production. It allows separate
124 // threads to have distinct "globals". 125 // threads to have distinct "globals".
125 static PpapiGlobals* GetThreadLocalPointer(); 126 static PpapiGlobals* GetThreadLocalPointer();
126 127
127 static PpapiGlobals* ppapi_globals_; 128 static PpapiGlobals* ppapi_globals_;
128 129
130 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
131
129 DISALLOW_COPY_AND_ASSIGN(PpapiGlobals); 132 DISALLOW_COPY_AND_ASSIGN(PpapiGlobals);
130 }; 133 };
131 134
132 } // namespace ppapi 135 } // namespace ppapi
133 136
134 #endif // PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_ 137 #endif // PPAPI_SHARED_IMPL_PPAPI_GLOBALS_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | ppapi/shared_impl/ppapi_globals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698