OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/media/webrtc_log_uploader.h" | 5 #include "chrome/browser/media/webrtc_log_uploader.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const std::string& dump_data) { | 68 const std::string& dump_data) { |
69 AddMultipartFileContentHeader(post_data, name); | 69 AddMultipartFileContentHeader(post_data, name); |
70 post_data->append(dump_data.data(), dump_data.size()); | 70 post_data->append(dump_data.data(), dump_data.size()); |
71 post_data->append("\r\n"); | 71 post_data->append("\r\n"); |
72 } | 72 } |
73 | 73 |
74 } // namespace | 74 } // namespace |
75 | 75 |
76 WebRtcLogUploadDoneData::WebRtcLogUploadDoneData() {} | 76 WebRtcLogUploadDoneData::WebRtcLogUploadDoneData() {} |
77 | 77 |
| 78 WebRtcLogUploadDoneData::WebRtcLogUploadDoneData( |
| 79 const WebRtcLogUploadDoneData& other) = default; |
| 80 |
78 WebRtcLogUploadDoneData::~WebRtcLogUploadDoneData() {} | 81 WebRtcLogUploadDoneData::~WebRtcLogUploadDoneData() {} |
79 | 82 |
80 WebRtcLogUploader::WebRtcLogUploader() | 83 WebRtcLogUploader::WebRtcLogUploader() |
81 : log_count_(0), | 84 : log_count_(0), |
82 post_data_(NULL), | 85 post_data_(NULL), |
83 shutting_down_(false) { | 86 shutting_down_(false) { |
84 file_thread_checker_.DetachFromThread(); | 87 file_thread_checker_.DetachFromThread(); |
85 } | 88 } |
86 | 89 |
87 WebRtcLogUploader::~WebRtcLogUploader() { | 90 WebRtcLogUploader::~WebRtcLogUploader() { |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 std::string error_message; | 592 std::string error_message; |
590 if (!success) { | 593 if (!success) { |
591 error_message = "Uploading failed, response code: " + | 594 error_message = "Uploading failed, response code: " + |
592 base::IntToString(response_code); | 595 base::IntToString(response_code); |
593 } | 596 } |
594 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 597 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
595 base::Bind(upload_done_data.callback, success, | 598 base::Bind(upload_done_data.callback, success, |
596 report_id, error_message)); | 599 report_id, error_message)); |
597 } | 600 } |
598 } | 601 } |
OLD | NEW |