Index: chrome/browser/chrome_content_browser_client.cc |
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
index a9c255b818839023ea63c7eefa127525cf2e8cb5..2c167134dfc11f3d32a28ad2cd38612b8e3f422b 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -79,6 +79,7 @@ |
#include "chrome/browser/user_style_sheet_watcher.h" |
#include "chrome/browser/user_style_sheet_watcher_factory.h" |
#include "chrome/browser/validation_message_message_filter.h" |
+#include "chrome/browser/webrtc_log_upload_manager.h" |
#include "chrome/common/child_process_logging.h" |
#include "chrome/common/chrome_constants.h" |
#include "chrome/common/chrome_paths.h" |
@@ -2248,4 +2249,35 @@ crypto::CryptoModuleBlockingPasswordDelegate* |
} |
#endif |
+base::PlatformFile ChromeContentBrowserClient::CreateWebRtcLogFile() { |
+ // TODO(grunell): This should be done by the upload manager. What thread? FILE |
+ // presubmably. |
+ const char filename[] = "/tmp/chromium-webrtc-log-temp.bz2"; |
+ int flags = base::PLATFORM_FILE_CREATE_ALWAYS | |
+ base::PLATFORM_FILE_WRITE | |
+ // Temp read here. |
+ base::PLATFORM_FILE_READ; |
+ /*base::PLATFORM_FILE_DELETE_ON_CLOSE*/; |
+ bool created = false; |
+ base::PlatformFileError error = base::PLATFORM_FILE_OK; |
+ base::PlatformFile file = |
+ CreatePlatformFile(base::FilePath(filename), flags, &created, &error); |
+ DCHECK(created); |
+ DCHECK(error == base::PLATFORM_FILE_OK); |
+ |
+ return file; |
+} |
+ |
+void ChromeContentBrowserClient::UploadWebRtcLog(base::PlatformFile log_file) { |
+ WebRtcLogUploadManager* upload_manager = |
+ g_browser_process->webrtc_log_upload_manager(); |
+ |
+ BrowserThread::PostTask( |
+ BrowserThread::FILE, |
+ FROM_HERE, |
+ base::Bind(&WebRtcLogUploadManager::UploadLog, |
+ base::Unretained(upload_manager), |
+ log_file)); |
+} |
+ |
} // namespace chrome |