What?  

if (aura::RootWindow* root = window_->GetNativeWindow()->GetRootWindow())
+    root->SetTransform(transform);
+  else
+    return;

and misha suggests

aura::RootWindow* root = window_->GetNativeWindow()->GetRootWindow();
if (!root)
   return;

root->SetTransform...

That is a very fine suggestion