Remove redundant deinitialization code from HttpCache::Transaction.
[chromium-blink-merge.git] / ppapi / shared_impl / test_globals.cc
blob133b9437dd0b9d2b889e061642bf15dbe401dad4
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
3 // found in the LICENSE file.
5 #include "ppapi/shared_impl/test_globals.h"
7 namespace ppapi {
9 TestGlobals::TestGlobals()
10 : ppapi::PpapiGlobals(),
11 resource_tracker_(ResourceTracker::THREAD_SAFE),
12 callback_tracker_(new CallbackTracker) {
15 TestGlobals::TestGlobals(PpapiGlobals::PerThreadForTest per_thread_for_test)
16 : ppapi::PpapiGlobals(per_thread_for_test),
17 resource_tracker_(ResourceTracker::THREAD_SAFE),
18 callback_tracker_(new CallbackTracker) {
21 TestGlobals::~TestGlobals() {
24 ResourceTracker* TestGlobals::GetResourceTracker() {
25 return &resource_tracker_;
28 VarTracker* TestGlobals::GetVarTracker() {
29 return &var_tracker_;
32 CallbackTracker* TestGlobals::GetCallbackTrackerForInstance(
33 PP_Instance instance) {
34 return callback_tracker_.get();
37 thunk::PPB_Instance_API* TestGlobals::GetInstanceAPI(
38 PP_Instance instance) {
39 return NULL;
42 thunk::ResourceCreationAPI* TestGlobals::GetResourceCreationAPI(
43 PP_Instance instance) {
44 return NULL;
47 PP_Module TestGlobals::GetModuleForInstance(PP_Instance instance) {
48 return 0;
51 std::string TestGlobals::GetCmdLine() {
52 return std::string();
55 void TestGlobals::PreCacheFontForFlash(const void* /* logfontw */) {
58 base::Lock* TestGlobals::GetProxyLock() {
59 return NULL;
62 void TestGlobals::LogWithSource(PP_Instance instance,
63 PP_LogLevel level,
64 const std::string& source,
65 const std::string& value) {
68 void TestGlobals::BroadcastLogWithSource(PP_Module module,
69 PP_LogLevel level,
70 const std::string& source,
71 const std::string& value) {
74 MessageLoopShared* TestGlobals::GetCurrentMessageLoop() {
75 return NULL;
78 base::TaskRunner* TestGlobals::GetFileTaskRunner(PP_Instance instance) {
79 return NULL;
82 bool TestGlobals::IsHostGlobals() const {
83 // Pretend to be the host-side, for code that expects one or the other.
84 // TODO(dmichael): just make it settable which one we're pretending to be?
85 return true;
88 } // namespace ppapi