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

Unified Diff: content/browser/renderer_host/media/video_capture_device_client.cc

Issue 1418263006: Extend VideoCaptureDevice::Client::OnError() to have a tracked_objects::Location param. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: content/browser/renderer_host/media/video_capture_device_client.cc
diff --git a/content/browser/renderer_host/media/video_capture_device_client.cc b/content/browser/renderer_host/media/video_capture_device_client.cc
index 7ba77616d6e3697621df57cbe6344fee32682f17..0cd2d4f919a4959ed294714f7483c858fd329a10 100644
--- a/content/browser/renderer_host/media/video_capture_device_client.cc
+++ b/content/browser/renderer_host/media/video_capture_device_client.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/location.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
#include "content/browser/compositor/image_transport_factory.h"
@@ -393,12 +394,13 @@ void VideoCaptureDeviceClient::OnIncomingCapturedVideoFrame(
}
void VideoCaptureDeviceClient::OnError(
+ const tracked_objects::Location& from_here,
const std::string& reason) {
const std::string log_message = base::StringPrintf(
- "Error on video capture: %s, OS message: %s",
- reason.c_str(),
- logging::SystemErrorCodeToString(
- logging::GetLastSystemErrorCode()).c_str());
+ "Error on %s:%d: %s, OS message: %s", from_here.file_name(),
+ from_here.line_number(), reason.c_str(),
+ logging::SystemErrorCodeToString(logging::GetLastSystemErrorCode())
+ .c_str());
DLOG(ERROR) << log_message;
OnLog(log_message);
BrowserThread::PostTask(BrowserThread::IO,

Powered by Google App Engine
This is Rietveld 408576698