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

Side by Side Diff: media/audio/async_socket_io_handler_posix.cc

Issue 10538083: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/media/h264_parser.cc ('k') | webkit/media/buffered_data_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/audio/async_socket_io_handler.h" 5 #include "media/audio/async_socket_io_handler.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include "base/eintr_wrapper.h" 8 #include "base/eintr_wrapper.h"
9 9
10 namespace media { 10 namespace media {
11 11
12 AsyncSocketIoHandler::AsyncSocketIoHandler() 12 AsyncSocketIoHandler::AsyncSocketIoHandler()
13 : socket_(base::SyncSocket::kInvalidHandle), 13 : socket_(base::SyncSocket::kInvalidHandle),
14 is_watching_(false) {} 14 pending_buffer_(NULL),
15 pending_buffer_len_(0),
16 is_watching_(false) {
17 }
15 18
16 AsyncSocketIoHandler::~AsyncSocketIoHandler() { 19 AsyncSocketIoHandler::~AsyncSocketIoHandler() {
17 DCHECK(CalledOnValidThread()); 20 DCHECK(CalledOnValidThread());
18 } 21 }
19 22
20 void AsyncSocketIoHandler::OnFileCanReadWithoutBlocking(int socket) { 23 void AsyncSocketIoHandler::OnFileCanReadWithoutBlocking(int socket) {
21 DCHECK(CalledOnValidThread()); 24 DCHECK(CalledOnValidThread());
22 DCHECK_EQ(socket, socket_); 25 DCHECK_EQ(socket, socket_);
23 if (!read_complete_.is_null()) { 26 if (!read_complete_.is_null()) {
24 int bytes_read = HANDLE_EINTR(read(socket_, pending_buffer_, 27 int bytes_read = HANDLE_EINTR(read(socket_, pending_buffer_,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 83
81 void AsyncSocketIoHandler::EnsureWatchingSocket() { 84 void AsyncSocketIoHandler::EnsureWatchingSocket() {
82 DCHECK(CalledOnValidThread()); 85 DCHECK(CalledOnValidThread());
83 if (!is_watching_ && socket_ != base::SyncSocket::kInvalidHandle) { 86 if (!is_watching_ && socket_ != base::SyncSocket::kInvalidHandle) {
84 is_watching_ = MessageLoopForIO::current()->WatchFileDescriptor( 87 is_watching_ = MessageLoopForIO::current()->WatchFileDescriptor(
85 socket_, true, MessageLoopForIO::WATCH_READ, &socket_watcher_, this); 88 socket_, true, MessageLoopForIO::WATCH_READ, &socket_watcher_, this);
86 } 89 }
87 } 90 }
88 91
89 } // namespace media. 92 } // namespace media.
OLDNEW
« no previous file with comments | « content/common/gpu/media/h264_parser.cc ('k') | webkit/media/buffered_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698