OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/audio_debug_recordings_handler.h" | 5 #include "chrome/browser/media/audio_debug_recordings_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "chrome/browser/media/webrtc_log_list.h" | 15 #include "chrome/browser/media/webrtc/webrtc_log_list.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
18 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
19 #include "content/public/browser/render_process_host.h" | 19 #include "content/public/browser/render_process_host.h" |
20 | 20 |
21 using content::BrowserThread; | 21 using content::BrowserThread; |
22 | 22 |
23 // Keys used to attach handler to the RenderProcessHost | 23 // Keys used to attach handler to the RenderProcessHost |
24 const char AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey[] = | 24 const char AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey[] = |
25 "kAudioDebugRecordingsHandlerKey"; | 25 "kAudioDebugRecordingsHandlerKey"; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 if (!is_audio_debug_recordings_in_progress_) { | 147 if (!is_audio_debug_recordings_in_progress_) { |
148 error_callback.Run("No audio debug recording in progress"); | 148 error_callback.Run("No audio debug recording in progress"); |
149 return; | 149 return; |
150 } | 150 } |
151 | 151 |
152 host->DisableAudioDebugRecordings(); | 152 host->DisableAudioDebugRecordings(); |
153 is_audio_debug_recordings_in_progress_ = false; | 153 is_audio_debug_recordings_in_progress_ = false; |
154 const bool is_stopped = true; | 154 const bool is_stopped = true; |
155 callback.Run(prefix_path.AsUTF8Unsafe(), is_stopped, is_manual_stop); | 155 callback.Run(prefix_path.AsUTF8Unsafe(), is_stopped, is_manual_stop); |
156 } | 156 } |
OLD | NEW |