Index: ui/aura/env.cc |
diff --git a/ui/aura/env.cc b/ui/aura/env.cc |
index 6b2b3e023a3dbd9a6dc1df81e02f409df2eb5615..016886bf74e6f67af1db566558660015ccf77af2 100644 |
--- a/ui/aura/env.cc |
+++ b/ui/aura/env.cc |
@@ -39,12 +39,18 @@ Env::~Env() { |
ui::Compositor::Terminate(); |
} |
-// static |
-Env* Env::GetInstance() { |
+//static |
+void Env::CreateInstance() { |
if (!instance_) { |
dnicoara
2013/09/10 19:15:00
I would have liked to have this as a check and onl
|
instance_ = new Env; |
instance_->Init(); |
} |
+} |
+ |
+// static |
+Env* Env::GetInstance() { |
+ DCHECK(instance_) << "Env::CreateInstance must be called before getting " |
+ "the instance of Env."; |
return instance_; |
} |