Index: content/browser/gpu/browser_gpu_channel_host_factory.cc |
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc |
index 687ef0cf16c0407ff00aa6f9cafde021eaa01a9c..5f20475f5bae32743bb7b8af7f20baa907ee6d13 100644 |
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc |
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc |
@@ -15,6 +15,8 @@ |
namespace content { |
+BrowserGpuChannelHostFactory* BrowserGpuChannelHostFactory::instance_ = NULL; |
+ |
BrowserGpuChannelHostFactory::CreateRequest::CreateRequest() |
: event(false, false), |
route_id(MSG_ROUTING_NONE) { |
@@ -32,27 +34,22 @@ BrowserGpuChannelHostFactory::EstablishRequest::~EstablishRequest() { |
} |
void BrowserGpuChannelHostFactory::Initialize() { |
- new BrowserGpuChannelHostFactory(); |
+ instance_ = new BrowserGpuChannelHostFactory(); |
} |
void BrowserGpuChannelHostFactory::Terminate() { |
- delete instance(); |
-} |
- |
-BrowserGpuChannelHostFactory* BrowserGpuChannelHostFactory::Get() { |
- return static_cast<BrowserGpuChannelHostFactory*>(instance()); |
+ delete instance_; |
+ instance_ = NULL; |
} |
BrowserGpuChannelHostFactory::BrowserGpuChannelHostFactory() |
: gpu_client_id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()), |
shutdown_event_(new base::WaitableEvent(true, false)), |
gpu_host_id_(0) { |
- set_instance(this); |
} |
BrowserGpuChannelHostFactory::~BrowserGpuChannelHostFactory() { |
shutdown_event_->Signal(); |
- set_instance(NULL); |
} |
bool BrowserGpuChannelHostFactory::IsMainThread() { |