summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-29 02:16:24 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-29 02:16:24 +0000
commitcc63025a20cbeb3e6cabfc5fce00f277f20b26e6 (patch)
treeeba94df14cc9052194c625d547e29822449f722e /content
parent38f4b74512208bd14ef04bc47a3d88cf13ee8d9c (diff)
downloadchromium_src-cc63025a20cbeb3e6cabfc5fce00f277f20b26e6.zip
chromium_src-cc63025a20cbeb3e6cabfc5fce00f277f20b26e6.tar.gz
chromium_src-cc63025a20cbeb3e6cabfc5fce00f277f20b26e6.tar.bz2
Convert some non-debug logging on content/common to debug logging.
[ Re-land of 107815 ] Review URL: http://codereview.chromium.org/8416055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107852 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/common/child_process.cc8
-rw-r--r--content/common/chrome_application_mac.mm4
-rw-r--r--content/common/gpu/gpu_channel.cc10
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.cc8
-rw-r--r--content/common/gpu/image_transport_surface_linux.cc6
-rw-r--r--content/common/gpu/image_transport_surface_mac.cc4
-rw-r--r--content/common/gpu/media/gles2_texture_to_egl_image_translator.cc2
-rw-r--r--content/common/gpu/media/gpu_video_decode_accelerator.cc22
-rw-r--r--content/common/gpu/media/omx_video_decode_accelerator.cc16
-rw-r--r--content/common/gpu/transport_texture.cc10
-rw-r--r--content/common/handle_enumerator_win.cc2
-rw-r--r--content/common/mac/font_descriptor_unittest.mm6
-rw-r--r--content/common/mac/font_loader.mm22
-rw-r--r--content/common/net/url_fetcher_impl.cc16
-rw-r--r--content/common/npobject_stub.cc2
-rw-r--r--content/common/pepper_plugin_registry.cc7
-rw-r--r--content/common/process_watcher_mac.cc20
-rw-r--r--content/common/process_watcher_posix.cc12
-rw-r--r--content/common/sandbox_mac.mm32
-rw-r--r--content/common/sandbox_policy.cc10
-rw-r--r--content/common/socket_stream_dispatcher.cc2
21 files changed, 111 insertions, 110 deletions
diff --git a/content/common/child_process.cc b/content/common/child_process.cc
index 5e5d5fa..3ed0620 100644
--- a/content/common/child_process.cc
+++ b/content/common/child_process.cc
@@ -96,10 +96,10 @@ void ChildProcess::WaitForDebugger(const std::string& label) {
// TODO(playmobil): In the long term, overriding this flag doesn't seem
// right, either use our own flag or open a dialog we can use.
// This is just to ease debugging in the interim.
- LOG(ERROR) << label
- << " ("
- << getpid()
- << ") paused waiting for debugger to attach @ pid";
+ DLOG(ERROR) << label
+ << " ("
+ << getpid()
+ << ") paused waiting for debugger to attach @ pid";
// Install a signal handler so that pause can be woken.
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
diff --git a/content/common/chrome_application_mac.mm b/content/common/chrome_application_mac.mm
index f21852f..40b6037 100644
--- a/content/common/chrome_application_mac.mm
+++ b/content/common/chrome_application_mac.mm
@@ -17,8 +17,8 @@
+ (NSApplication*)sharedApplication {
NSApplication* app = [super sharedApplication];
if (![NSApp isKindOfClass:self]) {
- LOG(ERROR) << "NSApp should be of type " << [[self className] UTF8String]
- << ", not " << [[NSApp className] UTF8String];
+ DLOG(ERROR) << "NSApp should be of type " << [[self className] UTF8String]
+ << ", not " << [[NSApp className] UTF8String];
DCHECK(false) << "NSApp is of wrong type";
}
return app;
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 4f4fba2..5bc3877 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -67,8 +67,8 @@ void GpuChannel::DestroyTransportTexture(int32 route_id) {
bool GpuChannel::OnMessageReceived(const IPC::Message& message) {
if (log_messages_) {
- VLOG(1) << "received message @" << &message << " on channel @" << this
- << " with type " << message.type();
+ DVLOG(1) << "received message @" << &message << " on channel @" << this
+ << " with type " << message.type();
}
// Control messages are not deferred and can be handled out of order with
@@ -105,8 +105,8 @@ bool GpuChannel::Send(IPC::Message* message) {
// process. This could result in deadlock.
DCHECK(!message->is_sync());
if (log_messages_) {
- VLOG(1) << "sending message @" << message << " on channel @" << this
- << " with type " << message->type();
+ DVLOG(1) << "sending message @" << message << " on channel @" << this
+ << " with type " << message->type();
}
if (!channel_.get()) {
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index 9717d5e..220137d 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -74,7 +74,7 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
// handler can assume that the context is current.
if (decoder_.get()) {
if (!decoder_->MakeCurrent()) {
- LOG(ERROR) << "Context lost because MakeCurrent failed.";
+ DLOG(ERROR) << "Context lost because MakeCurrent failed.";
command_buffer_->SetContextLostReason(decoder_->GetContextLostReason());
command_buffer_->SetParseError(gpu::error::kLostContext);
if (gfx::GLContext::LosesAllContextsOnContextLost())
@@ -205,7 +205,7 @@ void GpuCommandBufferStub::OnInitialize(
// Ensure the decoder is not destroyed if it is not initialized.
decoder_.reset();
- LOG(ERROR) << "Failed to create surface.\n";
+ DLOG(ERROR) << "Failed to create surface.\n";
OnInitializeFailed(reply_message);
return;
}
@@ -222,7 +222,7 @@ void GpuCommandBufferStub::OnInitialize(
// Ensure the decoder is not destroyed if it is not initialized.
decoder_.reset();
- LOG(ERROR) << "Failed to create context.\n";
+ DLOG(ERROR) << "Failed to create context.\n";
OnInitializeFailed(reply_message);
return;
}
@@ -234,7 +234,7 @@ void GpuCommandBufferStub::OnInitialize(
disallowed_features_,
allowed_extensions_.c_str(),
requested_attribs_)) {
- LOG(ERROR) << "Failed to initialize decoder.";
+ DLOG(ERROR) << "Failed to initialize decoder.";
OnInitializeFailed(reply_message);
return;
}
diff --git a/content/common/gpu/image_transport_surface_linux.cc b/content/common/gpu/image_transport_surface_linux.cc
index 77f176e..70a6fcd 100644
--- a/content/common/gpu/image_transport_surface_linux.cc
+++ b/content/common/gpu/image_transport_surface_linux.cc
@@ -263,7 +263,7 @@ bool EGLImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
if (!context->HasExtension("EGL_KHR_image") &&
!context->HasExtension("EGL_KHR_image_pixmap")) {
- LOG(ERROR) << "EGLImage from X11 pixmap not supported";
+ DLOG(ERROR) << "EGLImage from X11 pixmap not supported";
return false;
}
@@ -273,7 +273,7 @@ bool EGLImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE) {
- LOG(ERROR) << "Framebuffer incomplete.";
+ DLOG(ERROR) << "Framebuffer incomplete.";
return false;
}
@@ -502,7 +502,7 @@ bool GLXImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
int major = 0, minor = 2;
XCompositeQueryVersion(dpy, &major, &minor);
if (major == 0 && minor < 2) {
- LOG(ERROR) << "Pixmap from window not supported.";
+ DLOG(ERROR) << "Pixmap from window not supported.";
return false;
}
}
diff --git a/content/common/gpu/image_transport_surface_mac.cc b/content/common/gpu/image_transport_surface_mac.cc
index ba91a92..09d3521 100644
--- a/content/common/gpu/image_transport_surface_mac.cc
+++ b/content/common/gpu/image_transport_surface_mac.cc
@@ -201,7 +201,7 @@ bool IOSurfaceImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
if (status != GL_FRAMEBUFFER_COMPLETE) {
- LOG(ERROR) << "Framebuffer incomplete.";
+ DLOG(ERROR) << "Framebuffer incomplete.";
return false;
}
@@ -386,7 +386,7 @@ bool TransportDIBImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
if (status != GL_FRAMEBUFFER_COMPLETE) {
- LOG(ERROR) << "Framebuffer incomplete.";
+ DLOG(ERROR) << "Framebuffer incomplete.";
return false;
}
diff --git a/content/common/gpu/media/gles2_texture_to_egl_image_translator.cc b/content/common/gpu/media/gles2_texture_to_egl_image_translator.cc
index 057092d..8dbce1e 100644
--- a/content/common/gpu/media/gles2_texture_to_egl_image_translator.cc
+++ b/content/common/gpu/media/gles2_texture_to_egl_image_translator.cc
@@ -60,7 +60,7 @@ void Gles2TextureToEglImageTranslator::DestroyEglImage(
// Clients of this class will call this method for each EGLImage handle.
// Actual destroying of the handles is done here.
if (!egl_destroy_image_khr) {
- LOG(ERROR) << "egl_destroy_image_khr failed";
+ DLOG(ERROR) << "egl_destroy_image_khr failed";
return;
}
egl_destroy_image_khr(egl_display, egl_image);
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index b501fbf..c07ee0b 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -58,8 +58,8 @@ void GpuVideoDecodeAccelerator::ProvidePictureBuffers(
uint32 requested_num_of_buffers, const gfx::Size& dimensions) {
if (!Send(new AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers(
host_route_id_, requested_num_of_buffers, dimensions))) {
- LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers) "
- << "failed";
+ DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers) "
+ << "failed";
}
}
@@ -68,8 +68,8 @@ void GpuVideoDecodeAccelerator::DismissPictureBuffer(
// Notify client that picture buffer is now unused.
if (!Send(new AcceleratedVideoDecoderHostMsg_DismissPictureBuffer(
host_route_id_, picture_buffer_id))) {
- LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_DismissPictureBuffer) "
- << "failed";
+ DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_DismissPictureBuffer) "
+ << "failed";
}
}
@@ -79,7 +79,7 @@ void GpuVideoDecodeAccelerator::PictureReady(
host_route_id_,
picture.picture_buffer_id(),
picture.bitstream_buffer_id()))) {
- LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed";
+ DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_PictureReady) failed";
}
}
@@ -98,8 +98,8 @@ void GpuVideoDecodeAccelerator::NotifyError(
}
if (!Send(new AcceleratedVideoDecoderHostMsg_ErrorNotification(
host_route_id_, error))) {
- LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ErrorNotification) "
- << "failed";
+ DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ErrorNotification) "
+ << "failed";
}
}
@@ -143,7 +143,7 @@ void GpuVideoDecodeAccelerator::OnAssignPictureBuffers(
if (!command_decoder->GetServiceTextureId(
texture_ids[i], &service_texture_id)) {
// TODO(vrk): Send an error for invalid GLES buffers.
- LOG(DFATAL) << "Failed to translate texture!";
+ DLOG(DFATAL) << "Failed to translate texture!";
return;
}
buffers.push_back(media::PictureBuffer(
@@ -185,18 +185,18 @@ void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer(
void GpuVideoDecodeAccelerator::NotifyInitializeDone() {
if (!Send(init_done_msg_))
- LOG(ERROR) << "Send(init_done_msg_) failed";
+ DLOG(ERROR) << "Send(init_done_msg_) failed";
init_done_msg_ = NULL;
}
void GpuVideoDecodeAccelerator::NotifyFlushDone() {
if (!Send(new AcceleratedVideoDecoderHostMsg_FlushDone(host_route_id_)))
- LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_FlushDone) failed";
+ DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_FlushDone) failed";
}
void GpuVideoDecodeAccelerator::NotifyResetDone() {
if (!Send(new AcceleratedVideoDecoderHostMsg_ResetDone(host_route_id_)))
- LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ResetDone) failed";
+ DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ResetDone) failed";
}
bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) {
diff --git a/content/common/gpu/media/omx_video_decode_accelerator.cc b/content/common/gpu/media/omx_video_decode_accelerator.cc
index 0bdf42c..53fc535 100644
--- a/content/common/gpu/media/omx_video_decode_accelerator.cc
+++ b/content/common/gpu/media/omx_video_decode_accelerator.cc
@@ -84,7 +84,7 @@ static OMX_U32 MapH264ProfileToOMXAVCProfile(uint32 profile) {
#define RETURN_ON_FAILURE(result, log, error, ret_val) \
do { \
if (!(result)) { \
- LOG(ERROR) << log; \
+ DLOG(ERROR) << log; \
StopOnError(error); \
return ret_val; \
} \
@@ -339,9 +339,9 @@ void OmxVideoDecodeAccelerator::AssignPictureBuffers(
DCHECK_EQ(message_loop_, MessageLoop::current());
RETURN_ON_FAILURE(CanFillBuffer(), "Can't fill buffer", ILLEGAL_STATE,);
- CHECK_EQ(output_buffers_at_component_, 0);
- CHECK_EQ(fake_output_buffers_.size(), 0U);
- CHECK_EQ(pictures_.size(), 0U);
+ DCHECK_EQ(output_buffers_at_component_, 0);
+ DCHECK_EQ(fake_output_buffers_.size(), 0U);
+ DCHECK_EQ(pictures_.size(), 0U);
static Gles2TextureToEglImageTranslator texture2eglImage_translator;
for (size_t i = 0; i < buffers.size(); ++i) {
@@ -605,7 +605,7 @@ void OmxVideoDecodeAccelerator::OnReachedInvalidInErroring() {
void OmxVideoDecodeAccelerator::ShutdownComponent() {
OMX_ERRORTYPE result = omx_free_handle(component_handle_);
if (result != OMX_ErrorNone)
- LOG(ERROR) << "OMX_FreeHandle() error. Error code: " << result;
+ DLOG(ERROR) << "OMX_FreeHandle() error. Error code: " << result;
component_handle_ = NULL;
client_state_ = OMX_StateMax;
// This Release() call must happen *after* any access to |*this| because it
@@ -695,7 +695,7 @@ void OmxVideoDecodeAccelerator::FreeOutputBuffers() {
for (OutputPictureById::iterator it = pictures_.begin();
it != pictures_.end(); ++it) {
OMX_BUFFERHEADERTYPE* omx_buffer = it->second.omx_buffer_header;
- CHECK(omx_buffer);
+ DCHECK(omx_buffer);
delete reinterpret_cast<media::Picture*>(omx_buffer->pAppPrivate);
result = OMX_FreeBuffer(component_handle_, output_port_, omx_buffer);
RETURN_ON_OMX_FAILURE(result, "OMX_FreeBuffer", PLATFORM_FAILURE,);
@@ -768,13 +768,13 @@ void OmxVideoDecodeAccelerator::FillBufferDoneTask(
--output_buffers_at_component_;
if (fake_output_buffers_.size() && fake_output_buffers_.count(buffer)) {
- CHECK_EQ(fake_output_buffers_.erase(buffer), 1U);
+ DCHECK_EQ(fake_output_buffers_.erase(buffer), 1U);
OMX_ERRORTYPE result =
OMX_FreeBuffer(component_handle_, output_port_, buffer);
RETURN_ON_OMX_FAILURE(result, "OMX_FreeBuffer failed", PLATFORM_FAILURE,);
return;
}
- CHECK(!fake_output_buffers_.size());
+ DCHECK(!fake_output_buffers_.size());
if (buffer->nFlags & OMX_BUFFERFLAG_EOS) {
// Avoid sending the (fake) EOS buffer to the client.
diff --git a/content/common/gpu/transport_texture.cc b/content/common/gpu/transport_texture.cc
index c4ff8cd..ab65b49 100644
--- a/content/common/gpu/transport_texture.cc
+++ b/content/common/gpu/transport_texture.cc
@@ -32,7 +32,7 @@ void TransportTexture::CreateTextures(
bool ret = sender_->Send(new GpuTransportTextureHostMsg_CreateTextures(
host_id_, n, width, height, static_cast<int>(format)));
if (!ret) {
- LOG(ERROR) << "GpuTransportTexture_CreateTextures failed";
+ DLOG(ERROR) << "GpuTransportTexture_CreateTextures failed";
}
}
@@ -42,21 +42,21 @@ void TransportTexture::ReleaseTextures() {
bool ret = sender_->Send(new GpuTransportTextureHostMsg_ReleaseTextures(
host_id_));
if (!ret) {
- LOG(ERROR) << "GpuTransportTexture_ReleaseTextures failed";
+ DLOG(ERROR) << "GpuTransportTexture_ReleaseTextures failed";
}
}
void TransportTexture::TextureUpdated(int texture_id) {
TextureMap::iterator iter = texture_map_.find(texture_id);
if (iter == texture_map_.end()) {
- LOG(ERROR) << "Texture not found: " << texture_id;
+ DLOG(ERROR) << "Texture not found: " << texture_id;
return;
}
bool ret = sender_->Send(new GpuTransportTextureHostMsg_TextureUpdated(
host_id_, iter->second));
if (!ret) {
- LOG(ERROR) << "GpuTransportTexture_TextureUpdated failed";
+ DLOG(ERROR) << "GpuTransportTexture_TextureUpdated failed";
}
}
@@ -86,7 +86,7 @@ void TransportTexture::OnDestroy() {
void TransportTexture::OnTexturesCreated(const std::vector<int>& textures) {
bool ret = decoder_->MakeCurrent();
if (!ret) {
- LOG(ERROR) << "Failed to switch context";
+ DLOG(ERROR) << "Failed to switch context";
return;
}
diff --git a/content/common/handle_enumerator_win.cc b/content/common/handle_enumerator_win.cc
index 2c992e6..5f2dfbe 100644
--- a/content/common/handle_enumerator_win.cc
+++ b/content/common/handle_enumerator_win.cc
@@ -82,7 +82,7 @@ void HandleEnumerator::EnumerateHandles() {
output += GetAccessString(current_type,
sys_handle->handle_entry()->GrantedAccess);
}
- LOG(INFO) << output;
+ DLOG(INFO) << output;
}
HandleType StringToHandleType(const string16& type) {
diff --git a/content/common/mac/font_descriptor_unittest.mm b/content/common/mac/font_descriptor_unittest.mm
index 7054c22..f3ce5e9 100644
--- a/content/common/mac/font_descriptor_unittest.mm
+++ b/content/common/mac/font_descriptor_unittest.mm
@@ -26,7 +26,7 @@ bool CompareFonts(NSFont* font1, NSFont* font2) {
ATSFontRef id2 = CTFontGetPlatformFont(reinterpret_cast<CTFontRef>(font2), 0);
if (id1 != id2) {
- LOG(ERROR) << "ATSFontRefs for "
+ DLOG(ERROR) << "ATSFontRefs for "
<< [[font1 fontName] UTF8String]
<< " and "
<< [[font2 fontName] UTF8String]
@@ -37,7 +37,7 @@ bool CompareFonts(NSFont* font1, NSFont* font2) {
CGFloat size1 = [font1 pointSize];
CGFloat size2 = [font2 pointSize];
if (size1 != size2) {
- LOG(ERROR) << "font sizes for "
+ DLOG(ERROR) << "font sizes for "
<< [[font1 fontName] UTF8String] << " (" << size1 << ")"
<< "and"
<< [[font2 fontName] UTF8String] << " (" << size2 << ")"
@@ -56,7 +56,7 @@ bool CompareFonts(NSFont* font1, NSFont* font2) {
bool is_italic2 = traits2 & NSItalicFontMask;
if (is_bold1 != is_bold2 || is_italic1 != is_italic2) {
- LOG(ERROR) << "Style information for "
+ DLOG(ERROR) << "Style information for "
<< [[font1 fontName] UTF8String]
<< " and "
<< [[font2 fontName] UTF8String]
diff --git a/content/common/mac/font_loader.mm b/content/common/mac/font_loader.mm
index e62a861..a6bf6f0 100644
--- a/content/common/mac/font_loader.mm
+++ b/content/common/mac/font_loader.mm
@@ -56,9 +56,9 @@ bool FontLoader::LoadFontIntoBuffer(NSFont* font_to_encode,
base::SharedMemory* font_data,
uint32* font_data_size,
uint32* font_id) {
- CHECK(font_data);
- CHECK(font_data_size);
- CHECK(font_id);
+ DCHECK(font_data);
+ DCHECK(font_data_size);
+ DCHECK(font_id);
*font_data_size = 0;
*font_id = 0;
@@ -67,7 +67,7 @@ bool FontLoader::LoadFontIntoBuffer(NSFont* font_to_encode,
// Load appropriate NSFont.
if (!font_to_encode) {
- LOG(ERROR) << "Failed to load font " << font_name;
+ DLOG(ERROR) << "Failed to load font " << font_name;
return false;
}
@@ -75,7 +75,7 @@ bool FontLoader::LoadFontIntoBuffer(NSFont* font_to_encode,
ATSFontRef ats_font =
CTFontGetPlatformFont(reinterpret_cast<CTFontRef>(font_to_encode), NULL);
if (!ats_font) {
- LOG(ERROR) << "Conversion to ATSFontRef failed for " << font_name;
+ DLOG(ERROR) << "Conversion to ATSFontRef failed for " << font_name;
return false;
}
@@ -86,7 +86,7 @@ bool FontLoader::LoadFontIntoBuffer(NSFont* font_to_encode,
uint32_cant_hold_fontcontainer_ref);
ATSFontContainerRef fontContainer = kATSFontContainerRefUnspecified;
if (ATSFontGetContainer(ats_font, 0, &fontContainer) != noErr) {
- LOG(ERROR) << "Failed to get font container ref for " << font_name;
+ DLOG(ERROR) << "Failed to get font container ref for " << font_name;
return false;
}
@@ -100,7 +100,7 @@ bool FontLoader::LoadFontIntoBuffer(NSFont* font_to_encode,
// since the font now lives in memory as far as it's concerned.
FSRef font_fsref;
if (ATSFontGetFileReference(ats_font, &font_fsref) != noErr) {
- LOG(ERROR) << "Failed to find font file for " << font_name;
+ DLOG(ERROR) << "Failed to find font file for " << font_name;
return false;
}
FilePath font_path = FilePath(base::mac::PathFromFSRef(font_fsref));
@@ -108,18 +108,18 @@ bool FontLoader::LoadFontIntoBuffer(NSFont* font_to_encode,
// Load file into shared memory buffer.
int64 font_file_size_64 = -1;
if (!file_util::GetFileSize(font_path, &font_file_size_64)) {
- LOG(ERROR) << "Couldn't get font file size for " << font_path.value();
+ DLOG(ERROR) << "Couldn't get font file size for " << font_path.value();
return false;
}
if (font_file_size_64 <= 0 || font_file_size_64 >= kint32max) {
- LOG(ERROR) << "Bad size for font file " << font_path.value();
+ DLOG(ERROR) << "Bad size for font file " << font_path.value();
return false;
}
int32 font_file_size_32 = static_cast<int32>(font_file_size_64);
if (!font_data->CreateAndMapAnonymous(font_file_size_32)) {
- LOG(ERROR) << "Failed to create shmem area for " << font_name;
+ DLOG(ERROR) << "Failed to create shmem area for " << font_name;
return false;
}
@@ -127,7 +127,7 @@ bool FontLoader::LoadFontIntoBuffer(NSFont* font_to_encode,
reinterpret_cast<char*>(font_data->memory()),
font_file_size_32);
if (amt_read != font_file_size_32) {
- LOG(ERROR) << "Failed to read font data for " << font_path.value();
+ DLOG(ERROR) << "Failed to read font data for " << font_path.value();
return false;
}
diff --git a/content/common/net/url_fetcher_impl.cc b/content/common/net/url_fetcher_impl.cc
index 3839fc3..d0d7ad2 100644
--- a/content/common/net/url_fetcher_impl.cc
+++ b/content/common/net/url_fetcher_impl.cc
@@ -334,7 +334,7 @@ URLFetcherImpl::Core::TempFileWriter::~TempFileWriter() {
void URLFetcherImpl::Core::TempFileWriter::CreateTempFile() {
DCHECK(core_->io_message_loop_proxy_->BelongsToCurrentThread());
- CHECK(file_message_loop_proxy_.get());
+ DCHECK(file_message_loop_proxy_.get());
base::FileUtilProxy::CreateTemporary(
file_message_loop_proxy_,
0, // No additional file flags.
@@ -538,14 +538,14 @@ URLFetcherImpl::Core::~Core() {
void URLFetcherImpl::Core::Start() {
DCHECK(delegate_loop_proxy_);
- CHECK(request_context_getter_) << "We need an URLRequestContext!";
+ DCHECK(request_context_getter_) << "We need an URLRequestContext!";
if (io_message_loop_proxy_) {
DCHECK_EQ(io_message_loop_proxy_,
request_context_getter_->GetIOMessageLoopProxy());
} else {
io_message_loop_proxy_ = request_context_getter_->GetIOMessageLoopProxy();
}
- CHECK(io_message_loop_proxy_.get()) << "We need an IO message loop proxy";
+ DCHECK(io_message_loop_proxy_.get()) << "We need an IO message loop proxy";
io_message_loop_proxy_->PostTask(
FROM_HERE, base::Bind(&Core::StartOnIOThread, this));
@@ -626,7 +626,7 @@ void URLFetcherImpl::Core::CompleteAddingUploadDataChunk(
void URLFetcherImpl::Core::AppendChunkToUpload(const std::string& content,
bool is_last_chunk) {
DCHECK(delegate_loop_proxy_);
- CHECK(io_message_loop_proxy_.get());
+ DCHECK(io_message_loop_proxy_.get());
io_message_loop_proxy_->PostTask(
FROM_HERE,
base::Bind(&Core::CompleteAddingUploadDataChunk, this, content,
@@ -762,7 +762,7 @@ void URLFetcherImpl::Core::StartURLRequest() {
return;
}
- CHECK(request_context_getter_);
+ DCHECK(request_context_getter_);
DCHECK(!request_.get());
g_registry.Get().AddURLFetcherCore(this);
@@ -810,8 +810,8 @@ void URLFetcherImpl::Core::StartURLRequest() {
// If we are writing the response to a file, the only caller
// of this function should have created it and not written yet.
- CHECK(!temp_file_writer_.get() ||
- temp_file_writer_->total_bytes_written() == 0);
+ DCHECK(!temp_file_writer_.get() ||
+ temp_file_writer_->total_bytes_written() == 0);
request_->Start();
}
@@ -866,7 +866,7 @@ void URLFetcherImpl::Core::OnCompletedURLRequest(
}
void URLFetcherImpl::Core::InformDelegateFetchIsComplete() {
- CHECK(delegate_loop_proxy_->BelongsToCurrentThread());
+ DCHECK(delegate_loop_proxy_->BelongsToCurrentThread());
if (delegate_) {
delegate_->OnURLFetchComplete(fetcher_);
}
diff --git a/content/common/npobject_stub.cc b/content/common/npobject_stub.cc
index 7e283ce9..c8e16a7 100644
--- a/content/common/npobject_stub.cc
+++ b/content/common/npobject_stub.cc
@@ -37,7 +37,7 @@ NPObjectStub::NPObjectStub(
NPObjectStub::~NPObjectStub() {
channel_->RemoveRoute(route_id_);
- CHECK(!npobject_);
+ DCHECK(!npobject_);
}
void NPObjectStub::DeleteSoon() {
diff --git a/content/common/pepper_plugin_registry.cc b/content/common/pepper_plugin_registry.cc
index 609dc8b..2316ec8 100644
--- a/content/common/pepper_plugin_registry.cc
+++ b/content/common/pepper_plugin_registry.cc
@@ -135,9 +135,10 @@ void PepperPluginRegistry::PreloadModules() {
std::string error;
base::NativeLibrary library = base::LoadNativeLibrary(plugins[i].path,
&error);
- LOG_IF(WARNING, !library) << "Unable to load plugin "
- << plugins[i].path.value() << " "
- << error;
+ DLOG_IF(WARNING, !library) << "Unable to load plugin "
+ << plugins[i].path.value() << " "
+ << error;
+ (void)library; // Prevent release-mode warning.
}
}
}
diff --git a/content/common/process_watcher_mac.cc b/content/common/process_watcher_mac.cc
index 5db9903..6af9ffc 100644
--- a/content/common/process_watcher_mac.cc
+++ b/content/common/process_watcher_mac.cc
@@ -22,7 +22,7 @@ const int kWaitBeforeKillSeconds = 2;
void BlockingReap(pid_t child) {
const pid_t result = HANDLE_EINTR(waitpid(child, NULL, 0));
if (result == -1) {
- PLOG(ERROR) << "waitpid(" << child << ", NULL, 0)";
+ DPLOG(ERROR) << "waitpid(" << child << ", NULL, 0)";
}
}
@@ -77,7 +77,7 @@ void WaitForChildToDie(pid_t child, int timeout) {
int kq = HANDLE_EINTR(kqueue());
if (kq == -1) {
- PLOG(ERROR) << "kqueue()";
+ DPLOG(ERROR) << "kqueue()";
} else {
file_util::ScopedFD auto_close_kq(&kq);
@@ -87,7 +87,7 @@ void WaitForChildToDie(pid_t child, int timeout) {
if (result == -1) {
if (errno != ESRCH) {
- PLOG(ERROR) << "kevent (setup " << child << ")";
+ DPLOG(ERROR) << "kevent (setup " << child << ")";
} else {
// At this point, one of the following has occurred:
// 1. The process has died but has not yet been reaped.
@@ -129,10 +129,10 @@ void WaitForChildToDie(pid_t child, int timeout) {
}
if (result == -1) {
- PLOG(ERROR) << "kevent (wait " << child << ")";
+ DPLOG(ERROR) << "kevent (wait " << child << ")";
} else if (result > 1) {
- LOG(ERROR) << "kevent (wait " << child << "): unexpected result "
- << result;
+ DLOG(ERROR) << "kevent (wait " << child << "): unexpected result "
+ << result;
} else if (result == 1) {
if ((event.fflags & NOTE_EXIT) &&
(event.ident == static_cast<uintptr_t>(child))) {
@@ -141,9 +141,9 @@ void WaitForChildToDie(pid_t child, int timeout) {
BlockingReap(child);
return;
} else {
- LOG(ERROR) << "kevent (wait " << child
- << "): unexpected event: fflags=" << event.fflags
- << ", ident=" << event.ident;
+ DLOG(ERROR) << "kevent (wait " << child
+ << "): unexpected event: fflags=" << event.fflags
+ << ", ident=" << event.ident;
}
}
}
@@ -155,7 +155,7 @@ void WaitForChildToDie(pid_t child, int timeout) {
// signal is not delivered to a live process.
result = kill(child, SIGKILL);
if (result == -1) {
- PLOG(ERROR) << "kill(" << child << ", SIGKILL)";
+ DPLOG(ERROR) << "kill(" << child << ", SIGKILL)";
} else {
// The child is definitely on the way out now. BlockingReap won't need to
// wait for long, if at all.
diff --git a/content/common/process_watcher_posix.cc b/content/common/process_watcher_posix.cc
index ebad678..f296106 100644
--- a/content/common/process_watcher_posix.cc
+++ b/content/common/process_watcher_posix.cc
@@ -18,7 +18,7 @@
static bool IsChildDead(pid_t child) {
const pid_t result = HANDLE_EINTR(waitpid(child, NULL, WNOHANG));
if (result == -1) {
- PLOG(ERROR) << "waitpid(" << child << ")";
+ DPLOG(ERROR) << "waitpid(" << child << ")";
NOTREACHED();
} else if (result > 0) {
// The child has died.
@@ -47,8 +47,8 @@ class BackgroundReaper : public base::PlatformThread::Delegate {
if (timeout_ == 0) {
pid_t r = HANDLE_EINTR(waitpid(child_, NULL, 0));
if (r != child_) {
- PLOG(ERROR) << "While waiting for " << child_
- << " to terminate, we got the following result: " << r;
+ DPLOG(ERROR) << "While waiting for " << child_
+ << " to terminate, we got the following result: " << r;
}
return;
}
@@ -67,10 +67,10 @@ class BackgroundReaper : public base::PlatformThread::Delegate {
// SIGKILL is uncatchable. Since the signal was delivered, we can
// just wait for the process to die now in a blocking manner.
if (HANDLE_EINTR(waitpid(child_, NULL, 0)) < 0)
- PLOG(WARNING) << "waitpid";
+ DPLOG(WARNING) << "waitpid";
} else {
- LOG(ERROR) << "While waiting for " << child_ << " to terminate we"
- << " failed to deliver a SIGKILL signal (" << errno << ").";
+ DLOG(ERROR) << "While waiting for " << child_ << " to terminate we"
+ << " failed to deliver a SIGKILL signal (" << errno << ").";
}
}
diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm
index 65c9dd0..d1ab290 100644
--- a/content/common/sandbox_mac.mm
+++ b/content/common/sandbox_mac.mm
@@ -75,7 +75,7 @@ NOINLINE void FatalStringQuoteException(const std::string& str) {
// Copy bad string to the stack so it's recorded in the crash dump.
char bad_string[256] = {0};
base::strlcpy(bad_string, str.c_str(), arraysize(bad_string));
- LOG(FATAL) << "String quoting failed " << bad_string;
+ DLOG(FATAL) << "String quoting failed " << bad_string;
}
} // namespace
@@ -364,8 +364,8 @@ NSString* LoadSandboxTemplate(Sandbox::SandboxProcessType sandbox_type) {
error:NULL];
if (!common_sandbox_prefix_data) {
- LOG(FATAL) << "Failed to find the sandbox profile on disk "
- << [common_sandbox_prefix_path fileSystemRepresentation];
+ DLOG(FATAL) << "Failed to find the sandbox profile on disk "
+ << [common_sandbox_prefix_path fileSystemRepresentation];
return nil;
}
@@ -378,8 +378,8 @@ NSString* LoadSandboxTemplate(Sandbox::SandboxProcessType sandbox_type) {
error:NULL];
if (!sandbox_data) {
- LOG(FATAL) << "Failed to find the sandbox profile on disk "
- << [sandbox_profile_path fileSystemRepresentation];
+ DLOG(FATAL) << "Failed to find the sandbox profile on disk "
+ << [sandbox_profile_path fileSystemRepresentation];
return nil;
}
@@ -404,9 +404,9 @@ bool Sandbox::PostProcessSandboxProfile(
// Split string on "@" characters.
std::vector<std::string> raw_sandbox_pieces;
if (Tokenize([sandbox_data UTF8String], "@", &raw_sandbox_pieces) == 0) {
- LOG(FATAL) << "Bad Sandbox profile, should contain at least one token ("
- << [sandbox_data UTF8String]
- << ")";
+ DLOG(FATAL) << "Bad Sandbox profile, should contain at least one token ("
+ << [sandbox_data UTF8String]
+ << ")";
return false;
}
@@ -548,10 +548,10 @@ bool Sandbox::EnableSandbox(SandboxProcessType sandbox_type,
char* error_buff = NULL;
int error = sandbox_init(final_sandbox_profile_str.c_str(), 0, &error_buff);
bool success = (error == 0 && error_buff == NULL);
- LOG_IF(FATAL, !success) << "Failed to initialize sandbox: "
- << error
- << " "
- << error_buff;
+ DLOG_IF(FATAL, !success) << "Failed to initialize sandbox: "
+ << error
+ << " "
+ << error_buff;
sandbox_free_error(error_buff);
return success;
}
@@ -560,16 +560,16 @@ bool Sandbox::EnableSandbox(SandboxProcessType sandbox_type,
void Sandbox::GetCanonicalSandboxPath(FilePath* path) {
int fd = HANDLE_EINTR(open(path->value().c_str(), O_RDONLY));
if (fd < 0) {
- PLOG(FATAL) << "GetCanonicalSandboxPath() failed for: "
- << path->value();
+ DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: "
+ << path->value();
return;
}
file_util::ScopedFD file_closer(&fd);
FilePath::CharType canonical_path[MAXPATHLEN];
if (HANDLE_EINTR(fcntl(fd, F_GETPATH, canonical_path)) != 0) {
- PLOG(FATAL) << "GetCanonicalSandboxPath() failed for: "
- << path->value();
+ DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: "
+ << path->value();
return;
}
diff --git a/content/common/sandbox_policy.cc b/content/common/sandbox_policy.cc
index 2057bcb..1153a30c 100644
--- a/content/common/sandbox_policy.cc
+++ b/content/common/sandbox_policy.cc
@@ -198,7 +198,7 @@ void BlacklistAddOneDll(const wchar_t* module_name,
}
}
policy->AddDllToUnload(module_name);
- VLOG(1) << "dll to unload found: " << module_name;
+ DVLOG(1) << "dll to unload found: " << module_name;
return;
}
@@ -374,8 +374,8 @@ namespace sandbox {
void InitBrokerServices(sandbox::BrokerServices* broker_services) {
// TODO(abarth): DCHECK(CalledOnValidThread());
// See <http://b/1287166>.
- CHECK(broker_services);
- CHECK(!g_broker_services);
+ DCHECK(broker_services);
+ DCHECK(!g_broker_services);
broker_services->Init();
g_broker_services = broker_services;
}
@@ -420,7 +420,7 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line,
if ((type == ChildProcessInfo::GPU_PROCESS) &&
(browser_command_line.HasSwitch(switches::kDisableGpuSandbox))) {
in_sandbox = false;
- VLOG(1) << "GPU sandbox is disabled";
+ DVLOG(1) << "GPU sandbox is disabled";
}
if (browser_command_line.HasSwitch(switches::kNoSandbox) ||
@@ -532,7 +532,7 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line,
TRACE_EVENT_END_ETW("StartProcessWithAccess::LAUNCHPROCESS", 0, 0);
if (sandbox::SBOX_ALL_OK != result) {
- LOG(ERROR) << "Failed to launch process. Error: " << result;
+ DLOG(ERROR) << "Failed to launch process. Error: " << result;
return 0;
}
diff --git a/content/common/socket_stream_dispatcher.cc b/content/common/socket_stream_dispatcher.cc
index f4f6854..a44dd94 100644
--- a/content/common/socket_stream_dispatcher.cc
+++ b/content/common/socket_stream_dispatcher.cc
@@ -149,7 +149,7 @@ void IPCWebSocketStreamHandleBridge::DoConnect(const GURL& url) {
DVLOG(1) << "Connect socket_id=" << socket_id_;
// TODO(ukai): timeout to OnConnected.
} else {
- LOG(ERROR) << "IPC SocketStream_Connect failed.";
+ DLOG(ERROR) << "IPC SocketStream_Connect failed.";
OnClosed();
}
}