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

Side by Side Diff: chrome/browser/renderer_host/audio_renderer_host.cc

Issue 155905: Separates ipc code from common (http://crbug.com/16829) (Closed)
Patch Set: Fixes reference to 'common_message_traits' it's actually 'common_param_traits' Created 11 years, 5 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/histogram.h" 5 #include "base/histogram.h"
6 #include "base/lock.h" 6 #include "base/lock.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/process.h" 8 #include "base/process.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "base/waitable_event.h" 10 #include "base/waitable_event.h"
11 #include "chrome/browser/renderer_host/audio_renderer_host.h" 11 #include "chrome/browser/renderer_host/audio_renderer_host.h"
12 #include "chrome/common/ipc_logging.h"
13 #include "chrome/common/render_messages.h" 12 #include "chrome/common/render_messages.h"
13 #include "ipc/ipc_logging.h"
14 14
15 namespace { 15 namespace {
16 16
17 void RecordRoundTripLatency(base::TimeDelta latency) { 17 void RecordRoundTripLatency(base::TimeDelta latency) {
18 static ThreadSafeHistogram histogram("Audio.IPC_RoundTripLatency", 18 static ThreadSafeHistogram histogram("Audio.IPC_RoundTripLatency",
19 1, 1000, 100); 19 1, 1000, 100);
20 histogram.AddTime(latency); 20 histogram.AddTime(latency);
21 } 21 }
22 22
23 void RecordReceiveLatency(base::TimeDelta latency) { 23 void RecordReceiveLatency(base::TimeDelta latency) {
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 if (MessageLoop::current() == io_loop_) { 580 if (MessageLoop::current() == io_loop_) {
581 OnDestroySource(source); 581 OnDestroySource(source);
582 } else { 582 } else {
583 // TODO(hclam): make sure it's always safe to post a task to IO loop. 583 // TODO(hclam): make sure it's always safe to post a task to IO loop.
584 // It is possible that IO message loop is destroyed but there's still some 584 // It is possible that IO message loop is destroyed but there's still some
585 // dangling audio hardware threads that try to call this method. 585 // dangling audio hardware threads that try to call this method.
586 io_loop_->PostTask(FROM_HERE, 586 io_loop_->PostTask(FROM_HERE,
587 NewRunnableMethod(this, &AudioRendererHost::OnDestroySource, source)); 587 NewRunnableMethod(this, &AudioRendererHost::OnDestroySource, source));
588 } 588 }
589 } 589 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/audio_renderer_host.h ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698