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

Unified Diff: ui/aura/env.cc

Issue 23882007: Explicit initialization of aura::Env for browser shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary call Created 7 years, 3 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: 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_;
}

Powered by Google App Engine
This is Rietveld 408576698