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 "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/shared_memory.h" |
10 #include "base/path_service.h" | 11 #include "base/path_service.h" |
11 #include "base/shared_memory.h" | |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/string_split.h" | 13 #include "base/strings/string_split.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "chrome/browser/media/webrtc_log_upload_list.h" | 16 #include "chrome/browser/media/webrtc_log_upload_list.h" |
17 #include "chrome/common/chrome_paths.h" | 17 #include "chrome/common/chrome_paths.h" |
18 #include "chrome/common/chrome_version_info.h" | 18 #include "chrome/common/chrome_version_info.h" |
19 #include "chrome/common/partial_circular_buffer.h" | 19 #include "chrome/common/partial_circular_buffer.h" |
20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
21 #include "net/base/mime_util.h" | 21 #include "net/base/mime_util.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 // Write the Unix time and report ID to the log list file. | 249 // Write the Unix time and report ID to the log list file. |
250 base::Time time_now = base::Time::Now(); | 250 base::Time time_now = base::Time::Now(); |
251 contents += base::DoubleToString(time_now.ToDoubleT()) + | 251 contents += base::DoubleToString(time_now.ToDoubleT()) + |
252 "," + report_id + '\n'; | 252 "," + report_id + '\n'; |
253 | 253 |
254 int written = file_util::WriteFile(upload_list_path_, &contents[0], | 254 int written = file_util::WriteFile(upload_list_path_, &contents[0], |
255 contents.size()); | 255 contents.size()); |
256 DPCHECK(written == static_cast<int>(contents.size())); | 256 DPCHECK(written == static_cast<int>(contents.size())); |
257 } | 257 } |
OLD | NEW |