cc: Switch to Chromium DCHECKs LOGs

We can't compile-guard code and use DCHECK since it can be enabled at runtime. So we guard the DCHECKs that we want to rely on conditionally-compiled code in !NDEBUG compile guards.

This also replaces use of LOG_ERROR("Foo") with LOG(ERROR)<<"Foo";

This was previously discussed and committed as https://codereview.chromium.org/11048044/
using a guard based on LOGGING_IS_OFFICIAL_BUILD, however this was not sufficient since there are build configurations that are official builds but have dchecks compiled.

R=enne

Review URL: https://codereview.chromium.org/11192030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162739 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/layer_tree_host_impl_unittest.cc b/cc/layer_tree_host_impl_unittest.cc
index 029c296..26d806f0 100644
--- a/cc/layer_tree_host_impl_unittest.cc
+++ b/cc/layer_tree_host_impl_unittest.cc
@@ -490,7 +490,7 @@
     initializeRendererAndDrawFrame();
 
     CCLayerImpl* scrollLayer = m_hostImpl->rootScrollLayer();
-    ASSERT(scrollLayer);
+    DCHECK(scrollLayer);
 
     const float minPageScale = 1, maxPageScale = 4;
     const WebTransformationMatrix identityScaleTransform;
@@ -543,7 +543,7 @@
     initializeRendererAndDrawFrame();
 
     CCLayerImpl* scrollLayer = m_hostImpl->rootScrollLayer();
-    ASSERT(scrollLayer);
+    DCHECK(scrollLayer);
 
     const float minPageScale = CCSettings::pageScalePinchZoomEnabled() ? 1 : 0.5;
     const float maxPageScale = 4;
@@ -630,7 +630,7 @@
     initializeRendererAndDrawFrame();
 
     CCLayerImpl* scrollLayer = m_hostImpl->rootScrollLayer();
-    ASSERT(scrollLayer);
+    DCHECK(scrollLayer);
 
     const float minPageScale = CCSettings::pageScalePinchZoomEnabled() ? 1 : 0.5;
     const float maxPageScale = 4;
@@ -682,7 +682,7 @@
     initializeRendererAndDrawFrame();
 
     CCLayerImpl* scrollLayer = m_hostImpl->rootScrollLayer();
-    ASSERT(scrollLayer);
+    DCHECK(scrollLayer);
 
     const float minPageScale = CCSettings::pageScalePinchZoomEnabled() ? 1 : 0.5;
     const float maxPageScale = 4;
@@ -751,7 +751,7 @@
     initializeRendererAndDrawFrame();
 
     CCLayerImpl* scrollLayer = m_hostImpl->rootScrollLayer();
-    ASSERT(scrollLayer);
+    DCHECK(scrollLayer);
 
     const float minPageScale = CCSettings::pageScalePinchZoomEnabled() ? 1 : 0.5;
     const float maxPageScale = 4;
@@ -2616,7 +2616,7 @@
 
     void createResources(CCResourceProvider* provider)
     {
-        ASSERT(provider);
+        DCHECK(provider);
         int pool = 0;
         IntSize size(10, 10);
         GC3Denum format = GraphicsContext3D::RGBA;