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

Side by Side Diff: chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc

Issue 2949563002: WebrtcAudioPrivateSetAudioExperimentsFunction dummy implementation (Closed)
Patch Set: Set an error Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/extensions/api/webrtc_audio_private/webrtc_audio_privat e_api.h" 5 #include "chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_privat e_api.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 SendResponse(true); 295 SendResponse(true);
296 } 296 }
297 297
298 WebrtcAudioPrivateSetAudioExperimentsFunction:: 298 WebrtcAudioPrivateSetAudioExperimentsFunction::
299 WebrtcAudioPrivateSetAudioExperimentsFunction() {} 299 WebrtcAudioPrivateSetAudioExperimentsFunction() {}
300 300
301 WebrtcAudioPrivateSetAudioExperimentsFunction:: 301 WebrtcAudioPrivateSetAudioExperimentsFunction::
302 ~WebrtcAudioPrivateSetAudioExperimentsFunction() {} 302 ~WebrtcAudioPrivateSetAudioExperimentsFunction() {}
303 303
304 bool WebrtcAudioPrivateSetAudioExperimentsFunction::RunAsync() { 304 bool WebrtcAudioPrivateSetAudioExperimentsFunction::RunAsync() {
305 #if BUILDFLAG(ENABLE_WEBRTC)
305 DCHECK_CURRENTLY_ON(BrowserThread::UI); 306 DCHECK_CURRENTLY_ON(BrowserThread::UI);
306 std::unique_ptr<wap::SetAudioExperiments::Params> params( 307 std::unique_ptr<wap::SetAudioExperiments::Params> params(
307 wap::SetAudioExperiments::Params::Create(*args_)); 308 wap::SetAudioExperiments::Params::Create(*args_));
308 EXTENSION_FUNCTION_VALIDATE(params.get()); 309 EXTENSION_FUNCTION_VALIDATE(params.get());
309 310
310 if (params->audio_experiments.enable_aec3.get()) { 311 if (params->audio_experiments.enable_aec3.get()) {
311 content::RenderProcessHost* host = GetRenderProcessHostFromRequest( 312 content::RenderProcessHost* host = GetRenderProcessHostFromRequest(
312 params->request, params->security_origin); 313 params->request, params->security_origin);
313 if (!host) { 314 if (!host) {
314 SendResponse(false); 315 SendResponse(false);
315 return false; 316 return false;
316 } 317 }
317 318
318 host->SetEchoCanceller3(*params->audio_experiments.enable_aec3); 319 host->SetEchoCanceller3(*params->audio_experiments.enable_aec3);
319 } 320 }
320 321
321 SendResponse(true); 322 SendResponse(true);
322 return true; 323 return true;
324 #else
325 SetError("Not supported");
326 SendResponse(false);
327 return false;
328 #endif
323 } 329 }
324 330
325 } // namespace extensions 331 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698