Remove libjingle source code to prevent confusion as it is a separated project

Change-Id: I66b696598a01c9a2d38baa552f3c5bca65c4ef58
diff --git a/third_party/libjingle/source/AUTHORS b/third_party/libjingle/source/AUTHORS
deleted file mode 100644
index cbe3b77..0000000
--- a/third_party/libjingle/source/AUTHORS
+++ /dev/null
@@ -1,4 +0,0 @@
-Google Inc.
-Eric Rescorla, RTFM Inc.
-Pali Rohar
-Robert Nagy
diff --git a/third_party/libjingle/source/CHANGELOG b/third_party/libjingle/source/CHANGELOG
deleted file mode 100644
index ab264a1..0000000
--- a/third_party/libjingle/source/CHANGELOG
+++ /dev/null
@@ -1,138 +0,0 @@
-Libjingle
-
-0.6.6 - Dec 14, 2011
-  - Fix support for rtcp multiplexing (aka rtcp-mux).
-  - Add more support for FreeBSD and OpenBSD.
-  - Add more unit tests to session/phone.
-  - Add session/phone/mediarecorder.cc.
-  - Fixed httpportallocator tests.
-
-0.6.5 - Dec 8, 2011
-  - Add IPv6 support in SocketAddress.
-  - Change PeerConnectionFactory inteface.
-  - Bug fixes.
-
-0.6.4 - Nov 30, 2011
-  - Branch app/webrtc to app/webrtcv1.
-  - Add more base unit tests.
-  - Add xmllite unit tests.
-  - Refactoring and bug fixes
-
-0.6.3 - Oct 26, 2011
-  - Add media unit tests
-  - Improve OpenSSL support
-  - Add SSL unit tests
-  - Add DTLS support to SslStreamAdapter
-  - Add initial support for media processors
-  - Updated WebRTC voice and video engines
-
-0.6.2 - Oct 7, 2011
-  - Increase the video rtp buffer.
-  - Disable sound system for chromium build.
-  - Add basictype.h for NULL.
-  - Use the ref counted webrtc ADM/VCM.
-  - Add codereview.settings to use the webrtc codereview system.
-  - Add MediaSessionDescriptionFactory.
-
-0.6.1 - Sep 15, 2011
-  - Add dummydevicemanager.
-  - Remove underscores from the files names for app/webrtc folder.
-  - Remove PeerConnection OnLocalStreamInitialized callback.
-  - Fix webrtcjson.cc numeric locale formatting issue.
-  - Don't start playout until the local content has been set.
-
-0.6.0 - Sep 13, 2011
-  - Add pub sub support
-  - Add unit tests
-
-0.5.9 - Aug 31, 2011
-  - Add app/webrtc
-  - Add webrtcvoiceengine/webrtcvideoengine
-  - Add some unit tests
-  - Add XMPP MUC room config classes
-  - Update STUN support some more (RFC 5389)
-  - Add video output scaling
-  - Refactoring and bug fixes
-
-0.5.8 - July 1, 2011
-  - Support for loudest speaker detection
-
-0.5.7 - Jun 23, 2011
-  - Support for setting MUC display name
-  - Update STUN support to RFC5389
-  - Handle description-info message
-  - New call flag: --debugsrtp
-
-0.5.6 - Jun 2, 2011
-  - Improved mac socket server
-  - Add IqTask
-  - Flush output in examples/call
-  - Bug fixes
-
-0.5.5 - May 26, 2011
-  - Refactor async sockets
-  - Improve MUC joining
-  - Add OSX video renderer
-  - Bug fixes
-
-0.5.4 - May 13, 2011
-  - Support for MUC lookup by name
-  - Bug fixes
-
-0.5.3 - May 10, 2011
-  - Stream notification and selection.
-  - Better XEP-0045 support.
-  - Easier to create composite media engines where one part is fake.
-  - Make GtkVideoRenderer thread-safe.
-
-0.5.2 - Jan 11, 2010
-  - Fixed build on Windows 7 with VS 2010
-  - Fixed build on Windows x64
-  - Fixed build on Mac OSX
-  - Added option to examples/call to enable encryption
-  - Improved logging
-  - Bug fixes
-
-0.5.1 - Nov 2, 2010
-  - Added support for call encryption.
-  - Added addtional XEP-166 and XEP-167 features:
-    - Call redirection
-    - Candidates in session-accept or session-initiate
-  - Added support for bandwidth control.
-  - Added features in examples/call:
-    - bandwidth control on initiate or accept
-    - turn on/off SSL
-    - control signaling protocol
-    - send chat message
-
-0.5.0 - Sep 16, 2010
-  - Implemented Jingle protocols XEP-166 and XEP-167.
-  - Backward compatible with Google Talk Call Signaling protocol implemented
-    in previous versions.
-  - Builds on Windows, Linux, and Mac OS X with swtoolkit.
-  - Removed GipsLiteMediaEngine.
-  - Added video support.
-  - Added FileMediaEngine to support both voice and video via RTP dump.
-  - Many bug fixes.
-
-0.4.0 - Feb 01, 2007
-  - Updated protocol.
-  - Added relay server support.
-  - Added proxy detection support.
-  - Many other assorted changes.
-
-0.3.0 - Mar 16 2006
-  - New GipsLiteMediaEngine included to make calls using the GIPS
-    VoiceEngine Lite media componentry on Windows.
-
-0.2.0 - Jan 27 2006
-  - Windows build fixes with Visual Studio Express project files.
-  - Pseudo-TCP support provides TCP-like reliability over a P2PSocket
-  - TunnelSessionClient establishes sessions for reliably sending data
-    using Pseudo-TCP.
-  - A new pcp example application transfers files from one user to
-    another using TunnelSessionClient.
-  - TLS login support for both example applications.
-
-0.1.0 - Dec 15 2005
-  - Initial release.
diff --git a/third_party/libjingle/source/COPYING b/third_party/libjingle/source/COPYING
deleted file mode 100644
index d11f105..0000000
--- a/third_party/libjingle/source/COPYING
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2004--2005, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * The name of the author may not be used to endorse or promote products
-      derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY 
-WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
-SUCH DAMAGE.
\ No newline at end of file
diff --git a/third_party/libjingle/source/README b/third_party/libjingle/source/README
deleted file mode 100644
index 638d002..0000000
--- a/third_party/libjingle/source/README
+++ /dev/null
@@ -1,163 +0,0 @@
-Libjingle
-
-1. Introduction
-
-Libjingle is a set of components provided by Google to implement Jingle
-protocols XEP-166 (http://xmpp.org/extensions/xep-0166.html) and XEP-167
-(http://xmpp.org/extensions/xep-0167.html). Libjingle is also backward
-compatible with Google Talk Call Signaling
-(http://code.google.com/apis/talk/call_signaling.html). This package will
-create several static libraries you may link to your projects as needed.
-
--talk               - No source files in talk/, just these subdirectories
-|-base              - Contains basic low-level portable utility functions for
-|                     things like threads and sockets
-|-p2p               - The P2P stack
-  |-base            - Base p2p functionality
-  |-client          - Hooks to tie it into XMPP
-|-session           - Signaling
-  |-phone           - Signaling code specific to making phone calls
-    |-testdata      - Samples of RTP voice and video dump
-  |-tunnel          - Tunnel session and channel
-|-third_party       - Folder for third party libraries
-  |-libudev         - Folder containing libudev.h
-|-xmllite           - XML parser
-|-xmpp              - XMPP engine
-
-In addition, this package contains two examples in talk/examples which
-illustrate the basic concepts of how the provided classes work.
-
-2. How to Build
-
-2.1 Prerequisites
-
-Libjingle is built with swtoolkit (http://code.google.com/p/swtoolkit/), which
-is a set of extensions to the open-source SCons build tool (www.scons.org).
-
-  * First, install Python 2.4 or later from http://www.python.org/.
-    Please note that since swtoolkit only works with Python 2.x, you will
-    not be able to use Python 3.x.
-
-    python --version to confirm that python is in your path, and 2.4 or greater.
-
-  * Second, install the stand alone scons-local zip package 2.0.0 or later from
-    http://www.scons.org/download.php and set an environment variable,
-    SCONS_DIR, to point to the directory containing SCons.
-    For example, on Windows, download
-    http://sourceforge.net/projects/scons/files/scons-src/2.0.1/scons-local-2.0.1.zip
-    Unzip to C:\src\libjingle\scons-local\
-    set SCONS_DIR=C:\src\libjingle\scons-local\scons-local-2.0.1
-
-  * Third, install swtoolkit from http://code.google.com/p/swtoolkit/.
-    For example, on Windows download
-    http://code.google.com/p/swtoolkit/downloads/detail?name=swtoolkit.0.9.1.zip
-    Unzip to C:\src
-    Optionally add swtoolkit to path.  Otherwise call hammer.bat directly.
-    set PATH_TO_SWTOOLKIT=c:\src\swtoolkit
-    set PATH=%PATH_TO_SWTOOLKIT%;%PATH%
-
-  * Finally, download and install the unit test framework from
-    http://code.google.com/p/googletest/downloads/list
-    To install it, just unzip the package and put the file folder under
-    /talk/third_party/ directory and rename it from "gtest-x.x.x" to "gtest",
-    so that your folder structure looks like:
-    /talk/third_party/gtest/...
-
-2.2 libjingle
-
-Libjingle needs to be downloaded and patched
-
-  * First, install Libjingle.  Since this README lives within Libjingle,
-    this step is normally already done.
-    Libjingle home page is here http://code.google.com/p/libjingle/
-    For example, on Windows, download
-    http://libjingle.googlecode.com/files/libjingle-0.5.2.zip
-    unzip to C:\src\
-
-  * Second, Libjingle depends on two open-source projects, expat and srtp.
-    Download expat from http://sourceforge.net/projects/expat/ to
-    talk/third_party/expat-2.0.1/. Download srtp at
-    http://libjingle.googlecode.com/files/srtp-cvs.zip to
-    talk/third_party/srtp. Note that srtp-1.4.4 does not work since it misses
-    the extensions used by Libjingle.
-    If you put expat or srtp in a different directory, you need to edit
-    talk/libjingle.scons correspondingly.
-    rename srtp-cvs to srtp
-    For example, on Windows, download expat
-    http://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz
-    Unzip to C:\src\libjingle-0.5.2\talk\third_party
-    Download srtp
-    http://libjingle.googlecode.com/files/srtp-cvs.zip
-    Unzip to C:\src\libjingle-0.5.2\talk\third_party
-    rename C:\src\libjingle-0.5.2\talk\third_party\srtp-cvs srtp
-
-  * Third, on Windows, copy config.h
-    copy talk\third_party\srtp\config.hw talk\third_party\srtp\crypto\include\config.h
-
-2.2 Build Libjingle under Linux or OS X
-  * On Linux, you need to install libssl-dev, libasound2-dev and gtk+2.0.
-  * Some optional new features in OpenSSL are only available in OpenSSL v1.0
-    and above. To build with new OpenSSL features, you need to add the
-    "HAS_OPENSSL_1_0" to the cppdefine under the
-    "talk.Library(env, name = jingle..." section in the "libjingle.scons" file.
-    Then download the OpenSSL v1.0 from the following URL:
-    http://www.openssl.org/source/openssl-1.0.0e.tar.gz
-    Unzip the downloaded package to the "third_party/openssl", such that it creates
-    the directory "third_party/openssl/include/", etc.
-  * To build Libjingle, first make sure the SCONS_DIR environment variable
-    is set correctly.
-  * Second, run talk/third_party/expat-2.0.1/configure and
-    talk/third_party/srtp/configure.
-  * Third, go to the talk/ directory and run $path_to_swtoolkit/hammer.sh. Run
-    $path_to_swtoolkit/hammer.sh --help for information on how to build for
-    different modes.
-
-2.3 Build Libjingle under Windows
-  * First, make sure the SCONS_DIR environment variable is set correctly and
-    Microsoft Visual Studio is installed.
-    dir %SCONS_DIR%
-    Should show a folder containing Scons\
-  * Second, go to the talk\ directory and run %PATH_TO_SWTOOLKIT%\hammer.bat.
-    To get help run:
-    %PATH_TO_SWTOOLKIT%\hammer.bat --help
-    different modes. You can run the last step under Visual Studio Command
-    Prompt if Visual Studio tools are not under the path environment variable.
-    Example to build call.exe
-    %PATH_TO_SWTOOLKIT%\hammer.bat
-    Example to build opt and dbg all programs
-    %PATH_TO_SWTOOLKIT%\hammer.bat --jobs=6 --verbose --mode=all all_programs
-
-
-The built binaries are under talk/build/dbg/staging or talk/build/opt/staging,
-depending on the build mode. When the build is complete, you can run the
-examples, login or call. For the call sample, you can specify the input and
-output RTP dump for voice and video. This package provides two samples of input
-RTP dump: voice.rtpdump is a single channel, 16Khz voice encoded with G722, and
-video.rtpdump is 320x240 video encoded with H264 AVC at 30 frames per second.
-These provided samples will inter-operate with Google Talk Video. If you use
-other input RTP dump, you may need to change the codecs in call_main.cc, lines
-215 - 222.
-
-Libjingle also builds two server tools, a relay server and a STUN server. The
-relay server may be used to relay traffic when a direct peer-to-peer connection
-could not be established. The STUN Server implements the STUN protocol for
-Simple Traversal of UDP over NAT. See the Libjingle Developer Guide at
-http://code.google.com/apis/talk/index.html for information about configuring a
-client to use this relay server and this STUN server.
-
-To use LinphoneMediaEngine, you need to perform the following additional steps:
-  * Download and install the "MediaStreamer" library on your
-    machine.
-  * Add the following lines into the libjingle.scons file.
-    In the "talk.Library(env, name = "libjingle",..." section, you need to add:
-      "HAVE_LINPHONE",
-      "HAVE_SPEEX",
-      "HAVE_ILBC",
-    to the "cppdefines = [".
-
-    In the "talk.App(env, name = "call",..." section, you need to add:
-      "mediastreamer",
-    to the "libs = [".
-  * In the libjingle.scons file, add the following line into the "srcs = [ ..."
-    section of the "libjingle" Library.
-      "session/phone/linphonemediaengine.cc",
diff --git a/third_party/libjingle/source/codereview.settings b/third_party/libjingle/source/codereview.settings
deleted file mode 100644
index b70057e..0000000
--- a/third_party/libjingle/source/codereview.settings
+++ /dev/null
@@ -1,9 +0,0 @@
-# This file is used by gcl to get repository specific information.

-CODE_REVIEW_SERVER: webrtc-codereview.appspot.com

-#CC_LIST:

-#VIEW_VC:

-#STATUS: 

-TRY_ON_UPLOAD: False

-#TRYSERVER_SVN_URL: 

-#GITCL_PREUPLOAD: 

-#GITCL_PREDCOMMIT: 

diff --git a/third_party/libjingle/source/talk/app/webrtc/peerconnection.h b/third_party/libjingle/source/talk/app/webrtc/peerconnection.h
deleted file mode 100644
index c28508f..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/peerconnection.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_PEERCONNECTION_H_
-#define TALK_APP_WEBRTC_PEERCONNECTION_H_
-
-// TODO - Add a factory class or some kind of PeerConnection manager
-// to support multiple PeerConnection object instantiation. This class will
-// create ChannelManager object and pass it to PeerConnection object. Otherwise
-// each PeerConnection object will have its own ChannelManager hence MediaEngine
-// and VoiceEngine/VideoEngine.
-
-#include <string>
-
-namespace cricket {
-class VideoRenderer;
-}
-
-namespace talk_base {
-class Thread;
-}
-
-namespace webrtc {
-
-class PeerConnectionObserver {
- public:
-  // serialized signaling message
-  virtual void OnSignalingMessage(const std::string& msg) = 0;
-
-  // Triggered when a remote peer accepts a media connection.
-  virtual void OnAddStream(const std::string& stream_id, bool video) = 0;
-
-  // Triggered when a remote peer closes a media stream.
-  virtual void OnRemoveStream(const std::string& stream_id, bool video) = 0;
-
- protected:
-  // Dtor protected as objects shouldn't be deleted via this interface.
-  virtual ~PeerConnectionObserver() {}
-};
-
-class PeerConnection {
- public:
-  enum ReadyState {
-    NEW = 0,
-    NEGOTIATING,
-    ACTIVE,
-    CLOSED,
-  };
-
-  virtual ~PeerConnection() {}
-
-  // Register a listener
-  virtual void RegisterObserver(PeerConnectionObserver* observer) = 0;
-
-  // SignalingMessage in json format
-  virtual bool SignalingMessage(const std::string& msg) = 0;
-
-  // Asynchronously adds a local stream device to the peer
-  // connection.
-  virtual bool AddStream(const std::string& stream_id, bool video) = 0;
-
-  // Asynchronously removes a local stream device from the peer
-  // connection. The operation is complete when
-  // PeerConnectionObserver::OnRemoveStream is called.
-  virtual bool RemoveStream(const std::string& stream_id) = 0;
-
-  // Info the peerconnection that it is time to return the signaling
-  // information. The operation is complete when
-  // PeerConnectionObserver::OnSignalingMessage is called.
-  virtual bool Connect() = 0;
-
-  // Remove all the streams and tear down the session.
-  // After the Close() is called, the OnSignalingMessage will be invoked
-  // asynchronously. And before OnSignalingMessage is called,
-  // OnRemoveStream will be called for each stream that was active.
-  // TODO: Add an event such as onclose, or onreadystatechanged
-  // when the readystate reaches the closed state (no more streams in the
-  // peerconnection object.
-  virtual bool Close() = 0;
-
-  // Set the audio input & output devices based on the given device name.
-  // An empty device name means to use the default audio device.
-  virtual bool SetAudioDevice(const std::string& wave_in_device,
-                              const std::string& wave_out_device,
-                              int opts) = 0;
-
-  // Set the video renderer for the camera preview.
-  virtual bool SetLocalVideoRenderer(cricket::VideoRenderer* renderer) = 0;
-
-  // Set the video renderer for the specified stream.
-  virtual bool SetVideoRenderer(const std::string& stream_id,
-                                cricket::VideoRenderer* renderer) = 0;
-
-  // Set video capture device
-  // For Chromium the cam_device should use the capture session id.
-  // For standalone app, cam_device is the camera name. It will try to
-  // set the default capture device when cam_device is "".
-  virtual bool SetVideoCapture(const std::string& cam_device) = 0;
-
-  // Returns the state of the PeerConnection object.  See the ReadyState
-  // enum for valid values.
-  virtual ReadyState GetReadyState() = 0;
-};
-
-}  // namespace webrtc
-
-#endif  // TALK_APP_WEBRTC_PEERCONNECTION_H_
diff --git a/third_party/libjingle/source/talk/app/webrtc/peerconnectionfactory.cc b/third_party/libjingle/source/talk/app/webrtc/peerconnectionfactory.cc
deleted file mode 100644
index a3dac39..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/peerconnectionfactory.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/app/webrtc/peerconnectionfactory.h"
-
-#include "talk/app/webrtc/peerconnectionproxy.h"
-#include "talk/base/logging.h"
-#include "talk/p2p/client/basicportallocator.h"
-#include "talk/session/phone/channelmanager.h"
-
-namespace webrtc {
-
-PeerConnectionFactory::PeerConnectionFactory(
-    cricket::MediaEngineInterface* media_engine,
-    cricket::DeviceManagerInterface* device_manager,
-    talk_base::Thread* worker_thread)
-    : initialized_(false),
-      channel_manager_(new cricket::ChannelManager(media_engine,
-                                                   device_manager,
-                                                   worker_thread)) {
-}
-
-PeerConnectionFactory::PeerConnectionFactory(
-    talk_base::Thread* worker_thread)
-    : initialized_(false),
-      channel_manager_(new cricket::ChannelManager(worker_thread)) {
-}
-
-PeerConnectionFactory::~PeerConnectionFactory() {
-}
-
-bool PeerConnectionFactory::Initialize() {
-  ASSERT(channel_manager_.get() != NULL);
-  initialized_ = channel_manager_->Init();
-  return initialized_;
-}
-
-PeerConnection* PeerConnectionFactory::CreatePeerConnection(
-    cricket::PortAllocator* port_allocator,
-    talk_base::Thread* signaling_thread) {
-  PeerConnectionProxy* pc = NULL;
-  if (initialized_) {
-    pc =  new PeerConnectionProxy(
-        port_allocator, channel_manager_.get(), signaling_thread);
-    if (!pc->Init()) {
-      LOG(LERROR) << "Error in initializing PeerConnection";
-      delete pc;
-      pc = NULL;
-    }
-  } else {
-    LOG(LERROR) << "PeerConnectionFactory is not initialize";
-  }
-  return pc;
-}
-
-}  // namespace webrtc
diff --git a/third_party/libjingle/source/talk/app/webrtc/peerconnectionfactory.h b/third_party/libjingle/source/talk/app/webrtc/peerconnectionfactory.h
deleted file mode 100644
index ea509d6..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/peerconnectionfactory.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_
-#define TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_
-
-#include <string>
-#include <vector>
-
-#include "talk/base/scoped_ptr.h"
-
-namespace cricket {
-class ChannelManager;
-class DeviceManagerInterface;
-class MediaEngineInterface;
-class PortAllocator;
-}  // namespace cricket
-
-namespace talk_base {
-class SocketAddress;
-class Thread;
-}  // namespace talk_base
-
-namespace webrtc {
-
-class PeerConnection;
-
-class PeerConnectionFactory {
- public:
-  PeerConnectionFactory(cricket::MediaEngineInterface* media_engine,
-                        cricket::DeviceManagerInterface* device_manager,
-                        talk_base::Thread* worker_thread);
-  PeerConnectionFactory(talk_base::Thread* worker_thread);
-
-  virtual ~PeerConnectionFactory();
-  bool Initialize();
-
-  PeerConnection* CreatePeerConnection(
-      cricket::PortAllocator* port_allocator,
-      talk_base::Thread* signaling_thread);
-
- private:
-  bool initialized_;
-  talk_base::scoped_ptr<cricket::ChannelManager> channel_manager_;
-};
-
-}  // namespace webrtc
-
-#endif  // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_
-
diff --git a/third_party/libjingle/source/talk/app/webrtc/peerconnectionimpl.cc b/third_party/libjingle/source/talk/app/webrtc/peerconnectionimpl.cc
deleted file mode 100644
index 28e4685..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/peerconnectionimpl.cc
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/app/webrtc/peerconnectionimpl.h"
-
-#include "talk/app/webrtc/webrtcjson.h"
-#include "talk/app/webrtc/webrtcsession.h"
-#include "talk/base/basicpacketsocketfactory.h"
-#include "talk/base/helpers.h"
-#include "talk/base/logging.h"
-#include "talk/base/stringencode.h"
-#include "talk/p2p/base/session.h"
-#include "talk/p2p/client/basicportallocator.h"
-
-namespace webrtc {
-
-
-PeerConnectionImpl::PeerConnectionImpl(
-    cricket::PortAllocator* port_allocator,
-    cricket::ChannelManager* channel_manager,
-    talk_base::Thread* signaling_thread)
-  : port_allocator_(port_allocator),
-    channel_manager_(channel_manager),
-    signaling_thread_(signaling_thread),
-    event_callback_(NULL),
-    session_(NULL) {
-}
-
-PeerConnectionImpl::~PeerConnectionImpl() {
-}
-
-bool PeerConnectionImpl::Init() {
-  std::string sid;
-  talk_base::CreateRandomString(8, &sid);
-  const bool incoming = false;
-  // default outgoing direction
-  session_.reset(CreateMediaSession(sid, incoming));
-  if (session_.get() == NULL) {
-    ASSERT(false && "failed to initialize a session");
-    return false;
-  }
-  return true;
-}
-
-void PeerConnectionImpl::RegisterObserver(PeerConnectionObserver* observer) {
-  // This assert is to catch cases where two observer pointers are registered.
-  // We only support one and if another is to be used, the current one must be
-  // cleared first.
-  ASSERT(observer == NULL || event_callback_ == NULL);
-  event_callback_ = observer;
-}
-
-bool PeerConnectionImpl::SignalingMessage(
-    const std::string& signaling_message) {
-  // Deserialize signaling message
-  cricket::SessionDescription* incoming_sdp = NULL;
-  std::vector<cricket::Candidate> candidates;
-  if (!ParseJsonSignalingMessage(signaling_message,
-                                 &incoming_sdp, &candidates)) {
-    return false;
-  }
-
-  bool ret = false;
-  if (GetReadyState() == NEW) {
-    // set direction to incoming, as message received first
-    session_->set_incoming(true);
-    ret = session_->OnInitiateMessage(incoming_sdp, candidates);
-  } else {
-    ret = session_->OnRemoteDescription(incoming_sdp, candidates);
-  }
-  return ret;
-}
-
-WebRtcSession* PeerConnectionImpl::CreateMediaSession(
-    const std::string& id, bool incoming) {
-  ASSERT(port_allocator_ != NULL);
-  WebRtcSession* session = new WebRtcSession(id, incoming,
-      port_allocator_, channel_manager_, signaling_thread_);
-
-  if (session->Initiate()) {
-    session->SignalAddStream.connect(
-        this,
-        &PeerConnectionImpl::OnAddStream);
-    session->SignalRemoveStream.connect(
-        this,
-        &PeerConnectionImpl::OnRemoveStream);
-    session->SignalLocalDescription.connect(
-        this,
-        &PeerConnectionImpl::OnLocalDescription);
-    session->SignalFailedCall.connect(
-        this,
-        &PeerConnectionImpl::OnFailedCall);
-  } else {
-    delete session;
-    session = NULL;
-  }
-  return session;
-}
-
-bool PeerConnectionImpl::AddStream(const std::string& stream_id, bool video) {
-  bool ret = false;
-  if (session_->HasStream(stream_id)) {
-    ASSERT(false && "A stream with this name already exists");
-  } else {
-    if (!video) {
-      ret = !session_->HasAudioChannel() &&
-            session_->CreateVoiceChannel(stream_id);
-    } else {
-      ret = !session_->HasVideoChannel() &&
-            session_->CreateVideoChannel(stream_id);
-    }
-  }
-  return ret;
-}
-
-bool PeerConnectionImpl::RemoveStream(const std::string& stream_id) {
-  return session_->RemoveStream(stream_id);
-}
-
-void PeerConnectionImpl::OnLocalDescription(
-    const cricket::SessionDescription* desc,
-    const std::vector<cricket::Candidate>& candidates) {
-  if (!desc) {
-    LOG(WARNING) << "no local SDP ";
-    return;
-  }
-
-  std::string message;
-  if (GetJsonSignalingMessage(desc, candidates, &message)) {
-    if (event_callback_) {
-      event_callback_->OnSignalingMessage(message);
-    }
-  }
-}
-
-void PeerConnectionImpl::OnFailedCall() {
-  // TODO: implement.
-}
-
-bool PeerConnectionImpl::SetAudioDevice(const std::string& wave_in_device,
-                                        const std::string& wave_out_device,
-                                        int opts) {
-  return channel_manager_->SetAudioOptions(wave_in_device,
-                                           wave_out_device,
-                                           opts);
-}
-
-bool PeerConnectionImpl::SetLocalVideoRenderer(
-    cricket::VideoRenderer* renderer) {
-  return channel_manager_->SetLocalRenderer(renderer);
-}
-
-bool PeerConnectionImpl::SetVideoRenderer(const std::string& stream_id,
-                                          cricket::VideoRenderer* renderer) {
-  return session_->SetVideoRenderer(stream_id, renderer);
-}
-
-bool PeerConnectionImpl::SetVideoCapture(const std::string& cam_device) {
-  return channel_manager_->SetVideoOptions(cam_device);
-}
-
-bool PeerConnectionImpl::Connect() {
-  return session_->Connect();
-}
-
-// TODO - Close is not used anymore, should be removed.
-bool PeerConnectionImpl::Close() {
-  session_->RemoveAllStreams();
-  return true;
-}
-
-void PeerConnectionImpl::OnAddStream(const std::string& stream_id,
-                                     bool video) {
-  if (event_callback_) {
-    event_callback_->OnAddStream(stream_id, video);
-  }
-}
-
-void PeerConnectionImpl::OnRemoveStream(const std::string& stream_id,
-                                        bool video) {
-  if (event_callback_) {
-    event_callback_->OnRemoveStream(stream_id, video);
-  }
-}
-
-PeerConnectionImpl::ReadyState PeerConnectionImpl::GetReadyState() {
-  ReadyState ready_state;
-  cricket::BaseSession::State state = session_->state();
-  if (state == cricket::BaseSession::STATE_INIT) {
-    ready_state = NEW;
-  } else if (state == cricket::BaseSession::STATE_INPROGRESS) {
-    ready_state = ACTIVE;
-  } else if (state == cricket::BaseSession::STATE_DEINIT) {
-    ready_state = CLOSED;
-  } else {
-    ready_state = NEGOTIATING;
-  }
-  return ready_state;
-}
-
-}  // namespace webrtc
diff --git a/third_party/libjingle/source/talk/app/webrtc/peerconnectionimpl.h b/third_party/libjingle/source/talk/app/webrtc/peerconnectionimpl.h
deleted file mode 100644
index 6ff2f25..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/peerconnectionimpl.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_PEERCONNECTIONIMPL_H_
-#define TALK_APP_WEBRTC_PEERCONNECTIONIMPL_H_
-
-#include <string>
-#include <vector>
-
-#include "talk/app/webrtc/peerconnection.h"
-#include "talk/base/sigslot.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/thread.h"
-#include "talk/session/phone/channelmanager.h"
-
-namespace cricket {
-class ChannelManager;
-class PortAllocator;
-class SessionDescription;
-}
-
-namespace webrtc {
-class WebRtcSession;
-
-class PeerConnectionImpl : public PeerConnection,
-                           public sigslot::has_slots<> {
- public:
-  PeerConnectionImpl(cricket::PortAllocator* port_allocator,
-                     cricket::ChannelManager* channel_manager,
-                     talk_base::Thread* signaling_thread);
-  virtual ~PeerConnectionImpl();
-
-  // PeerConnection interfaces
-  virtual void RegisterObserver(PeerConnectionObserver* observer);
-  virtual bool SignalingMessage(const std::string& msg);
-  virtual bool AddStream(const std::string& stream_id, bool video);
-  virtual bool RemoveStream(const std::string& stream_id);
-  virtual bool Connect();
-  virtual bool Close();
-  virtual bool SetAudioDevice(const std::string& wave_in_device,
-                              const std::string& wave_out_device, int opts);
-  virtual bool SetLocalVideoRenderer(cricket::VideoRenderer* renderer);
-  virtual bool SetVideoRenderer(const std::string& stream_id,
-                                cricket::VideoRenderer* renderer);
-  virtual bool SetVideoCapture(const std::string& cam_device);
-  virtual ReadyState GetReadyState();
-
-  cricket::ChannelManager* channel_manager() {
-    return channel_manager_;
-  }
-
-  // Callbacks from PeerConnectionImplCallbacks
-  void OnAddStream(const std::string& stream_id, bool video);
-  void OnRemoveStream(const std::string& stream_id, bool video);
-  void OnLocalDescription(
-      const cricket::SessionDescription* desc,
-      const std::vector<cricket::Candidate>& candidates);
-  void OnFailedCall();
-  bool Init();
-
- private:
-  WebRtcSession* CreateMediaSession(const std::string& id, bool incoming);
-
-  cricket::PortAllocator* port_allocator_;
-  cricket::ChannelManager* channel_manager_;
-  talk_base::Thread* signaling_thread_;
-  PeerConnectionObserver* event_callback_;
-  talk_base::scoped_ptr<WebRtcSession> session_;
-};
-
-}  // namespace webrtc
-
-#endif  // TALK_APP_WEBRTC_PEERCONNECTIONIMPL_H_
diff --git a/third_party/libjingle/source/talk/app/webrtc/peerconnectionproxy.cc b/third_party/libjingle/source/talk/app/webrtc/peerconnectionproxy.cc
deleted file mode 100644
index fca3ad4..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/peerconnectionproxy.cc
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/app/webrtc/peerconnectionproxy.h"
-
-#include "talk/app/webrtc/peerconnectionimpl.h"
-#include "talk/base/logging.h"
-
-namespace webrtc {
-
-enum {
-  MSG_WEBRTC_ADDSTREAM = 1,
-  MSG_WEBRTC_CLOSE,
-  MSG_WEBRTC_CONNECT,
-  MSG_WEBRTC_INIT,
-  MSG_WEBRTC_REGISTEROBSERVER,
-  MSG_WEBRTC_RELEASE,
-  MSG_WEBRTC_REMOVESTREAM,
-  MSG_WEBRTC_SETAUDIODEVICE,
-  MSG_WEBRTC_SETLOCALRENDERER,
-  MSG_WEBRTC_SETVIDEOCAPTURE,
-  MSG_WEBRTC_SETVIDEORENDERER,
-  MSG_WEBRTC_SIGNALINGMESSAGE,
-  MSG_WEBRTC_GETREADYSTATE,
-};
-
-struct AddStreamParams : public talk_base::MessageData {
-  AddStreamParams(const std::string& stream_id, bool video)
-      : stream_id(stream_id),
-        video(video),
-        result(false) {}
-
-  std::string stream_id;
-  bool video;
-  bool result;
-};
-
-struct RemoveStreamParams : public talk_base::MessageData {
-  explicit RemoveStreamParams(const std::string& stream_id)
-      : stream_id(stream_id),
-        result(false) {}
-
-  std::string stream_id;
-  bool result;
-};
-
-struct SignalingMsgParams : public talk_base::MessageData {
-  explicit SignalingMsgParams(const std::string& signaling_message)
-      : signaling_message(signaling_message),
-        result(false) {}
-
-  std::string signaling_message;
-  bool result;
-};
-
-struct SetAudioDeviceParams : public talk_base::MessageData {
-  SetAudioDeviceParams(const std::string& wave_in_device,
-                       const std::string& wave_out_device,
-                       int opts)
-      : wave_in_device(wave_in_device), wave_out_device(wave_out_device),
-        opts(opts), result(false) {}
-
-  std::string wave_in_device;
-  std::string wave_out_device;
-  int opts;
-  bool result;
-};
-
-struct SetLocalRendererParams : public talk_base::MessageData {
-  explicit SetLocalRendererParams(cricket::VideoRenderer* renderer)
-      : renderer(renderer), result(false) {}
-
-  cricket::VideoRenderer* renderer;
-  bool result;
-};
-
-struct SetVideoRendererParams : public talk_base::MessageData {
-  SetVideoRendererParams(const std::string& stream_id,
-                         cricket::VideoRenderer* renderer)
-      : stream_id(stream_id), renderer(renderer), result(false) {}
-
-  std::string stream_id;
-  cricket::VideoRenderer* renderer;
-  bool result;
-};
-
-struct SetVideoCaptureParams : public talk_base::MessageData {
-  explicit SetVideoCaptureParams(const std::string& cam_device)
-      : cam_device(cam_device), result(false) {}
-
-  std::string cam_device;
-  bool result;
-};
-
-struct RegisterObserverParams : public talk_base::MessageData {
-  explicit RegisterObserverParams(PeerConnectionObserver* observer)
-      : observer(observer), result(false) {}
-
-  PeerConnectionObserver* observer;
-  bool result;
-};
-
-struct ResultParams : public talk_base::MessageData {
-  ResultParams()
-      : result(false) {}
-
-  bool result;
-};
-
-PeerConnectionProxy::PeerConnectionProxy(
-    cricket::PortAllocator* port_allocator,
-    cricket::ChannelManager* channel_manager,
-      talk_base::Thread* signaling_thread)
-  : peerconnection_impl_(new PeerConnectionImpl(port_allocator,
-                             channel_manager, signaling_thread)),
-    signaling_thread_(signaling_thread) {
-}
-
-PeerConnectionProxy::~PeerConnectionProxy() {
-  ResultParams params;
-  Send(MSG_WEBRTC_RELEASE, &params);
-}
-
-bool PeerConnectionProxy::Init() {
-  ResultParams params;
-  return (Send(MSG_WEBRTC_INIT, &params) && params.result);
-}
-
-void PeerConnectionProxy::RegisterObserver(PeerConnectionObserver* observer) {
-  RegisterObserverParams params(observer);
-  Send(MSG_WEBRTC_REGISTEROBSERVER, &params);
-}
-
-bool PeerConnectionProxy::SignalingMessage(
-    const std::string& signaling_message) {
-  SignalingMsgParams params(signaling_message);
-  return (Send(MSG_WEBRTC_SIGNALINGMESSAGE, &params) && params.result);
-}
-
-bool PeerConnectionProxy::AddStream(const std::string& stream_id, bool video) {
-  AddStreamParams params(stream_id, video);
-  return (Send(MSG_WEBRTC_ADDSTREAM, &params) && params.result);
-}
-
-bool PeerConnectionProxy::RemoveStream(const std::string& stream_id) {
-  RemoveStreamParams params(stream_id);
-  return (Send(MSG_WEBRTC_REMOVESTREAM, &params) && params.result);
-}
-
-bool PeerConnectionProxy::SetAudioDevice(const std::string& wave_in_device,
-                                         const std::string& wave_out_device,
-                                         int opts) {
-  SetAudioDeviceParams params(wave_in_device, wave_out_device, opts);
-  return (Send(MSG_WEBRTC_SETAUDIODEVICE, &params) && params.result);
-}
-
-bool PeerConnectionProxy::SetLocalVideoRenderer(
-    cricket::VideoRenderer* renderer) {
-  SetLocalRendererParams params(renderer);
-  return (Send(MSG_WEBRTC_SETLOCALRENDERER, &params) && params.result);
-}
-
-bool PeerConnectionProxy::SetVideoRenderer(const std::string& stream_id,
-                                          cricket::VideoRenderer* renderer) {
-  SetVideoRendererParams params(stream_id, renderer);
-  return (Send(MSG_WEBRTC_SETVIDEORENDERER, &params) && params.result);
-}
-
-bool PeerConnectionProxy::SetVideoCapture(const std::string& cam_device) {
-  SetVideoCaptureParams params(cam_device);
-  return (Send(MSG_WEBRTC_SETVIDEOCAPTURE, &params) && params.result);
-}
-
-PeerConnection::ReadyState PeerConnectionProxy::GetReadyState() {
-  PeerConnection::ReadyState ready_state = NEW;
-  Send(MSG_WEBRTC_GETREADYSTATE,
-       reinterpret_cast<talk_base::MessageData*>(&ready_state));
-  return ready_state;
-}
-
-bool PeerConnectionProxy::Connect() {
-  ResultParams params;
-  return (Send(MSG_WEBRTC_CONNECT, &params) && params.result);
-}
-
-bool PeerConnectionProxy::Close() {
-  ResultParams params;
-  return (Send(MSG_WEBRTC_CLOSE, &params) && params.result);
-}
-
-bool PeerConnectionProxy::Send(uint32 id, talk_base::MessageData* data) {
-  if (!signaling_thread_)
-    return false;
-  signaling_thread_->Send(this, id, data);
-  return true;
-}
-
-void PeerConnectionProxy::OnMessage(talk_base::Message* message) {
-  talk_base::MessageData* data = message->pdata;
-  switch (message->message_id) {
-    case MSG_WEBRTC_ADDSTREAM: {
-      AddStreamParams* params = reinterpret_cast<AddStreamParams*>(data);
-      params->result = peerconnection_impl_->AddStream(
-          params->stream_id, params->video);
-      break;
-    }
-    case MSG_WEBRTC_SIGNALINGMESSAGE: {
-      SignalingMsgParams* params =
-          reinterpret_cast<SignalingMsgParams*>(data);
-      params->result = peerconnection_impl_->SignalingMessage(
-          params->signaling_message);
-      break;
-    }
-    case MSG_WEBRTC_REMOVESTREAM: {
-      RemoveStreamParams* params = reinterpret_cast<RemoveStreamParams*>(data);
-      params->result = peerconnection_impl_->RemoveStream(
-          params->stream_id);
-      break;
-    }
-    case MSG_WEBRTC_SETAUDIODEVICE: {
-      SetAudioDeviceParams* params =
-          reinterpret_cast<SetAudioDeviceParams*>(data);
-      params->result = peerconnection_impl_->SetAudioDevice(
-          params->wave_in_device, params->wave_out_device, params->opts);
-      break;
-    }
-    case MSG_WEBRTC_SETLOCALRENDERER: {
-      SetLocalRendererParams* params =
-          reinterpret_cast<SetLocalRendererParams*>(data);
-      params->result = peerconnection_impl_->SetLocalVideoRenderer(
-          params->renderer);
-      break;
-    }
-    case MSG_WEBRTC_SETVIDEOCAPTURE: {
-      SetVideoCaptureParams* params =
-          reinterpret_cast<SetVideoCaptureParams*>(data);
-      params->result = peerconnection_impl_->SetVideoCapture(
-          params->cam_device);
-      break;
-    }
-    case MSG_WEBRTC_GETREADYSTATE: {
-      PeerConnection::ReadyState* ready_state =
-          reinterpret_cast<PeerConnection::ReadyState*>(data);
-      *ready_state = peerconnection_impl_->GetReadyState();
-      break;
-    }
-    case MSG_WEBRTC_SETVIDEORENDERER: {
-      SetVideoRendererParams* params =
-          reinterpret_cast<SetVideoRendererParams*>(data);
-      params->result = peerconnection_impl_->SetVideoRenderer(
-          params->stream_id, params->renderer);
-      break;
-    }
-    case MSG_WEBRTC_CONNECT: {
-      ResultParams* params =
-          reinterpret_cast<ResultParams*>(data);
-      params->result = peerconnection_impl_->Connect();
-      break;
-    }
-    case MSG_WEBRTC_CLOSE: {
-      ResultParams* params =
-          reinterpret_cast<ResultParams*>(data);
-      params->result = peerconnection_impl_->Close();
-      break;
-    }
-    case MSG_WEBRTC_INIT: {
-      ResultParams* params =
-          reinterpret_cast<ResultParams*>(data);
-      params->result = peerconnection_impl_->Init();
-      break;
-    }
-    case MSG_WEBRTC_REGISTEROBSERVER: {
-      RegisterObserverParams* params =
-          reinterpret_cast<RegisterObserverParams*>(data);
-      peerconnection_impl_->RegisterObserver(params->observer);
-      break;
-    }
-    case MSG_WEBRTC_RELEASE: {
-      peerconnection_impl_.reset();
-      break;
-    }
-    default: {
-      ASSERT(false);
-      break;
-    }
-  }
-}
-
-}  // namespace webrtc
diff --git a/third_party/libjingle/source/talk/app/webrtc/peerconnectionproxy.h b/third_party/libjingle/source/talk/app/webrtc/peerconnectionproxy.h
deleted file mode 100644
index e83b4ec..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/peerconnectionproxy.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_PEERCONNECTIONPROXY_H_
-#define TALK_APP_WEBRTC_PEERCONNECTIONPROXY_H_
-
-#include <string>
-
-#include "talk/app/webrtc/peerconnection.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/thread.h"
-
-namespace cricket {
-class ChannelManager;
-class PortAllocator;
-}
-
-namespace webrtc {
-
-class PeerConnectionImpl;
-
-class PeerConnectionProxy : public PeerConnection,
-                            public talk_base::MessageHandler {
- public:
-  PeerConnectionProxy(cricket::PortAllocator* port_allocator,
-                      cricket::ChannelManager* channel_manager,
-                      talk_base::Thread* signaling_thread);
-  virtual ~PeerConnectionProxy();
-
-  // PeerConnection interface implementation.
-  virtual void RegisterObserver(PeerConnectionObserver* observer);
-  virtual bool SignalingMessage(const std::string& msg);
-  virtual bool AddStream(const std::string& stream_id, bool video);
-  virtual bool RemoveStream(const std::string& stream_id);
-  virtual bool Connect();
-  virtual bool Close();
-  virtual bool SetAudioDevice(const std::string& wave_in_device,
-                              const std::string& wave_out_device, int opts);
-  virtual bool SetLocalVideoRenderer(cricket::VideoRenderer* renderer);
-  virtual bool SetVideoRenderer(const std::string& stream_id,
-                                cricket::VideoRenderer* renderer);
-  virtual bool SetVideoCapture(const std::string& cam_device);
-  virtual ReadyState GetReadyState();
-
- private:
-  bool Init();
-  bool Send(uint32 id, talk_base::MessageData* data);
-  virtual void OnMessage(talk_base::Message* message);
-
-  talk_base::scoped_ptr<PeerConnectionImpl> peerconnection_impl_;
-  talk_base::Thread* signaling_thread_;
-
-  friend class PeerConnectionFactory;
-};
-}
-
-#endif  // TALK_APP_WEBRTC_PEERCONNECTIONPROXY_H_
diff --git a/third_party/libjingle/source/talk/app/webrtc/webrtc.scons b/third_party/libjingle/source/talk/app/webrtc/webrtc.scons
deleted file mode 100644
index 271d413..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/webrtc.scons
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- Python -*-
-import talk
-
-Import('env')
-
-# local sources
-talk.Library(
-  env,
-  name = 'webrtc',
-  srcs = [
-    'peerconnectionimpl.cc',
-    'peerconnectionproxy.cc',
-    'peerconnectionfactory.cc',
-    'webrtcjson.cc',
-    'webrtcsession.cc',
-  ],
-)
-
-talk.Unittest(
-  env,
-  name = 'webrtc',
-  srcs = [
-    'peerconnection_unittest.cc',
-    'unittest_utilities.cc',
-    'webrtcsession_unittest.cc',
-  ],
-  libs = [
-    'base',
-    'expat',
-    'jpeg',
-    'json',
-    'webrtc',
-    'p2p',
-    'phone',
-    'srtp',
-    'xmpp',
-    'xmllite',
-    'yuvscaler'
-  ],
-  include_talk_media_libs = True,
-  mac_libs = [
-    'crypto',
-    'ssl',
-  ],
-  mac_FRAMEWORKS = [
-    'Foundation',
-    'IOKit',
-    'QTKit',
-  ],
-  win_link_flags = [('', '/nodefaultlib:libcmt')[env.Bit('debug')]],
-  lin_libs = [
-    'rt',
-    'dl',
-    'sound',
-    'X11',
-    'Xext',
-    'Xfixes',
-    'Xrandr'
-  ],
-)
diff --git a/third_party/libjingle/source/talk/app/webrtc/webrtcjson.cc b/third_party/libjingle/source/talk/app/webrtc/webrtcjson.cc
deleted file mode 100644
index b071746..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/webrtcjson.cc
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/app/webrtc/webrtcjson.h"
-
-#ifdef WEBRTC_RELATIVE_PATH
-#include "json/json.h"
-#else
-#include "third_party/jsoncpp/json.h"
-#endif
-
-// TODO: Remove webrtcsession.h once we can get size from signaling.
-// webrtcsession.h is for kDefaultVideoCodecWidth and kDefaultVideoCodecHeight.
-#include "talk/app/webrtc/webrtcsession.h"
-#include "talk/base/json.h"
-#include "talk/base/logging.h"
-#include "talk/base/stringutils.h"
-#include "talk/session/phone/codec.h"
-#include "talk/session/phone/mediasessionclient.h"
-
-namespace webrtc {
-static const int kIceComponent = 1;
-static const int kIceFoundation = 1;
-
-static std::vector<Json::Value> ReadValues(const Json::Value& value,
-                                           const std::string& key);
-
-static bool BuildMediaMessage(
-    const cricket::ContentInfo& content_info,
-    const std::vector<cricket::Candidate>& candidates,
-    bool video,
-    Json::Value* value);
-
-static bool BuildRtpMapParams(
-    const cricket::ContentInfo& audio_offer,
-    bool video,
-    std::vector<Json::Value>* rtpmap);
-
-static bool BuildAttributes(const std::vector<cricket::Candidate>& candidates,
-                            bool video,
-                            std::vector<Json::Value>* jcandidates);
-
-static std::string Serialize(const Json::Value& value);
-static bool Deserialize(const std::string& message, Json::Value* value);
-
-static bool ParseRtcpMux(const Json::Value& value);
-static bool ParseAudioCodec(const Json::Value& value,
-                            cricket::AudioContentDescription* content);
-static bool ParseVideoCodec(const Json::Value& value,
-                            cricket::VideoContentDescription* content);
-static bool ParseIceCandidates(const Json::Value& value,
-                               std::vector<cricket::Candidate>* candidates);
-
-static Json::Value ReadValue(const Json::Value& value, const std::string& key);
-static std::string ReadString(const Json::Value& value, const std::string& key);
-static uint32 ReadUInt(const Json::Value& value, const std::string& key);
-
-static void Append(Json::Value* object, const std::string& key, bool value);
-static void Append(Json::Value* object, const std::string& key, int value);
-static void Append(Json::Value* object, const std::string& key,
-                   const std::string& value);
-static void Append(Json::Value* object, const std::string& key, uint32 value);
-static void Append(Json::Value* object, const std::string& key,
-                   const Json::Value& value);
-static void Append(Json::Value* object,
-                   const std::string& key,
-                   const std::vector<Json::Value>& values);
-
-bool GetJsonSignalingMessage(
-    const cricket::SessionDescription* sdp,
-    const std::vector<cricket::Candidate>& candidates,
-    std::string* signaling_message) {
-  const cricket::ContentInfo* audio_content = GetFirstAudioContent(sdp);
-  const cricket::ContentInfo* video_content = GetFirstVideoContent(sdp);
-
-  std::vector<Json::Value> media;
-  if (audio_content) {
-    Json::Value value;
-    BuildMediaMessage(*audio_content, candidates, false, &value);
-    media.push_back(value);
-  }
-
-  if (video_content) {
-    Json::Value value;
-    BuildMediaMessage(*video_content, candidates, true, &value);
-    media.push_back(value);
-  }
-
-  Json::Value signal;
-  Append(&signal, "media", media);
-
-  // Now serialize.
-  *signaling_message = Serialize(signal);
-
-  return true;
-}
-
-bool BuildMediaMessage(
-    const cricket::ContentInfo& content_info,
-    const std::vector<cricket::Candidate>& candidates,
-    bool video,
-    Json::Value* params) {
-  if (video) {
-    Append(params, "label", 2);  // always video 2
-  } else {
-    Append(params, "label", 1);  // always audio 1
-  }
-
-  const cricket::MediaContentDescription* media_info =
-  static_cast<const cricket::MediaContentDescription*> (
-      content_info.description);
-  if (media_info->rtcp_mux()) {
-    Append(params, "rtcp_mux", true);
-  }
-
-  std::vector<Json::Value> rtpmap;
-  if (!BuildRtpMapParams(content_info, video, &rtpmap)) {
-    return false;
-  }
-
-  Append(params, "rtpmap", rtpmap);
-
-  Json::Value attributes;
-  std::vector<Json::Value> jcandidates;
-
-  if (!BuildAttributes(candidates, video, &jcandidates)) {
-    return false;
-  }
-  Append(&attributes, "candidate", jcandidates);
-  Append(params, "attributes", attributes);
-  return true;
-}
-
-bool BuildRtpMapParams(const cricket::ContentInfo& content_info,
-                       bool video,
-                       std::vector<Json::Value>* rtpmap) {
-  if (!video) {
-    const cricket::AudioContentDescription* audio_offer =
-        static_cast<const cricket::AudioContentDescription*>(
-            content_info.description);
-
-    std::vector<cricket::AudioCodec>::const_iterator iter =
-        audio_offer->codecs().begin();
-    std::vector<cricket::AudioCodec>::const_iterator iter_end =
-        audio_offer->codecs().end();
-    for (; iter != iter_end; ++iter) {
-      Json::Value codec;
-      std::string codec_str(std::string("audio/").append(iter->name));
-      // adding clockrate
-      Append(&codec, "clockrate", iter->clockrate);
-      Append(&codec, "codec", codec_str);
-      Json::Value codec_id;
-      Append(&codec_id, talk_base::ToString(iter->id), codec);
-      rtpmap->push_back(codec_id);
-    }
-  } else {
-    const cricket::VideoContentDescription* video_offer =
-        static_cast<const cricket::VideoContentDescription*>(
-            content_info.description);
-
-    std::vector<cricket::VideoCodec>::const_iterator iter =
-        video_offer->codecs().begin();
-    std::vector<cricket::VideoCodec>::const_iterator iter_end =
-        video_offer->codecs().end();
-    for (; iter != iter_end; ++iter) {
-      Json::Value codec;
-      std::string codec_str(std::string("video/").append(iter->name));
-      Append(&codec, "codec", codec_str);
-      Json::Value codec_id;
-      Append(&codec_id, talk_base::ToString(iter->id), codec);
-      rtpmap->push_back(codec_id);
-    }
-  }
-  return true;
-}
-
-bool BuildAttributes(const std::vector<cricket::Candidate>& candidates,
-                     bool video,
-                     std::vector<Json::Value>* jcandidates) {
-  std::vector<cricket::Candidate>::const_iterator iter =
-      candidates.begin();
-  std::vector<cricket::Candidate>::const_iterator iter_end =
-      candidates.end();
-  for (; iter != iter_end; ++iter) {
-    if ((video && (!iter->name().compare("video_rtcp") ||
-                  (!iter->name().compare("video_rtp")))) ||
-        (!video && (!iter->name().compare("rtp") ||
-                   (!iter->name().compare("rtcp"))))) {
-      Json::Value candidate;
-      Append(&candidate, "component", kIceComponent);
-      Append(&candidate, "foundation", kIceFoundation);
-      Append(&candidate, "generation", iter->generation());
-      Append(&candidate, "proto", iter->protocol());
-      Append(&candidate, "priority", iter->preference_str());
-      Append(&candidate, "ip", iter->address().IPAsString());
-      Append(&candidate, "port", iter->address().PortAsString());
-      Append(&candidate, "type", iter->type());
-      Append(&candidate, "name", iter->name());
-      Append(&candidate, "network_name", iter->network_name());
-      Append(&candidate, "username", iter->username());
-      Append(&candidate, "password", iter->password());
-      jcandidates->push_back(candidate);
-    }
-  }
-  return true;
-}
-
-std::string Serialize(const Json::Value& value) {
-  Json::StyledWriter writer;
-  return writer.write(value);
-}
-
-bool Deserialize(const std::string& message, Json::Value* value) {
-  Json::Reader reader;
-  return reader.parse(message, *value);
-}
-
-bool ParseJsonSignalingMessage(const std::string& signaling_message,
-                               cricket::SessionDescription** sdp,
-                               std::vector<cricket::Candidate>* candidates) {
-  ASSERT(!(*sdp));  // expect this to be NULL
-  // first deserialize message
-  Json::Value value;
-  if (!Deserialize(signaling_message, &value)) {
-    return false;
-  }
-
-  // get media objects
-  std::vector<Json::Value> mlines = ReadValues(value, "media");
-  if (mlines.empty()) {
-    // no m-lines found
-    return false;
-  }
-
-  *sdp = new cricket::SessionDescription();
-
-  // get codec information
-  for (size_t i = 0; i < mlines.size(); ++i) {
-    if (mlines[i]["label"].asInt() == 1) {
-      cricket::AudioContentDescription* audio_content =
-          new cricket::AudioContentDescription();
-      ParseAudioCodec(mlines[i], audio_content);
-      audio_content->set_rtcp_mux(ParseRtcpMux(mlines[i]));
-      audio_content->SortCodecs();
-      (*sdp)->AddContent(cricket::CN_AUDIO,
-                         cricket::NS_JINGLE_RTP, audio_content);
-      ParseIceCandidates(mlines[i], candidates);
-    } else {
-      cricket::VideoContentDescription* video_content =
-          new cricket::VideoContentDescription();
-      ParseVideoCodec(mlines[i], video_content);
-
-      video_content->set_rtcp_mux(ParseRtcpMux(mlines[i]));
-      video_content->SortCodecs();
-      (*sdp)->AddContent(cricket::CN_VIDEO,
-                         cricket::NS_JINGLE_RTP, video_content);
-      ParseIceCandidates(mlines[i], candidates);
-    }
-  }
-  return true;
-}
-
-bool ParseRtcpMux(const Json::Value& value) {
-  Json::Value rtcp_mux(ReadValue(value, "rtcp_mux"));
-  if (!rtcp_mux.empty()) {
-    if (rtcp_mux.asBool()) {
-      return true;
-    }
-  }
-  return false;
-}
-
-bool ParseAudioCodec(const Json::Value& value,
-                     cricket::AudioContentDescription* content) {
-  std::vector<Json::Value> rtpmap(ReadValues(value, "rtpmap"));
-  if (rtpmap.empty())
-    return false;
-
-  std::vector<Json::Value>::const_iterator iter =
-      rtpmap.begin();
-  std::vector<Json::Value>::const_iterator iter_end =
-      rtpmap.end();
-  for (; iter != iter_end; ++iter) {
-    cricket::AudioCodec codec;
-    std::string pltype(iter->begin().memberName());
-    talk_base::FromString(pltype, &codec.id);
-    Json::Value codec_info((*iter)[pltype]);
-    std::string codec_name(ReadString(codec_info, "codec"));
-    std::vector<std::string> tokens;
-    talk_base::split(codec_name, '/', &tokens);
-    codec.name = tokens[1];
-    codec.clockrate = ReadUInt(codec_info, "clockrate");
-    content->AddCodec(codec);
-  }
-
-  return true;
-}
-
-bool ParseVideoCodec(const Json::Value& value,
-                     cricket::VideoContentDescription* content) {
-  std::vector<Json::Value> rtpmap(ReadValues(value, "rtpmap"));
-  if (rtpmap.empty())
-    return false;
-
-  std::vector<Json::Value>::const_iterator iter =
-      rtpmap.begin();
-  std::vector<Json::Value>::const_iterator iter_end =
-      rtpmap.end();
-  for (; iter != iter_end; ++iter) {
-    cricket::VideoCodec codec;
-    std::string pltype(iter->begin().memberName());
-    talk_base::FromString(pltype, &codec.id);
-    Json::Value codec_info((*iter)[pltype]);
-    std::vector<std::string> tokens;
-    talk_base::split(codec_info["codec"].asString(), '/', &tokens);
-    codec.name = tokens[1];
-    // TODO: Remove once we can get size from signaling message.
-    codec.width = WebRtcSession::kDefaultVideoCodecWidth;
-    codec.height = WebRtcSession::kDefaultVideoCodecHeight;
-    content->AddCodec(codec);
-  }
-  return true;
-}
-
-bool ParseIceCandidates(const Json::Value& value,
-                        std::vector<cricket::Candidate>* candidates) {
-  Json::Value attributes(ReadValue(value, "attributes"));
-  std::string ice_pwd(ReadString(attributes, "ice-pwd"));
-  std::string ice_ufrag(ReadString(attributes, "ice-ufrag"));
-
-  std::vector<Json::Value> jcandidates(ReadValues(attributes, "candidate"));
-
-  std::vector<Json::Value>::const_iterator iter =
-      jcandidates.begin();
-  std::vector<Json::Value>::const_iterator iter_end =
-      jcandidates.end();
-  for (; iter != iter_end; ++iter) {
-    cricket::Candidate cand;
-
-    unsigned int generation;
-    if (!GetUIntFromJsonObject(*iter, "generation", &generation))
-      return false;
-    cand.set_generation_str(talk_base::ToString(generation));
-
-    std::string proto;
-    if (!GetStringFromJsonObject(*iter, "proto", &proto))
-      return false;
-    cand.set_protocol(proto);
-
-    std::string priority;
-    if (!GetStringFromJsonObject(*iter, "priority", &priority))
-      return false;
-    cand.set_preference_str(priority);
-
-    std::string str;
-    talk_base::SocketAddress addr;
-    if (!GetStringFromJsonObject(*iter, "ip", &str))
-      return false;
-    addr.SetIP(str);
-    if (!GetStringFromJsonObject(*iter, "port", &str))
-      return false;
-    int port;
-    if (!talk_base::FromString(str, &port))
-      return false;
-    addr.SetPort(port);
-    cand.set_address(addr);
-
-    if (!GetStringFromJsonObject(*iter, "type", &str))
-      return false;
-    cand.set_type(str);
-
-    if (!GetStringFromJsonObject(*iter, "name", &str))
-      return false;
-    cand.set_name(str);
-
-    if (!GetStringFromJsonObject(*iter, "network_name", &str))
-      return false;
-    cand.set_network_name(str);
-
-    if (!GetStringFromJsonObject(*iter, "username", &str))
-      return false;
-    cand.set_username(str);
-
-    if (!GetStringFromJsonObject(*iter, "password", &str))
-      return false;
-    cand.set_password(str);
-
-    candidates->push_back(cand);
-  }
-  return true;
-}
-
-std::vector<Json::Value> ReadValues(
-    const Json::Value& value, const std::string& key) {
-  std::vector<Json::Value> objects;
-  for (Json::Value::ArrayIndex i = 0; i < value[key].size(); ++i) {
-    objects.push_back(value[key][i]);
-  }
-  return objects;
-}
-
-Json::Value ReadValue(const Json::Value& value, const std::string& key) {
-  return value[key];
-}
-
-std::string ReadString(const Json::Value& value, const std::string& key) {
-  return value[key].asString();
-}
-
-uint32 ReadUInt(const Json::Value& value, const std::string& key) {
-  return value[key].asUInt();
-}
-
-void Append(Json::Value* object, const std::string& key, bool value) {
-  (*object)[key] = Json::Value(value);
-}
-
-void Append(Json::Value* object, const std::string& key, int value) {
-  (*object)[key] = Json::Value(value);
-}
-
-void Append(Json::Value* object, const std::string& key,
-            const std::string& value) {
-  (*object)[key] = Json::Value(value);
-}
-
-void Append(Json::Value* object, const std::string& key, uint32 value) {
-  (*object)[key] = Json::Value(value);
-}
-
-void Append(Json::Value* object, const std::string& key,
-            const Json::Value& value) {
-  (*object)[key] = value;
-}
-
-void Append(Json::Value* object,
-            const std::string & key,
-            const std::vector<Json::Value>& values) {
-  for (std::vector<Json::Value>::const_iterator iter = values.begin();
-      iter != values.end(); ++iter) {
-    (*object)[key].append(*iter);
-  }
-}
-
-}  // namespace webrtc
diff --git a/third_party/libjingle/source/talk/app/webrtc/webrtcjson.h b/third_party/libjingle/source/talk/app/webrtc/webrtcjson.h
deleted file mode 100644
index d923f83..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/webrtcjson.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_WEBRTCJSON_H_
-#define TALK_APP_WEBRTC_WEBRTCJSON_H_
-
-#include <string>
-
-#include "talk/p2p/base/candidate.h"
-#include "talk/session/phone/codec.h"
-
-namespace Json {
-class Value;
-}
-
-namespace cricket {
-class AudioContentDescription;
-class VideoContentDescription;
-struct ContentInfo;
-class SessionDescription;
-}
-
-namespace webrtc {
-
-bool GetJsonSignalingMessage(
-    const cricket::SessionDescription* sdp,
-    const std::vector<cricket::Candidate>& candidates,
-    std::string* signaling_message);
-
-bool ParseJsonSignalingMessage(const std::string& signaling_message,
-                               cricket::SessionDescription** sdp,
-                               std::vector<cricket::Candidate>* candidates);
-}
-
-#endif  // TALK_APP_WEBRTC_WEBRTCJSON_H_
diff --git a/third_party/libjingle/source/talk/app/webrtc/webrtcsession.cc b/third_party/libjingle/source/talk/app/webrtc/webrtcsession.cc
deleted file mode 100644
index 634da77..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/webrtcsession.cc
+++ /dev/null
@@ -1,537 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/app/webrtc/webrtcsession.h"
-
-#include <string>
-#include <vector>
-
-#include "talk/base/common.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/p2p/base/constants.h"
-#include "talk/p2p/base/sessiondescription.h"
-#include "talk/p2p/base/p2ptransport.h"
-#include "talk/session/phone/channel.h"
-#include "talk/session/phone/channelmanager.h"
-#include "talk/session/phone/mediasessionclient.h"
-#include "talk/session/phone/voicechannel.h"
-
-namespace webrtc {
-
-enum {
-  MSG_CANDIDATE_TIMEOUT = 101,
-};
-
-static const int kAudioMonitorPollFrequency = 100;
-static const int kMonitorPollFrequency = 1000;
-
-// We allow 30 seconds to establish a connection; beyond that we consider
-// it an error
-static const int kCallSetupTimeout = 30 * 1000;
-// A loss of connectivity is probably due to the Internet connection going
-// down, and it might take a while to come back on wireless networks, so we
-// use a longer timeout for that.
-static const int kCallLostTimeout = 60 * 1000;
-
-static const char kVideoStream[] = "video_rtp";
-static const char kAudioStream[] = "rtp";
-
-static const int kDefaultVideoCodecId = 100;
-static const int kDefaultVideoCodecFramerate = 30;
-static const char kDefaultVideoCodecName[] = "VP8";
-
-WebRtcSession::WebRtcSession(const std::string& id,
-                             bool incoming,
-                             cricket::PortAllocator* allocator,
-                             cricket::ChannelManager* channelmgr,
-                             talk_base::Thread* signaling_thread)
-    : BaseSession(signaling_thread, channelmgr->worker_thread(),
-                  allocator, id, "", !incoming),
-      transport_(NULL),
-      channel_manager_(channelmgr),
-      transports_writable_(false),
-      muted_(false),
-      camera_muted_(false),
-      setup_timeout_(kCallSetupTimeout),
-      signaling_thread_(signaling_thread),
-      incoming_(incoming),
-      port_allocator_(allocator),
-      desc_factory_(channel_manager_) {
-}
-
-WebRtcSession::~WebRtcSession() {
-  RemoveAllStreams();
-  // TODO: Do we still need Terminate?
-  // if (state_ != STATE_RECEIVEDTERMINATE) {
-  //   Terminate();
-  // }
-  if (transport_) {
-    delete transport_;
-    transport_ = NULL;
-  }
-}
-
-bool WebRtcSession::Initiate() {
-  const cricket::VideoCodec default_codec(kDefaultVideoCodecId,
-      kDefaultVideoCodecName, kDefaultVideoCodecWidth, kDefaultVideoCodecHeight,
-      kDefaultVideoCodecFramerate, 0);
-  channel_manager_->SetDefaultVideoEncoderConfig(
-      cricket::VideoEncoderConfig(default_codec));
-
-  if (signaling_thread_ == NULL)
-    return false;
-
-  transport_ = CreateTransport();
-
-  if (transport_ == NULL)
-    return false;
-
-  transport_->set_allow_local_ips(true);
-
-  // start transports
-  transport_->SignalRequestSignaling.connect(
-      this, &WebRtcSession::OnRequestSignaling);
-  transport_->SignalCandidatesReady.connect(
-      this, &WebRtcSession::OnCandidatesReady);
-  transport_->SignalWritableState.connect(
-      this, &WebRtcSession::OnWritableState);
-  // Limit the amount of time that setting up a call may take.
-  StartTransportTimeout(kCallSetupTimeout);
-  return true;
-}
-
-cricket::Transport* WebRtcSession::CreateTransport() {
-  ASSERT(signaling_thread()->IsCurrent());
-  return new cricket::P2PTransport(
-      talk_base::Thread::Current(),
-      channel_manager_->worker_thread(), port_allocator());
-}
-
-bool WebRtcSession::CreateVoiceChannel(const std::string& stream_id) {
-  // RTCP disabled
-  cricket::VoiceChannel* voice_channel =
-      channel_manager_->CreateVoiceChannel(this, stream_id, true);
-  if (voice_channel == NULL) {
-    LOG(LERROR) << "Unable to create voice channel.";
-    return false;
-  }
-  StreamInfo* stream_info = new StreamInfo(stream_id);
-  stream_info->channel = voice_channel;
-  stream_info->video = false;
-  streams_.push_back(stream_info);
-  return true;
-}
-
-bool WebRtcSession::CreateVideoChannel(const std::string& stream_id) {
-  // RTCP disabled
-  cricket::VideoChannel* video_channel =
-      channel_manager_->CreateVideoChannel(this, stream_id, true, NULL);
-  if (video_channel == NULL) {
-    LOG(LERROR) << "Unable to create video channel.";
-    return false;
-  }
-  StreamInfo* stream_info = new StreamInfo(stream_id);
-  stream_info->channel = video_channel;
-  stream_info->video = true;
-  streams_.push_back(stream_info);
-  return true;
-}
-
-cricket::TransportChannel* WebRtcSession::CreateChannel(
-    const std::string& content_name,
-    const std::string& name) {
-  if (!transport_) {
-    return NULL;
-  }
-  std::string type;
-  if (content_name.compare(kVideoStream) == 0) {
-    type = cricket::NS_GINGLE_VIDEO;
-  } else {
-    type = cricket::NS_GINGLE_AUDIO;
-  }
-  cricket::TransportChannel* transport_channel =
-      transport_->CreateChannel(name, type);
-  ASSERT(transport_channel != NULL);
-  return transport_channel;
-}
-
-cricket::TransportChannel* WebRtcSession::GetChannel(
-    const std::string& content_name, const std::string& name) {
-  if (!transport_)
-    return NULL;
-
-  return transport_->GetChannel(name);
-}
-
-void WebRtcSession::DestroyChannel(
-    const std::string& content_name, const std::string& name) {
-  if (!transport_)
-    return;
-
-  transport_->DestroyChannel(name);
-}
-
-void WebRtcSession::OnMessage(talk_base::Message* message) {
-  switch (message->message_id) {
-    case MSG_CANDIDATE_TIMEOUT:
-      if (transport_->writable()) {
-        // This should never happen: The timout triggered even
-        // though a call was successfully set up.
-        ASSERT(false);
-      }
-      SignalFailedCall();
-      break;
-    default:
-      cricket::BaseSession::OnMessage(message);
-      break;
-  }
-}
-
-bool WebRtcSession::Connect() {
-  if (streams_.empty()) {
-    // nothing to initiate
-    return false;
-  }
-  // lets connect all the transport channels created before for this session
-  transport_->ConnectChannels();
-
-  // create an offer now. This is to call SetState
-  // Actual offer will be send when OnCandidatesReady callback received
-  cricket::SessionDescription* offer = CreateOffer();
-  set_local_description(offer);
-  SetState((incoming()) ? STATE_SENTACCEPT : STATE_SENTINITIATE);
-
-  // Enable all the channels
-  EnableAllStreams();
-  SetVideoCapture(true);
-  return true;
-}
-
-bool WebRtcSession::SetVideoRenderer(const std::string& stream_id,
-                                     cricket::VideoRenderer* renderer) {
-  bool ret = false;
-  StreamMap::iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    StreamInfo* stream_info = (*iter);
-    if (stream_info->stream_id.compare(stream_id) == 0) {
-      ASSERT(stream_info->channel != NULL);
-      ASSERT(stream_info->video);
-      cricket::VideoChannel* channel = static_cast<cricket::VideoChannel*>(
-          stream_info->channel);
-      ret = channel->SetRenderer(0, renderer);
-      break;
-    }
-  }
-  return ret;
-}
-
-bool WebRtcSession::SetVideoCapture(bool capture) {
-  channel_manager_->SetVideoCapture(capture);
-  return true;
-}
-
-bool WebRtcSession::RemoveStream(const std::string& stream_id) {
-  bool ret = false;
-  StreamMap::iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    StreamInfo* sinfo = (*iter);
-    if (sinfo->stream_id.compare(stream_id) == 0) {
-      if (!sinfo->video) {
-        cricket::VoiceChannel* channel = static_cast<cricket::VoiceChannel*> (
-            sinfo->channel);
-        channel->Enable(false);
-        // Note: If later the channel is used by multiple streams, then we
-        // should not destroy the channel until all the streams are removed.
-        channel_manager_->DestroyVoiceChannel(channel);
-      } else {
-        cricket::VideoChannel* channel = static_cast<cricket::VideoChannel*> (
-            sinfo->channel);
-        channel->Enable(false);
-        // Note: If later the channel is used by multiple streams, then we
-        // should not destroy the channel until all the streams are removed.
-        channel_manager_->DestroyVideoChannel(channel);
-      }
-      // channel and transport will be deleted in
-      // DestroyVoiceChannel/DestroyVideoChannel
-      streams_.erase(iter);
-      ret = true;
-      break;
-    }
-  }
-  if (!ret) {
-    LOG(LERROR) << "No streams found for stream id " << stream_id;
-    // TODO: trigger onError callback
-  }
-  return ret;
-}
-
-void WebRtcSession::EnableAllStreams() {
-  StreamMap::const_iterator i;
-  for (i = streams_.begin(); i != streams_.end(); ++i) {
-    cricket::BaseChannel* channel = (*i)->channel;
-    if (channel)
-      channel->Enable(true);
-  }
-}
-
-void WebRtcSession::RemoveAllStreams() {
-  SetState(STATE_RECEIVEDTERMINATE);
-
-  // signaling_thread_->Post(this, MSG_RTC_REMOVEALLSTREAMS);
-  // First build a list of streams to remove and then remove them.
-  // The reason we do this is that if we remove the streams inside the
-  // loop, a stream might get removed while we're enumerating and the iterator
-  // will become invalid (and we crash).
-  // streams_ entry will be removed from ChannelManager callback method
-  // DestroyChannel
-  std::vector<std::string> streams_to_remove;
-  StreamMap::iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter)
-    streams_to_remove.push_back((*iter)->stream_id);
-
-  for (std::vector<std::string>::iterator i = streams_to_remove.begin();
-       i != streams_to_remove.end(); ++i) {
-    RemoveStream(*i);
-  }
-}
-
-bool WebRtcSession::HasStream(const std::string& stream_id) const {
-  StreamMap::const_iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    StreamInfo* sinfo = (*iter);
-    if (stream_id.compare(sinfo->stream_id) == 0) {
-      return true;
-    }
-  }
-  return false;
-}
-
-bool WebRtcSession::HasChannel(bool video) const {
-  StreamMap::const_iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    StreamInfo* sinfo = (*iter);
-    if (sinfo->video == video) {
-      return true;
-    }
-  }
-  return false;
-}
-
-bool WebRtcSession::HasAudioChannel() const {
-  return HasChannel(false);
-}
-
-bool WebRtcSession::HasVideoChannel() const {
-  return HasChannel(true);
-}
-
-void WebRtcSession::OnRequestSignaling(cricket::Transport* transport) {
-  transport->OnSignalingReady();
-}
-
-void WebRtcSession::OnWritableState(cricket::Transport* transport) {
-  ASSERT(transport == transport_);
-  const bool transports_writable = transport_->writable();
-  if (transports_writable) {
-    if (transports_writable != transports_writable_) {
-      signaling_thread_->Clear(this, MSG_CANDIDATE_TIMEOUT);
-    } else {
-      // At one point all channels were writable and we had full connectivity,
-      // but then we lost it. Start the timeout again to kill the call if it
-      // doesn't come back.
-      StartTransportTimeout(kCallLostTimeout);
-    }
-    transports_writable_ = transports_writable;
-  }
-  NotifyTransportState();
-  return;
-}
-
-void WebRtcSession::StartTransportTimeout(int timeout) {
-  talk_base::Thread::Current()->PostDelayed(timeout, this,
-                                            MSG_CANDIDATE_TIMEOUT,
-                                            NULL);
-}
-
-void WebRtcSession::NotifyTransportState() {
-}
-
-bool WebRtcSession::OnInitiateMessage(
-    cricket::SessionDescription* offer,
-    const std::vector<cricket::Candidate>& candidates) {
-  if (!offer) {
-    LOG(LERROR) << "No SessionDescription from peer";
-    return false;
-  }
-
-  // Get capabilities from offer before generating an answer to it.
-  cricket::MediaSessionOptions options;
-  if (GetFirstAudioContent(offer))
-    options.has_audio = true;
-  if (GetFirstVideoContent(offer))
-    options.has_video = true;
-
-  talk_base::scoped_ptr<cricket::SessionDescription> answer;
-  answer.reset(CreateAnswer(offer, options));
-
-  if (!answer.get()) {
-    return false;
-  }
-
-  const cricket::ContentInfo* audio_content = GetFirstAudioContent(
-      answer.get());
-  const cricket::ContentInfo* video_content = GetFirstVideoContent(
-      answer.get());
-
-  if (!audio_content && !video_content) {
-    return false;
-  }
-
-  bool ret = true;
-  if (audio_content) {
-    ret = !HasAudioChannel() &&
-          CreateVoiceChannel(audio_content->name);
-    if (!ret) {
-      LOG(LERROR) << "Failed to create voice channel for "
-                  << audio_content->name;
-      return false;
-    }
-  }
-
-  if (video_content) {
-    ret = !HasVideoChannel() &&
-          CreateVideoChannel(video_content->name);
-    if (!ret) {
-      LOG(LERROR) << "Failed to create video channel for "
-                  << video_content->name;
-      return false;
-    }
-  }
-  // Provide remote candidates to the transport
-  transport_->OnRemoteCandidates(candidates);
-
-  set_remote_description(offer);
-  SetState(STATE_RECEIVEDINITIATE);
-
-  transport_->ConnectChannels();
-  EnableAllStreams();
-
-  set_local_description(answer.release());
-
-  // AddStream called only once with Video label
-  if (video_content) {
-    SignalAddStream(video_content->name, true);
-  } else {
-    SignalAddStream(audio_content->name, false);
-  }
-  SetState(STATE_SENTACCEPT);
-  return true;
-}
-
-bool WebRtcSession::OnRemoteDescription(
-    cricket::SessionDescription* desc,
-    const std::vector<cricket::Candidate>& candidates) {
-  if (state() == STATE_SENTACCEPT ||
-      state() == STATE_RECEIVEDACCEPT ||
-      state() == STATE_INPROGRESS) {
-    transport_->OnRemoteCandidates(candidates);
-    return true;
-  }
-  // Session description is always accepted.
-  set_remote_description(desc);
-  SetState(STATE_RECEIVEDACCEPT);
-  // Will trigger OnWritableState() if successful.
-  transport_->OnRemoteCandidates(candidates);
-
-  if (!incoming()) {
-    // Trigger OnAddStream callback at the initiator
-    const cricket::ContentInfo* video_content = GetFirstVideoContent(desc);
-    if (video_content && !SendSignalAddStream(true)) {
-      LOG(LERROR) << "Video stream unexpected in answer.";
-      return false;
-    } else {
-      const cricket::ContentInfo* audio_content = GetFirstAudioContent(desc);
-      if (audio_content && !SendSignalAddStream(false)) {
-        LOG(LERROR) << "Audio stream unexpected in answer.";
-        return false;
-      }
-    }
-  }
-  return true;
-}
-
-// Send the SignalAddStream with the stream_id based on the content type.
-bool WebRtcSession::SendSignalAddStream(bool video) {
-  StreamMap::const_iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    StreamInfo* sinfo = (*iter);
-    if (sinfo->video == video) {
-      SignalAddStream(sinfo->stream_id, video);
-      return true;
-    }
-  }
-  return false;
-}
-
-cricket::SessionDescription* WebRtcSession::CreateOffer() {
-  cricket::MediaSessionOptions options;
-  options.has_audio = false;  // disable default option
-  StreamMap::const_iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    if ((*iter)->video) {
-      options.has_video = true;
-    } else {
-      options.has_audio = true;
-    }
-  }
-  // We didn't save the previous offer.
-  const cricket::SessionDescription* previous_offer = NULL;
-  return desc_factory_.CreateOffer(options, previous_offer);
-}
-
-cricket::SessionDescription* WebRtcSession::CreateAnswer(
-    const cricket::SessionDescription* offer,
-    const cricket::MediaSessionOptions& options) {
-  // We didn't save the previous answer.
-  const cricket::SessionDescription* previous_answer = NULL;
-  return desc_factory_.CreateAnswer(offer, options, previous_answer);
-}
-
-void WebRtcSession::SetError(Error error) {
-  BaseSession::SetError(error);
-}
-
-void WebRtcSession::OnCandidatesReady(
-    cricket::Transport* transport,
-    const std::vector<cricket::Candidate>& candidates) {
-  std::vector<cricket::Candidate>::const_iterator iter;
-  for (iter = candidates.begin(); iter != candidates.end(); ++iter) {
-    local_candidates_.push_back(*iter);
-  }
-  SignalLocalDescription(local_description(), candidates);
-}
-} /* namespace webrtc */
diff --git a/third_party/libjingle/source/talk/app/webrtc/webrtcsession.h b/third_party/libjingle/source/talk/app/webrtc/webrtcsession.h
deleted file mode 100644
index 8f6c6ad..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/webrtcsession.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_WEBRTCSESSION_H_
-#define TALK_APP_WEBRTC_WEBRTCSESSION_H_
-
-#include <map>
-#include <string>
-#include <vector>
-
-#include "talk/base/logging.h"
-#include "talk/base/messagehandler.h"
-#include "talk/p2p/base/candidate.h"
-#include "talk/p2p/base/session.h"
-#include "talk/session/phone/channel.h"
-#include "talk/session/phone/mediachannel.h"
-#include "talk/session/phone/mediasession.h"
-
-namespace cricket {
-class ChannelManager;
-class Transport;
-class TransportChannel;
-class VoiceChannel;
-class VideoChannel;
-struct ConnectionInfo;
-}
-
-namespace Json {
-class Value;
-}
-
-namespace webrtc {
-
-typedef std::vector<cricket::AudioCodec> AudioCodecs;
-typedef std::vector<cricket::VideoCodec> VideoCodecs;
-
-class WebRtcSession : public cricket::BaseSession {
- public:
-  WebRtcSession(const std::string& id,
-                    bool incoming,
-                    cricket::PortAllocator* allocator,
-                    cricket::ChannelManager* channelmgr,
-                    talk_base::Thread* signaling_thread);
-
-  ~WebRtcSession();
-
-  bool Initiate();
-  bool Connect();
-  bool OnRemoteDescription(cricket::SessionDescription* sdp,
-      const std::vector<cricket::Candidate>& candidates);
-  bool OnInitiateMessage(cricket::SessionDescription* sdp,
-      const std::vector<cricket::Candidate>& candidates);
-  bool CreateVoiceChannel(const std::string& stream_id);
-  bool CreateVideoChannel(const std::string& stream_id);
-  bool RemoveStream(const std::string& stream_id);
-  void RemoveAllStreams();
-
-  // Returns true if we have either a voice or video stream matching this label.
-  bool HasStream(const std::string& label) const;
-  bool HasChannel(bool video) const;
-
-  // Returns true if there's one or more audio channels in the session.
-  bool HasAudioChannel() const;
-
-  // Returns true if there's one or more video channels in the session.
-  bool HasVideoChannel() const;
-
-  bool SetVideoRenderer(const std::string& stream_id,
-                        cricket::VideoRenderer* renderer);
-
-  // This signal occurs when all the streams have been removed.
-  // It is triggered by a successful call to the RemoveAllStream or
-  // the OnRemoteDescription with stream deleted signaling message with the
-  // candidates port equal to 0.
-  sigslot::signal1<WebRtcSession*> SignalRemoveStreamMessage;
-
-  // This signal indicates a stream has been added properly.
-  // It is triggered by a successful call to the OnInitiateMessage or
-  // the OnRemoteDescription and if it's going to the STATE_RECEIVEDACCEPT.
-  sigslot::signal2<const std::string&, bool> SignalAddStream;
-
-  // This signal occurs when one stream is removed with the signaling
-  // message from the remote peer with the candidates port equal to 0.
-  sigslot::signal2<const std::string&, bool> SignalRemoveStream;
-
-  // This signal occurs when the local candidate is ready
-  sigslot::signal2<const cricket::SessionDescription*,
-      const std::vector<cricket::Candidate>&> SignalLocalDescription;
-
-  // This signal triggers when setting up or resuming a call has not been
-  // successful before a certain time out.
-  sigslot::signal0<> SignalFailedCall;
-
-  bool muted() const { return muted_; }
-  bool camera_muted() const { return camera_muted_; }
-  const std::vector<cricket::Candidate>& local_candidates() {
-    return local_candidates_;
-  }
-  void set_incoming(bool incoming) { incoming_ = incoming; }
-  bool incoming() const { return incoming_; }
-  cricket::PortAllocator* port_allocator() const { return port_allocator_; }
-  talk_base::Thread* signaling_thread() const { return signaling_thread_; }
-
-  static const int kDefaultVideoCodecWidth = 640;
-  static const int kDefaultVideoCodecHeight = 480;
-
- protected:
-  // methods from cricket::BaseSession
-  virtual void SetError(cricket::BaseSession::Error error);
-  virtual cricket::TransportChannel* CreateChannel(
-      const std::string& content_name, const std::string& name);
-  virtual cricket::TransportChannel* GetChannel(
-      const std::string& content_name, const std::string& name);
-  virtual void DestroyChannel(
-      const std::string& content_name, const std::string& name);
-
- private:
-  struct StreamInfo {
-    explicit StreamInfo(const std::string stream_id)
-        : channel(NULL),
-          video(false),
-          stream_id(stream_id) {}
-
-    StreamInfo()
-        : channel(NULL),
-          video(false) {}
-    cricket::BaseChannel* channel;
-    bool video;
-    std::string stream_id;
-  };
-  // Not really a map (vector).
-  typedef std::vector<StreamInfo*> StreamMap;
-
-  // methods signaled by the transport
-  void OnRequestSignaling(cricket::Transport* transport);
-  void OnCandidatesReady(cricket::Transport* transport,
-                         const std::vector<cricket::Candidate>& candidates);
-  void OnWritableState(cricket::Transport* transport);
-  void OnTransportError(cricket::Transport* transport);
-  void OnChannelGone(cricket::Transport* transport);
-
-  bool CheckForStreamDeleteMessage(
-      const std::vector<cricket::Candidate>& candidates);
-  void ProcessTerminateAccept(cricket::SessionDescription* desc);
-
-  void UpdateTransportWritableState();
-  bool CheckAllTransportsWritable();
-  void StartTransportTimeout(int timeout);
-  void NotifyTransportState();
-
-  cricket::SessionDescription* CreateOffer();
-  cricket::SessionDescription* CreateAnswer(
-      const cricket::SessionDescription* answer,
-      const cricket::MediaSessionOptions& options);
-
-  // from MessageHandler
-  virtual void OnMessage(talk_base::Message* message);
-
-  virtual cricket::Transport* CreateTransport();
-  cricket::Transport* GetTransport();
-
-  typedef std::map<std::string, cricket::TransportChannel*> TransportChannelMap;
-
-  bool SetVideoCapture(bool capture);
-  void EnableAllStreams();
-  bool SendSignalAddStream(bool video);
-
-  cricket::Transport* transport_;
-  cricket::ChannelManager* channel_manager_;
-  std::vector<StreamInfo*> streams_;
-  TransportChannelMap transport_channels_;
-  bool transports_writable_;
-  bool muted_;
-  bool camera_muted_;
-  int setup_timeout_;
-  std::vector<cricket::Candidate> local_candidates_;
-
-  talk_base::Thread* signaling_thread_;
-  bool incoming_;
-  cricket::PortAllocator* port_allocator_;
-  cricket::MediaSessionDescriptionFactory desc_factory_;
-};
-
-}  // namespace webrtc
-
-#endif  // TALK_APP_WEBRTC_WEBRTCSESSION_H_
diff --git a/third_party/libjingle/source/talk/app/webrtc/webrtcsession_unittest.cc b/third_party/libjingle/source/talk/app/webrtc/webrtcsession_unittest.cc
deleted file mode 100644
index 85339c0..0000000
--- a/third_party/libjingle/source/talk/app/webrtc/webrtcsession_unittest.cc
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <stdio.h>
-
-#include <list>
-
-#include "base/gunit.h"
-#include "base/helpers.h"
-#include "talk/app/webrtc/unittest_utilities.h"
-#include "talk/app/webrtc/webrtcsession.h"
-#include "talk/base/fakenetwork.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/thread.h"
-#include "talk/p2p/base/fakesession.h"
-#include "talk/p2p/base/portallocator.h"
-#include "talk/p2p/base/sessiondescription.h"
-#include "talk/p2p/client/fakeportallocator.h"
-#include "talk/session/phone/mediasessionclient.h"
-
-class WebRtcSessionTest
-    : public sigslot::has_slots<>,
-      public testing::Test {
- public:
-  enum CallbackId {
-    kNone,
-    kOnAddStream,
-    kOnRemoveStream,
-    kOnLocalDescription,
-    kOnFailedCall,
-  };
-
-  WebRtcSessionTest()
-      : callback_ids_(),
-        last_stream_id_(""),
-        last_was_video_(false),
-        last_description_ptr_(NULL),
-        last_candidates_(),
-        session_(NULL),
-        id_(),
-        receiving_(false),
-        allocator_(NULL),
-        channel_manager_(NULL),
-        worker_thread_(NULL),
-        signaling_thread_(NULL) {
-  }
-
-  ~WebRtcSessionTest() {
-    session_.reset();
-  }
-
-  void OnAddStream(const std::string& stream_id, bool video) {
-    callback_ids_.push_back(kOnAddStream);
-    last_stream_id_ = stream_id;
-    last_was_video_ = video;
-  }
-  void OnRemoveStream(const std::string& stream_id, bool video) {
-    callback_ids_.push_back(kOnRemoveStream);
-    last_stream_id_ = stream_id;
-    last_was_video_ = video;
-  }
-  void OnLocalDescription(
-      const cricket::SessionDescription* desc,
-      const std::vector<cricket::Candidate>& candidates) {
-    callback_ids_.push_back(kOnLocalDescription);
-    last_description_ptr_.reset(CopySessionDescription(desc));
-    CopyCandidates(candidates, &last_candidates_);
-  }
-  cricket::SessionDescription* GetLocalDescription(
-      std::vector<cricket::Candidate>* candidates) {
-    if (last_candidates_.empty()) {
-      return NULL;
-    }
-    if (!last_description_ptr_.get()) {
-      return NULL;
-    }
-    CopyCandidates(last_candidates_, candidates);
-    return CopySessionDescription(last_description_ptr_.get());
-  }
-
-  void OnFailedCall() {
-    callback_ids_.push_back(kOnFailedCall);
-  }
-
-  CallbackId PopOldestCallback() {
-    if (callback_ids_.empty()) {
-      return kNone;
-    }
-    const CallbackId return_value = callback_ids_.front();
-    callback_ids_.pop_front();
-    return return_value;
-  }
-
-  CallbackId PeekOldestCallback() {
-    if (callback_ids_.empty()) {
-      return kNone;
-    }
-    const CallbackId return_value = callback_ids_.front();
-    return return_value;
-  }
-
-  void Reset() {
-    callback_ids_.clear();
-    last_stream_id_ = "";
-    last_was_video_ = false;
-    last_description_ptr_.reset();
-    last_candidates_.clear();
-  }
-
-  bool WaitForCallback(CallbackId id, int timeout_ms) {
-    bool success = false;
-    for (int ms = 0; ms < timeout_ms; ms++) {
-      const CallbackId peek_id = PeekOldestCallback();
-      if (peek_id == id) {
-        PopOldestCallback();
-        success = true;
-        break;
-      } else if (peek_id != kNone) {
-        success = false;
-        break;
-      }
-      talk_base::Thread::Current()->ProcessMessages(1);
-    }
-    return success;
-  }
-
-  bool Init(bool receiving) {
-    if (signaling_thread_ != NULL)
-        return false;
-    signaling_thread_ = talk_base::Thread::Current();
-    receiving_ = receiving;
-
-    if (worker_thread_!= NULL)
-        return false;
-    worker_thread_ = talk_base::Thread::Current();
-
-    cricket::FakePortAllocator* fake_port_allocator =
-        new cricket::FakePortAllocator(worker_thread_, NULL);
-
-    allocator_.reset(static_cast<cricket::PortAllocator*>(fake_port_allocator));
-
-    channel_manager_.reset(new cricket::ChannelManager(worker_thread_));
-    if (!channel_manager_->Init())
-      return false;
-
-    talk_base::CreateRandomString(8, &id_);
-
-    session_.reset(new webrtc::WebRtcSession(
-        id_, receiving_ , allocator_.get(),
-        channel_manager_.get(),
-        signaling_thread_));
-    session_->SignalAddStream.connect(this, &WebRtcSessionTest::OnAddStream);
-    session_->SignalRemoveStream.connect(this,
-        &WebRtcSessionTest::OnRemoveStream);
-    session_->SignalLocalDescription.connect(this,
-        &WebRtcSessionTest::OnLocalDescription);
-    session_->SignalFailedCall.connect(this, &WebRtcSessionTest::OnFailedCall);
-    return true;
-  }
-
-  // All session APIs must be called from the signaling thread.
-  bool CallInitiate() {
-    return session_->Initiate();
-  }
-
-  bool CallConnect() {
-    if (!session_->Connect())
-      return false;
-    // This callback does not happen with FakeTransport!
-    if (!WaitForCallback(kOnLocalDescription, 1000)) {
-      return false;
-    }
-    return true;
-  }
-
-  bool CallOnRemoteDescription(
-      cricket::SessionDescription* description,
-      std::vector<cricket::Candidate> candidates) {
-    if (!session_->OnRemoteDescription(description, candidates)) {
-      return false;
-    }
-    if (!WaitForCallback(kOnAddStream, 1000)) {
-      return false;
-    }
-    return true;
-  }
-
-  bool CallOnInitiateMessage(
-      cricket::SessionDescription* description,
-      const std::vector<cricket::Candidate>& candidates) {
-    if (!session_->OnInitiateMessage(description, candidates)) {
-      return false;
-    }
-    if (!WaitForCallback(kOnAddStream, 1000)) {
-      return false;
-    }
-    return true;
-  }
-
-  bool CallCreateVoiceChannel(const std::string& stream_id) {
-    if (!session_->CreateVoiceChannel(stream_id)) {
-      return false;
-    }
-    return true;
-  }
-
-  bool CallCreateVideoChannel(const std::string& stream_id) {
-    if (!session_->CreateVideoChannel(stream_id)) {
-      return false;
-    }
-    return true;
-  }
-
-  bool CallRemoveStream(const std::string& stream_id) {
-    return session_->RemoveStream(stream_id);
-  }
-
-  void CallRemoveAllStreams() {
-    session_->RemoveAllStreams();
-  }
-
-  bool CallHasChannel(const std::string& label) {
-    return session_->HasStream(label);
-  }
-
-  bool CallHasChannel(bool video) {
-    return session_->HasChannel(video);
-  }
-
-  bool CallHasAudioChannel() {
-    return session_->HasAudioChannel();
-  }
-
-  bool CallHasVideoChannel() {
-    return session_->HasVideoChannel();
-  }
-
-  bool CallSetVideoRenderer(const std::string& stream_id,
-                            cricket::VideoRenderer* renderer) {
-    return session_->SetVideoRenderer(stream_id, renderer);
-  }
-
-  const std::vector<cricket::Candidate>& CallLocalCandidates() {
-    return session_->local_candidates();
-  }
-
- private:
-  std::list<CallbackId> callback_ids_;
-
-  std::string last_stream_id_;
-  bool last_was_video_;
-  talk_base::scoped_ptr<cricket::SessionDescription> last_description_ptr_;
-  std::vector<cricket::Candidate> last_candidates_;
-
-  talk_base::scoped_ptr<webrtc::WebRtcSession> session_;
-  std::string id_;
-  bool receiving_;
-
-  talk_base::scoped_ptr<cricket::PortAllocator> allocator_;
-
-  talk_base::scoped_ptr<cricket::ChannelManager> channel_manager_;
-
-  talk_base::Thread* worker_thread_;
-  talk_base::Thread* signaling_thread_;
-};
-
-bool CallbackReceived(WebRtcSessionTest* session, int timeout) {
-  EXPECT_EQ_WAIT(WebRtcSessionTest::kNone, session->PeekOldestCallback(),
-                 timeout);
-  const WebRtcSessionTest::CallbackId peek_id =
-      session->PeekOldestCallback();
-  return peek_id != WebRtcSessionTest::kNone;
-}
-
-TEST_F(WebRtcSessionTest, InitializationReceiveSanity) {
-  const bool kReceiving = true;
-  ASSERT_TRUE(Init(kReceiving));
-  ASSERT_TRUE(CallInitiate());
-
-  // Should return false because no stream has been set up yet.
-  EXPECT_FALSE(CallConnect());
-  const bool kVideo = true;
-  EXPECT_FALSE(CallHasChannel(kVideo));
-  EXPECT_FALSE(CallHasChannel(!kVideo));
-
-  EXPECT_EQ(kNone, PopOldestCallback());
-}
-
-TEST_F(WebRtcSessionTest, AudioSendCallSetUp) {
-  const bool kReceiving = false;
-  ASSERT_TRUE(Init(kReceiving));
-
-  ASSERT_TRUE(CallInitiate());
-
-  ASSERT_TRUE(CallCreateVoiceChannel("Audio"));
-  ASSERT_TRUE(CallConnect());
-
-  std::vector<cricket::Candidate> candidates;
-  cricket::SessionDescription* local_session = GetLocalDescription(
-      &candidates);
-  ASSERT_FALSE(candidates.empty());
-  ASSERT_FALSE(local_session == NULL);
-  if (!CallOnRemoteDescription(local_session, candidates)) {
-      delete local_session;
-      FAIL();
-  }
-
-  // All callbacks should be caught. Assert it.
-  ASSERT_FALSE(CallbackReceived(this, 1000));
-  ASSERT_TRUE(CallHasAudioChannel() &&
-              !CallHasVideoChannel());
-}
-
-TEST_F(WebRtcSessionTest, VideoSendCallSetUp) {
-  const bool kReceiving = false;
-  ASSERT_TRUE(Init(kReceiving));
-
-  ASSERT_TRUE(CallInitiate());
-
-  ASSERT_TRUE(CallCreateVideoChannel("Video"));
-  ASSERT_TRUE(CallConnect());
-
-  std::vector<cricket::Candidate> candidates;
-  cricket::SessionDescription* local_session = GetLocalDescription(
-      &candidates);
-  ASSERT_FALSE(candidates.empty());
-  ASSERT_FALSE(local_session == NULL);
-
-  if (!CallOnRemoteDescription(local_session, candidates)) {
-      delete local_session;
-      FAIL();
-  }
-
-  // All callbacks should be caught. Assert it.
-  ASSERT_FALSE(CallbackReceived(this, 1000));
-  ASSERT_TRUE(!CallHasAudioChannel() &&
-              CallHasVideoChannel());
-}
-
-TEST_F(WebRtcSessionTest, AudioReceiveCallSetUp) {
-  const bool kReceiving = true;
-  const bool video = false;
-
-  ASSERT_TRUE(Init(kReceiving));
-
-  std::vector<cricket::Candidate> candidates;
-  cricket::SessionDescription* local_session =
-      GenerateFakeSession(video, &candidates);
-  ASSERT_FALSE(candidates.empty());
-  ASSERT_FALSE(local_session == NULL);
-  ASSERT_TRUE(CallInitiate());
-  if (!CallOnInitiateMessage(local_session, candidates)) {
-    delete local_session;
-    FAIL();
-  }
-  ASSERT_TRUE(CallConnect());
-  ASSERT_FALSE(CallbackReceived(this, 1000));
-
-  ASSERT_TRUE(CallHasAudioChannel() &&
-              !CallHasVideoChannel());
-}
-
-TEST_F(WebRtcSessionTest, VideoReceiveCallSetUp) {
-  const bool kReceiving = true;
-  const bool video = true;
-
-  ASSERT_TRUE(Init(kReceiving));
-
-  std::vector<cricket::Candidate> candidates;
-  cricket::SessionDescription* local_session =
-      GenerateFakeSession(video, &candidates);
-  ASSERT_FALSE(candidates.empty());
-  ASSERT_FALSE(local_session == NULL);
-  ASSERT_TRUE(CallInitiate());
-  if (!CallOnInitiateMessage(local_session, candidates)) {
-    delete local_session;
-    FAIL();
-  }
-  ASSERT_TRUE(CallConnect());
-  ASSERT_FALSE(CallbackReceived(this, 1000));
-  ASSERT_TRUE(!CallHasAudioChannel() &&
-              CallHasVideoChannel());
-}
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/peerconnection.h b/third_party/libjingle/source/talk/app/webrtcv1/peerconnection.h
deleted file mode 100644
index c28508f..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/peerconnection.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_PEERCONNECTION_H_
-#define TALK_APP_WEBRTC_PEERCONNECTION_H_
-
-// TODO - Add a factory class or some kind of PeerConnection manager
-// to support multiple PeerConnection object instantiation. This class will
-// create ChannelManager object and pass it to PeerConnection object. Otherwise
-// each PeerConnection object will have its own ChannelManager hence MediaEngine
-// and VoiceEngine/VideoEngine.
-
-#include <string>
-
-namespace cricket {
-class VideoRenderer;
-}
-
-namespace talk_base {
-class Thread;
-}
-
-namespace webrtc {
-
-class PeerConnectionObserver {
- public:
-  // serialized signaling message
-  virtual void OnSignalingMessage(const std::string& msg) = 0;
-
-  // Triggered when a remote peer accepts a media connection.
-  virtual void OnAddStream(const std::string& stream_id, bool video) = 0;
-
-  // Triggered when a remote peer closes a media stream.
-  virtual void OnRemoveStream(const std::string& stream_id, bool video) = 0;
-
- protected:
-  // Dtor protected as objects shouldn't be deleted via this interface.
-  virtual ~PeerConnectionObserver() {}
-};
-
-class PeerConnection {
- public:
-  enum ReadyState {
-    NEW = 0,
-    NEGOTIATING,
-    ACTIVE,
-    CLOSED,
-  };
-
-  virtual ~PeerConnection() {}
-
-  // Register a listener
-  virtual void RegisterObserver(PeerConnectionObserver* observer) = 0;
-
-  // SignalingMessage in json format
-  virtual bool SignalingMessage(const std::string& msg) = 0;
-
-  // Asynchronously adds a local stream device to the peer
-  // connection.
-  virtual bool AddStream(const std::string& stream_id, bool video) = 0;
-
-  // Asynchronously removes a local stream device from the peer
-  // connection. The operation is complete when
-  // PeerConnectionObserver::OnRemoveStream is called.
-  virtual bool RemoveStream(const std::string& stream_id) = 0;
-
-  // Info the peerconnection that it is time to return the signaling
-  // information. The operation is complete when
-  // PeerConnectionObserver::OnSignalingMessage is called.
-  virtual bool Connect() = 0;
-
-  // Remove all the streams and tear down the session.
-  // After the Close() is called, the OnSignalingMessage will be invoked
-  // asynchronously. And before OnSignalingMessage is called,
-  // OnRemoveStream will be called for each stream that was active.
-  // TODO: Add an event such as onclose, or onreadystatechanged
-  // when the readystate reaches the closed state (no more streams in the
-  // peerconnection object.
-  virtual bool Close() = 0;
-
-  // Set the audio input & output devices based on the given device name.
-  // An empty device name means to use the default audio device.
-  virtual bool SetAudioDevice(const std::string& wave_in_device,
-                              const std::string& wave_out_device,
-                              int opts) = 0;
-
-  // Set the video renderer for the camera preview.
-  virtual bool SetLocalVideoRenderer(cricket::VideoRenderer* renderer) = 0;
-
-  // Set the video renderer for the specified stream.
-  virtual bool SetVideoRenderer(const std::string& stream_id,
-                                cricket::VideoRenderer* renderer) = 0;
-
-  // Set video capture device
-  // For Chromium the cam_device should use the capture session id.
-  // For standalone app, cam_device is the camera name. It will try to
-  // set the default capture device when cam_device is "".
-  virtual bool SetVideoCapture(const std::string& cam_device) = 0;
-
-  // Returns the state of the PeerConnection object.  See the ReadyState
-  // enum for valid values.
-  virtual ReadyState GetReadyState() = 0;
-};
-
-}  // namespace webrtc
-
-#endif  // TALK_APP_WEBRTC_PEERCONNECTION_H_
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionfactory.cc b/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionfactory.cc
deleted file mode 100644
index 7bf2f89..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionfactory.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/app/webrtcv1/peerconnectionfactory.h"
-
-#include "talk/app/webrtcv1/peerconnectionproxy.h"
-#include "talk/base/logging.h"
-#include "talk/p2p/client/basicportallocator.h"
-#include "talk/session/phone/channelmanager.h"
-
-namespace webrtc {
-
-PeerConnectionFactory::PeerConnectionFactory(
-    cricket::MediaEngineInterface* media_engine,
-    cricket::DeviceManagerInterface* device_manager,
-    talk_base::Thread* worker_thread)
-    : initialized_(false),
-      channel_manager_(new cricket::ChannelManager(media_engine,
-                                                   device_manager,
-                                                   worker_thread)) {
-}
-
-PeerConnectionFactory::PeerConnectionFactory(
-    talk_base::Thread* worker_thread)
-    : initialized_(false),
-      channel_manager_(new cricket::ChannelManager(worker_thread)) {
-}
-
-PeerConnectionFactory::~PeerConnectionFactory() {
-}
-
-bool PeerConnectionFactory::Initialize() {
-  ASSERT(channel_manager_.get() != NULL);
-  initialized_ = channel_manager_->Init();
-  return initialized_;
-}
-
-PeerConnection* PeerConnectionFactory::CreatePeerConnection(
-    cricket::PortAllocator* port_allocator,
-    talk_base::Thread* signaling_thread) {
-  PeerConnectionProxy* pc = NULL;
-  if (initialized_) {
-    pc =  new PeerConnectionProxy(
-        port_allocator, channel_manager_.get(), signaling_thread);
-    if (!pc->Init()) {
-      LOG(LERROR) << "Error in initializing PeerConnection";
-      delete pc;
-      pc = NULL;
-    }
-  } else {
-    LOG(LERROR) << "PeerConnectionFactory is not initialize";
-  }
-  return pc;
-}
-
-}  // namespace webrtc
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionfactory.h b/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionfactory.h
deleted file mode 100644
index ea509d6..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionfactory.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_
-#define TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_
-
-#include <string>
-#include <vector>
-
-#include "talk/base/scoped_ptr.h"
-
-namespace cricket {
-class ChannelManager;
-class DeviceManagerInterface;
-class MediaEngineInterface;
-class PortAllocator;
-}  // namespace cricket
-
-namespace talk_base {
-class SocketAddress;
-class Thread;
-}  // namespace talk_base
-
-namespace webrtc {
-
-class PeerConnection;
-
-class PeerConnectionFactory {
- public:
-  PeerConnectionFactory(cricket::MediaEngineInterface* media_engine,
-                        cricket::DeviceManagerInterface* device_manager,
-                        talk_base::Thread* worker_thread);
-  PeerConnectionFactory(talk_base::Thread* worker_thread);
-
-  virtual ~PeerConnectionFactory();
-  bool Initialize();
-
-  PeerConnection* CreatePeerConnection(
-      cricket::PortAllocator* port_allocator,
-      talk_base::Thread* signaling_thread);
-
- private:
-  bool initialized_;
-  talk_base::scoped_ptr<cricket::ChannelManager> channel_manager_;
-};
-
-}  // namespace webrtc
-
-#endif  // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_
-
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionimpl.cc b/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionimpl.cc
deleted file mode 100644
index be67859..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionimpl.cc
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/app/webrtcv1/peerconnectionimpl.h"
-
-#include "talk/app/webrtcv1/webrtcjson.h"
-#include "talk/app/webrtcv1/webrtcsession.h"
-#include "talk/base/basicpacketsocketfactory.h"
-#include "talk/base/helpers.h"
-#include "talk/base/logging.h"
-#include "talk/base/stringencode.h"
-#include "talk/p2p/base/session.h"
-#include "talk/p2p/client/basicportallocator.h"
-
-namespace webrtc {
-
-
-PeerConnectionImpl::PeerConnectionImpl(
-    cricket::PortAllocator* port_allocator,
-    cricket::ChannelManager* channel_manager,
-    talk_base::Thread* signaling_thread)
-  : port_allocator_(port_allocator),
-    channel_manager_(channel_manager),
-    signaling_thread_(signaling_thread),
-    event_callback_(NULL),
-    session_(NULL) {
-}
-
-PeerConnectionImpl::~PeerConnectionImpl() {
-}
-
-bool PeerConnectionImpl::Init() {
-  std::string sid;
-  talk_base::CreateRandomString(8, &sid);
-  const bool incoming = false;
-  // default outgoing direction
-  session_.reset(CreateMediaSession(sid, incoming));
-  if (session_.get() == NULL) {
-    ASSERT(false && "failed to initialize a session");
-    return false;
-  }
-  return true;
-}
-
-void PeerConnectionImpl::RegisterObserver(PeerConnectionObserver* observer) {
-  // This assert is to catch cases where two observer pointers are registered.
-  // We only support one and if another is to be used, the current one must be
-  // cleared first.
-  ASSERT(observer == NULL || event_callback_ == NULL);
-  event_callback_ = observer;
-}
-
-bool PeerConnectionImpl::SignalingMessage(
-    const std::string& signaling_message) {
-  // Deserialize signaling message
-  cricket::SessionDescription* incoming_sdp = NULL;
-  std::vector<cricket::Candidate> candidates;
-  if (!ParseJsonSignalingMessage(signaling_message,
-                                 &incoming_sdp, &candidates)) {
-    return false;
-  }
-
-  bool ret = false;
-  if (GetReadyState() == NEW) {
-    // set direction to incoming, as message received first
-    session_->set_incoming(true);
-    ret = session_->OnInitiateMessage(incoming_sdp, candidates);
-  } else {
-    ret = session_->OnRemoteDescription(incoming_sdp, candidates);
-  }
-  return ret;
-}
-
-WebRtcSession* PeerConnectionImpl::CreateMediaSession(
-    const std::string& id, bool incoming) {
-  ASSERT(port_allocator_ != NULL);
-  WebRtcSession* session = new WebRtcSession(id, incoming,
-      port_allocator_, channel_manager_, signaling_thread_);
-
-  if (session->Initiate()) {
-    session->SignalAddStream.connect(
-        this,
-        &PeerConnectionImpl::OnAddStream);
-    session->SignalRemoveStream.connect(
-        this,
-        &PeerConnectionImpl::OnRemoveStream);
-    session->SignalLocalDescription.connect(
-        this,
-        &PeerConnectionImpl::OnLocalDescription);
-    session->SignalFailedCall.connect(
-        this,
-        &PeerConnectionImpl::OnFailedCall);
-  } else {
-    delete session;
-    session = NULL;
-  }
-  return session;
-}
-
-bool PeerConnectionImpl::AddStream(const std::string& stream_id, bool video) {
-  bool ret = false;
-  if (session_->HasStream(stream_id)) {
-    ASSERT(false && "A stream with this name already exists");
-  } else {
-    if (!video) {
-      ret = !session_->HasAudioChannel() &&
-            session_->CreateVoiceChannel(stream_id);
-    } else {
-      ret = !session_->HasVideoChannel() &&
-            session_->CreateVideoChannel(stream_id);
-    }
-  }
-  return ret;
-}
-
-bool PeerConnectionImpl::RemoveStream(const std::string& stream_id) {
-  return session_->RemoveStream(stream_id);
-}
-
-void PeerConnectionImpl::OnLocalDescription(
-    const cricket::SessionDescription* desc,
-    const std::vector<cricket::Candidate>& candidates) {
-  if (!desc) {
-    LOG(WARNING) << "no local SDP ";
-    return;
-  }
-
-  std::string message;
-  if (GetJsonSignalingMessage(desc, candidates, &message)) {
-    if (event_callback_) {
-      event_callback_->OnSignalingMessage(message);
-    }
-  }
-}
-
-void PeerConnectionImpl::OnFailedCall() {
-  // TODO: implement.
-}
-
-bool PeerConnectionImpl::SetAudioDevice(const std::string& wave_in_device,
-                                        const std::string& wave_out_device,
-                                        int opts) {
-  return channel_manager_->SetAudioOptions(wave_in_device,
-                                           wave_out_device,
-                                           opts);
-}
-
-bool PeerConnectionImpl::SetLocalVideoRenderer(
-    cricket::VideoRenderer* renderer) {
-  return channel_manager_->SetLocalRenderer(renderer);
-}
-
-bool PeerConnectionImpl::SetVideoRenderer(const std::string& stream_id,
-                                          cricket::VideoRenderer* renderer) {
-  return session_->SetVideoRenderer(stream_id, renderer);
-}
-
-bool PeerConnectionImpl::SetVideoCapture(const std::string& cam_device) {
-  return channel_manager_->SetVideoOptions(cam_device);
-}
-
-bool PeerConnectionImpl::Connect() {
-  return session_->Connect();
-}
-
-// TODO - Close is not used anymore, should be removed.
-bool PeerConnectionImpl::Close() {
-  session_->RemoveAllStreams();
-  return true;
-}
-
-void PeerConnectionImpl::OnAddStream(const std::string& stream_id,
-                                     bool video) {
-  if (event_callback_) {
-    event_callback_->OnAddStream(stream_id, video);
-  }
-}
-
-void PeerConnectionImpl::OnRemoveStream(const std::string& stream_id,
-                                        bool video) {
-  if (event_callback_) {
-    event_callback_->OnRemoveStream(stream_id, video);
-  }
-}
-
-PeerConnectionImpl::ReadyState PeerConnectionImpl::GetReadyState() {
-  ReadyState ready_state;
-  cricket::BaseSession::State state = session_->state();
-  if (state == cricket::BaseSession::STATE_INIT) {
-    ready_state = NEW;
-  } else if (state == cricket::BaseSession::STATE_INPROGRESS) {
-    ready_state = ACTIVE;
-  } else if (state == cricket::BaseSession::STATE_DEINIT) {
-    ready_state = CLOSED;
-  } else {
-    ready_state = NEGOTIATING;
-  }
-  return ready_state;
-}
-
-}  // namespace webrtc
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionimpl.h b/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionimpl.h
deleted file mode 100644
index 8cb2414..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionimpl.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_PEERCONNECTIONIMPL_H_
-#define TALK_APP_WEBRTC_PEERCONNECTIONIMPL_H_
-
-#include <string>
-#include <vector>
-
-#include "talk/app/webrtcv1/peerconnection.h"
-#include "talk/base/sigslot.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/thread.h"
-#include "talk/session/phone/channelmanager.h"
-
-namespace cricket {
-class ChannelManager;
-class PortAllocator;
-class SessionDescription;
-}
-
-namespace webrtc {
-class WebRtcSession;
-
-class PeerConnectionImpl : public PeerConnection,
-                           public sigslot::has_slots<> {
- public:
-  PeerConnectionImpl(cricket::PortAllocator* port_allocator,
-                     cricket::ChannelManager* channel_manager,
-                     talk_base::Thread* signaling_thread);
-  virtual ~PeerConnectionImpl();
-
-  // PeerConnection interfaces
-  virtual void RegisterObserver(PeerConnectionObserver* observer);
-  virtual bool SignalingMessage(const std::string& msg);
-  virtual bool AddStream(const std::string& stream_id, bool video);
-  virtual bool RemoveStream(const std::string& stream_id);
-  virtual bool Connect();
-  virtual bool Close();
-  virtual bool SetAudioDevice(const std::string& wave_in_device,
-                              const std::string& wave_out_device, int opts);
-  virtual bool SetLocalVideoRenderer(cricket::VideoRenderer* renderer);
-  virtual bool SetVideoRenderer(const std::string& stream_id,
-                                cricket::VideoRenderer* renderer);
-  virtual bool SetVideoCapture(const std::string& cam_device);
-  virtual ReadyState GetReadyState();
-
-  cricket::ChannelManager* channel_manager() {
-    return channel_manager_;
-  }
-
-  // Callbacks from PeerConnectionImplCallbacks
-  void OnAddStream(const std::string& stream_id, bool video);
-  void OnRemoveStream(const std::string& stream_id, bool video);
-  void OnLocalDescription(
-      const cricket::SessionDescription* desc,
-      const std::vector<cricket::Candidate>& candidates);
-  void OnFailedCall();
-  bool Init();
-
- private:
-  WebRtcSession* CreateMediaSession(const std::string& id, bool incoming);
-
-  cricket::PortAllocator* port_allocator_;
-  cricket::ChannelManager* channel_manager_;
-  talk_base::Thread* signaling_thread_;
-  PeerConnectionObserver* event_callback_;
-  talk_base::scoped_ptr<WebRtcSession> session_;
-};
-
-}  // namespace webrtc
-
-#endif  // TALK_APP_WEBRTC_PEERCONNECTIONIMPL_H_
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionproxy.cc b/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionproxy.cc
deleted file mode 100644
index 3994b00..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionproxy.cc
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/app/webrtcv1/peerconnectionproxy.h"
-
-#include "talk/app/webrtcv1/peerconnectionimpl.h"
-#include "talk/base/logging.h"
-
-namespace webrtc {
-
-enum {
-  MSG_WEBRTC_ADDSTREAM = 1,
-  MSG_WEBRTC_CLOSE,
-  MSG_WEBRTC_CONNECT,
-  MSG_WEBRTC_INIT,
-  MSG_WEBRTC_REGISTEROBSERVER,
-  MSG_WEBRTC_RELEASE,
-  MSG_WEBRTC_REMOVESTREAM,
-  MSG_WEBRTC_SETAUDIODEVICE,
-  MSG_WEBRTC_SETLOCALRENDERER,
-  MSG_WEBRTC_SETVIDEOCAPTURE,
-  MSG_WEBRTC_SETVIDEORENDERER,
-  MSG_WEBRTC_SIGNALINGMESSAGE,
-  MSG_WEBRTC_GETREADYSTATE,
-};
-
-struct AddStreamParams : public talk_base::MessageData {
-  AddStreamParams(const std::string& stream_id, bool video)
-      : stream_id(stream_id),
-        video(video),
-        result(false) {}
-
-  std::string stream_id;
-  bool video;
-  bool result;
-};
-
-struct RemoveStreamParams : public talk_base::MessageData {
-  explicit RemoveStreamParams(const std::string& stream_id)
-      : stream_id(stream_id),
-        result(false) {}
-
-  std::string stream_id;
-  bool result;
-};
-
-struct SignalingMsgParams : public talk_base::MessageData {
-  explicit SignalingMsgParams(const std::string& signaling_message)
-      : signaling_message(signaling_message),
-        result(false) {}
-
-  std::string signaling_message;
-  bool result;
-};
-
-struct SetAudioDeviceParams : public talk_base::MessageData {
-  SetAudioDeviceParams(const std::string& wave_in_device,
-                       const std::string& wave_out_device,
-                       int opts)
-      : wave_in_device(wave_in_device), wave_out_device(wave_out_device),
-        opts(opts), result(false) {}
-
-  std::string wave_in_device;
-  std::string wave_out_device;
-  int opts;
-  bool result;
-};
-
-struct SetLocalRendererParams : public talk_base::MessageData {
-  explicit SetLocalRendererParams(cricket::VideoRenderer* renderer)
-      : renderer(renderer), result(false) {}
-
-  cricket::VideoRenderer* renderer;
-  bool result;
-};
-
-struct SetVideoRendererParams : public talk_base::MessageData {
-  SetVideoRendererParams(const std::string& stream_id,
-                         cricket::VideoRenderer* renderer)
-      : stream_id(stream_id), renderer(renderer), result(false) {}
-
-  std::string stream_id;
-  cricket::VideoRenderer* renderer;
-  bool result;
-};
-
-struct SetVideoCaptureParams : public talk_base::MessageData {
-  explicit SetVideoCaptureParams(const std::string& cam_device)
-      : cam_device(cam_device), result(false) {}
-
-  std::string cam_device;
-  bool result;
-};
-
-struct RegisterObserverParams : public talk_base::MessageData {
-  explicit RegisterObserverParams(PeerConnectionObserver* observer)
-      : observer(observer), result(false) {}
-
-  PeerConnectionObserver* observer;
-  bool result;
-};
-
-struct ResultParams : public talk_base::MessageData {
-  ResultParams()
-      : result(false) {}
-
-  bool result;
-};
-
-PeerConnectionProxy::PeerConnectionProxy(
-    cricket::PortAllocator* port_allocator,
-    cricket::ChannelManager* channel_manager,
-      talk_base::Thread* signaling_thread)
-  : peerconnection_impl_(new PeerConnectionImpl(port_allocator,
-                             channel_manager, signaling_thread)),
-    signaling_thread_(signaling_thread) {
-}
-
-PeerConnectionProxy::~PeerConnectionProxy() {
-  ResultParams params;
-  Send(MSG_WEBRTC_RELEASE, &params);
-}
-
-bool PeerConnectionProxy::Init() {
-  ResultParams params;
-  return (Send(MSG_WEBRTC_INIT, &params) && params.result);
-}
-
-void PeerConnectionProxy::RegisterObserver(PeerConnectionObserver* observer) {
-  RegisterObserverParams params(observer);
-  Send(MSG_WEBRTC_REGISTEROBSERVER, &params);
-}
-
-bool PeerConnectionProxy::SignalingMessage(
-    const std::string& signaling_message) {
-  SignalingMsgParams params(signaling_message);
-  return (Send(MSG_WEBRTC_SIGNALINGMESSAGE, &params) && params.result);
-}
-
-bool PeerConnectionProxy::AddStream(const std::string& stream_id, bool video) {
-  AddStreamParams params(stream_id, video);
-  return (Send(MSG_WEBRTC_ADDSTREAM, &params) && params.result);
-}
-
-bool PeerConnectionProxy::RemoveStream(const std::string& stream_id) {
-  RemoveStreamParams params(stream_id);
-  return (Send(MSG_WEBRTC_REMOVESTREAM, &params) && params.result);
-}
-
-bool PeerConnectionProxy::SetAudioDevice(const std::string& wave_in_device,
-                                         const std::string& wave_out_device,
-                                         int opts) {
-  SetAudioDeviceParams params(wave_in_device, wave_out_device, opts);
-  return (Send(MSG_WEBRTC_SETAUDIODEVICE, &params) && params.result);
-}
-
-bool PeerConnectionProxy::SetLocalVideoRenderer(
-    cricket::VideoRenderer* renderer) {
-  SetLocalRendererParams params(renderer);
-  return (Send(MSG_WEBRTC_SETLOCALRENDERER, &params) && params.result);
-}
-
-bool PeerConnectionProxy::SetVideoRenderer(const std::string& stream_id,
-                                          cricket::VideoRenderer* renderer) {
-  SetVideoRendererParams params(stream_id, renderer);
-  return (Send(MSG_WEBRTC_SETVIDEORENDERER, &params) && params.result);
-}
-
-bool PeerConnectionProxy::SetVideoCapture(const std::string& cam_device) {
-  SetVideoCaptureParams params(cam_device);
-  return (Send(MSG_WEBRTC_SETVIDEOCAPTURE, &params) && params.result);
-}
-
-PeerConnection::ReadyState PeerConnectionProxy::GetReadyState() {
-  PeerConnection::ReadyState ready_state = NEW;
-  Send(MSG_WEBRTC_GETREADYSTATE,
-       reinterpret_cast<talk_base::MessageData*>(&ready_state));
-  return ready_state;
-}
-
-bool PeerConnectionProxy::Connect() {
-  ResultParams params;
-  return (Send(MSG_WEBRTC_CONNECT, &params) && params.result);
-}
-
-bool PeerConnectionProxy::Close() {
-  ResultParams params;
-  return (Send(MSG_WEBRTC_CLOSE, &params) && params.result);
-}
-
-bool PeerConnectionProxy::Send(uint32 id, talk_base::MessageData* data) {
-  if (!signaling_thread_)
-    return false;
-  signaling_thread_->Send(this, id, data);
-  return true;
-}
-
-void PeerConnectionProxy::OnMessage(talk_base::Message* message) {
-  talk_base::MessageData* data = message->pdata;
-  switch (message->message_id) {
-    case MSG_WEBRTC_ADDSTREAM: {
-      AddStreamParams* params = reinterpret_cast<AddStreamParams*>(data);
-      params->result = peerconnection_impl_->AddStream(
-          params->stream_id, params->video);
-      break;
-    }
-    case MSG_WEBRTC_SIGNALINGMESSAGE: {
-      SignalingMsgParams* params =
-          reinterpret_cast<SignalingMsgParams*>(data);
-      params->result = peerconnection_impl_->SignalingMessage(
-          params->signaling_message);
-      break;
-    }
-    case MSG_WEBRTC_REMOVESTREAM: {
-      RemoveStreamParams* params = reinterpret_cast<RemoveStreamParams*>(data);
-      params->result = peerconnection_impl_->RemoveStream(
-          params->stream_id);
-      break;
-    }
-    case MSG_WEBRTC_SETAUDIODEVICE: {
-      SetAudioDeviceParams* params =
-          reinterpret_cast<SetAudioDeviceParams*>(data);
-      params->result = peerconnection_impl_->SetAudioDevice(
-          params->wave_in_device, params->wave_out_device, params->opts);
-      break;
-    }
-    case MSG_WEBRTC_SETLOCALRENDERER: {
-      SetLocalRendererParams* params =
-          reinterpret_cast<SetLocalRendererParams*>(data);
-      params->result = peerconnection_impl_->SetLocalVideoRenderer(
-          params->renderer);
-      break;
-    }
-    case MSG_WEBRTC_SETVIDEOCAPTURE: {
-      SetVideoCaptureParams* params =
-          reinterpret_cast<SetVideoCaptureParams*>(data);
-      params->result = peerconnection_impl_->SetVideoCapture(
-          params->cam_device);
-      break;
-    }
-    case MSG_WEBRTC_GETREADYSTATE: {
-      PeerConnection::ReadyState* ready_state =
-          reinterpret_cast<PeerConnection::ReadyState*>(data);
-      *ready_state = peerconnection_impl_->GetReadyState();
-      break;
-    }
-    case MSG_WEBRTC_SETVIDEORENDERER: {
-      SetVideoRendererParams* params =
-          reinterpret_cast<SetVideoRendererParams*>(data);
-      params->result = peerconnection_impl_->SetVideoRenderer(
-          params->stream_id, params->renderer);
-      break;
-    }
-    case MSG_WEBRTC_CONNECT: {
-      ResultParams* params =
-          reinterpret_cast<ResultParams*>(data);
-      params->result = peerconnection_impl_->Connect();
-      break;
-    }
-    case MSG_WEBRTC_CLOSE: {
-      ResultParams* params =
-          reinterpret_cast<ResultParams*>(data);
-      params->result = peerconnection_impl_->Close();
-      break;
-    }
-    case MSG_WEBRTC_INIT: {
-      ResultParams* params =
-          reinterpret_cast<ResultParams*>(data);
-      params->result = peerconnection_impl_->Init();
-      break;
-    }
-    case MSG_WEBRTC_REGISTEROBSERVER: {
-      RegisterObserverParams* params =
-          reinterpret_cast<RegisterObserverParams*>(data);
-      peerconnection_impl_->RegisterObserver(params->observer);
-      break;
-    }
-    case MSG_WEBRTC_RELEASE: {
-      peerconnection_impl_.reset();
-      break;
-    }
-    default: {
-      ASSERT(false);
-      break;
-    }
-  }
-}
-
-}  // namespace webrtc
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionproxy.h b/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionproxy.h
deleted file mode 100644
index 8d7fc26..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/peerconnectionproxy.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_PEERCONNECTIONPROXY_H_
-#define TALK_APP_WEBRTC_PEERCONNECTIONPROXY_H_
-
-#include <string>
-
-#include "talk/app/webrtcv1/peerconnection.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/thread.h"
-
-namespace cricket {
-class ChannelManager;
-class PortAllocator;
-}
-
-namespace webrtc {
-
-class PeerConnectionImpl;
-
-class PeerConnectionProxy : public PeerConnection,
-                            public talk_base::MessageHandler {
- public:
-  PeerConnectionProxy(cricket::PortAllocator* port_allocator,
-                      cricket::ChannelManager* channel_manager,
-                      talk_base::Thread* signaling_thread);
-  virtual ~PeerConnectionProxy();
-
-  // PeerConnection interface implementation.
-  virtual void RegisterObserver(PeerConnectionObserver* observer);
-  virtual bool SignalingMessage(const std::string& msg);
-  virtual bool AddStream(const std::string& stream_id, bool video);
-  virtual bool RemoveStream(const std::string& stream_id);
-  virtual bool Connect();
-  virtual bool Close();
-  virtual bool SetAudioDevice(const std::string& wave_in_device,
-                              const std::string& wave_out_device, int opts);
-  virtual bool SetLocalVideoRenderer(cricket::VideoRenderer* renderer);
-  virtual bool SetVideoRenderer(const std::string& stream_id,
-                                cricket::VideoRenderer* renderer);
-  virtual bool SetVideoCapture(const std::string& cam_device);
-  virtual ReadyState GetReadyState();
-
- private:
-  bool Init();
-  bool Send(uint32 id, talk_base::MessageData* data);
-  virtual void OnMessage(talk_base::Message* message);
-
-  talk_base::scoped_ptr<PeerConnectionImpl> peerconnection_impl_;
-  talk_base::Thread* signaling_thread_;
-
-  friend class PeerConnectionFactory;
-};
-}
-
-#endif  // TALK_APP_WEBRTC_PEERCONNECTIONPROXY_H_
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/webrtcjson.cc b/third_party/libjingle/source/talk/app/webrtcv1/webrtcjson.cc
deleted file mode 100644
index 4cc4239..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/webrtcjson.cc
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/app/webrtcv1/webrtcjson.h"
-
-#ifdef WEBRTC_RELATIVE_PATH
-#include "json/json.h"
-#else
-#include "third_party/jsoncpp/json.h"
-#endif
-
-// TODO: Remove webrtcsession.h once we can get size from signaling.
-// webrtcsession.h is for kDefaultVideoCodecWidth and kDefaultVideoCodecHeight.
-#include "talk/app/webrtcv1/webrtcsession.h"
-#include "talk/base/json.h"
-#include "talk/base/logging.h"
-#include "talk/base/stringutils.h"
-#include "talk/session/phone/codec.h"
-#include "talk/session/phone/mediasessionclient.h"
-
-namespace webrtc {
-static const int kIceComponent = 1;
-static const int kIceFoundation = 1;
-
-static std::vector<Json::Value> ReadValues(const Json::Value& value,
-                                           const std::string& key);
-
-static bool BuildMediaMessage(
-    const cricket::ContentInfo& content_info,
-    const std::vector<cricket::Candidate>& candidates,
-    bool video,
-    Json::Value* value);
-
-static bool BuildRtpMapParams(
-    const cricket::ContentInfo& audio_offer,
-    bool video,
-    std::vector<Json::Value>* rtpmap);
-
-static bool BuildAttributes(const std::vector<cricket::Candidate>& candidates,
-                            bool video,
-                            std::vector<Json::Value>* jcandidates);
-
-static std::string Serialize(const Json::Value& value);
-static bool Deserialize(const std::string& message, Json::Value* value);
-
-static bool ParseRtcpMux(const Json::Value& value);
-static bool ParseAudioCodec(const Json::Value& value,
-                            cricket::AudioContentDescription* content);
-static bool ParseVideoCodec(const Json::Value& value,
-                            cricket::VideoContentDescription* content);
-static bool ParseIceCandidates(const Json::Value& value,
-                               std::vector<cricket::Candidate>* candidates);
-
-static Json::Value ReadValue(const Json::Value& value, const std::string& key);
-static std::string ReadString(const Json::Value& value, const std::string& key);
-static uint32 ReadUInt(const Json::Value& value, const std::string& key);
-
-static void Append(Json::Value* object, const std::string& key, bool value);
-static void Append(Json::Value* object, const std::string& key, int value);
-static void Append(Json::Value* object, const std::string& key,
-                   const std::string& value);
-static void Append(Json::Value* object, const std::string& key, uint32 value);
-static void Append(Json::Value* object, const std::string& key,
-                   const Json::Value& value);
-static void Append(Json::Value* object,
-                   const std::string& key,
-                   const std::vector<Json::Value>& values);
-
-bool GetJsonSignalingMessage(
-    const cricket::SessionDescription* sdp,
-    const std::vector<cricket::Candidate>& candidates,
-    std::string* signaling_message) {
-  const cricket::ContentInfo* audio_content = GetFirstAudioContent(sdp);
-  const cricket::ContentInfo* video_content = GetFirstVideoContent(sdp);
-
-  std::vector<Json::Value> media;
-  if (audio_content) {
-    Json::Value value;
-    BuildMediaMessage(*audio_content, candidates, false, &value);
-    media.push_back(value);
-  }
-
-  if (video_content) {
-    Json::Value value;
-    BuildMediaMessage(*video_content, candidates, true, &value);
-    media.push_back(value);
-  }
-
-  Json::Value signal;
-  Append(&signal, "media", media);
-
-  // Now serialize.
-  *signaling_message = Serialize(signal);
-
-  return true;
-}
-
-bool BuildMediaMessage(
-    const cricket::ContentInfo& content_info,
-    const std::vector<cricket::Candidate>& candidates,
-    bool video,
-    Json::Value* params) {
-  if (video) {
-    Append(params, "label", 2);  // always video 2
-  } else {
-    Append(params, "label", 1);  // always audio 1
-  }
-
-  const cricket::MediaContentDescription* media_info =
-  static_cast<const cricket::MediaContentDescription*> (
-      content_info.description);
-  if (media_info->rtcp_mux()) {
-    Append(params, "rtcp_mux", true);
-  }
-
-  std::vector<Json::Value> rtpmap;
-  if (!BuildRtpMapParams(content_info, video, &rtpmap)) {
-    return false;
-  }
-
-  Append(params, "rtpmap", rtpmap);
-
-  Json::Value attributes;
-  std::vector<Json::Value> jcandidates;
-
-  if (!BuildAttributes(candidates, video, &jcandidates)) {
-    return false;
-  }
-  Append(&attributes, "candidate", jcandidates);
-  Append(params, "attributes", attributes);
-  return true;
-}
-
-bool BuildRtpMapParams(const cricket::ContentInfo& content_info,
-                       bool video,
-                       std::vector<Json::Value>* rtpmap) {
-  if (!video) {
-    const cricket::AudioContentDescription* audio_offer =
-        static_cast<const cricket::AudioContentDescription*>(
-            content_info.description);
-
-    std::vector<cricket::AudioCodec>::const_iterator iter =
-        audio_offer->codecs().begin();
-    std::vector<cricket::AudioCodec>::const_iterator iter_end =
-        audio_offer->codecs().end();
-    for (; iter != iter_end; ++iter) {
-      Json::Value codec;
-      std::string codec_str(std::string("audio/").append(iter->name));
-      // adding clockrate
-      Append(&codec, "clockrate", iter->clockrate);
-      Append(&codec, "codec", codec_str);
-      Json::Value codec_id;
-      Append(&codec_id, talk_base::ToString(iter->id), codec);
-      rtpmap->push_back(codec_id);
-    }
-  } else {
-    const cricket::VideoContentDescription* video_offer =
-        static_cast<const cricket::VideoContentDescription*>(
-            content_info.description);
-
-    std::vector<cricket::VideoCodec>::const_iterator iter =
-        video_offer->codecs().begin();
-    std::vector<cricket::VideoCodec>::const_iterator iter_end =
-        video_offer->codecs().end();
-    for (; iter != iter_end; ++iter) {
-      Json::Value codec;
-      std::string codec_str(std::string("video/").append(iter->name));
-      Append(&codec, "codec", codec_str);
-      Json::Value codec_id;
-      Append(&codec_id, talk_base::ToString(iter->id), codec);
-      rtpmap->push_back(codec_id);
-    }
-  }
-  return true;
-}
-
-bool BuildAttributes(const std::vector<cricket::Candidate>& candidates,
-                     bool video,
-                     std::vector<Json::Value>* jcandidates) {
-  std::vector<cricket::Candidate>::const_iterator iter =
-      candidates.begin();
-  std::vector<cricket::Candidate>::const_iterator iter_end =
-      candidates.end();
-  for (; iter != iter_end; ++iter) {
-    if ((video && (!iter->name().compare("video_rtcp") ||
-                  (!iter->name().compare("video_rtp")))) ||
-        (!video && (!iter->name().compare("rtp") ||
-                   (!iter->name().compare("rtcp"))))) {
-      Json::Value candidate;
-      Append(&candidate, "component", kIceComponent);
-      Append(&candidate, "foundation", kIceFoundation);
-      Append(&candidate, "generation", iter->generation());
-      Append(&candidate, "proto", iter->protocol());
-      Append(&candidate, "priority", iter->preference_str());
-      Append(&candidate, "ip", iter->address().IPAsString());
-      Append(&candidate, "port", iter->address().PortAsString());
-      Append(&candidate, "type", iter->type());
-      Append(&candidate, "name", iter->name());
-      Append(&candidate, "network_name", iter->network_name());
-      Append(&candidate, "username", iter->username());
-      Append(&candidate, "password", iter->password());
-      jcandidates->push_back(candidate);
-    }
-  }
-  return true;
-}
-
-std::string Serialize(const Json::Value& value) {
-  Json::StyledWriter writer;
-  return writer.write(value);
-}
-
-bool Deserialize(const std::string& message, Json::Value* value) {
-  Json::Reader reader;
-  return reader.parse(message, *value);
-}
-
-bool ParseJsonSignalingMessage(const std::string& signaling_message,
-                               cricket::SessionDescription** sdp,
-                               std::vector<cricket::Candidate>* candidates) {
-  ASSERT(!(*sdp));  // expect this to be NULL
-  // first deserialize message
-  Json::Value value;
-  if (!Deserialize(signaling_message, &value)) {
-    return false;
-  }
-
-  // get media objects
-  std::vector<Json::Value> mlines = ReadValues(value, "media");
-  if (mlines.empty()) {
-    // no m-lines found
-    return false;
-  }
-
-  *sdp = new cricket::SessionDescription();
-
-  // get codec information
-  for (size_t i = 0; i < mlines.size(); ++i) {
-    if (mlines[i]["label"].asInt() == 1) {
-      cricket::AudioContentDescription* audio_content =
-          new cricket::AudioContentDescription();
-      ParseAudioCodec(mlines[i], audio_content);
-      audio_content->set_rtcp_mux(ParseRtcpMux(mlines[i]));
-      audio_content->SortCodecs();
-      (*sdp)->AddContent(cricket::CN_AUDIO,
-                         cricket::NS_JINGLE_RTP, audio_content);
-      ParseIceCandidates(mlines[i], candidates);
-    } else {
-      cricket::VideoContentDescription* video_content =
-          new cricket::VideoContentDescription();
-      ParseVideoCodec(mlines[i], video_content);
-
-      video_content->set_rtcp_mux(ParseRtcpMux(mlines[i]));
-      video_content->SortCodecs();
-      (*sdp)->AddContent(cricket::CN_VIDEO,
-                         cricket::NS_JINGLE_RTP, video_content);
-      ParseIceCandidates(mlines[i], candidates);
-    }
-  }
-  return true;
-}
-
-bool ParseRtcpMux(const Json::Value& value) {
-  Json::Value rtcp_mux(ReadValue(value, "rtcp_mux"));
-  if (!rtcp_mux.empty()) {
-    if (rtcp_mux.asBool()) {
-      return true;
-    }
-  }
-  return false;
-}
-
-bool ParseAudioCodec(const Json::Value& value,
-                     cricket::AudioContentDescription* content) {
-  std::vector<Json::Value> rtpmap(ReadValues(value, "rtpmap"));
-  if (rtpmap.empty())
-    return false;
-
-  std::vector<Json::Value>::const_iterator iter =
-      rtpmap.begin();
-  std::vector<Json::Value>::const_iterator iter_end =
-      rtpmap.end();
-  for (; iter != iter_end; ++iter) {
-    cricket::AudioCodec codec;
-    std::string pltype(iter->begin().memberName());
-    talk_base::FromString(pltype, &codec.id);
-    Json::Value codec_info((*iter)[pltype]);
-    std::string codec_name(ReadString(codec_info, "codec"));
-    std::vector<std::string> tokens;
-    talk_base::split(codec_name, '/', &tokens);
-    codec.name = tokens[1];
-    codec.clockrate = ReadUInt(codec_info, "clockrate");
-    content->AddCodec(codec);
-  }
-
-  return true;
-}
-
-bool ParseVideoCodec(const Json::Value& value,
-                     cricket::VideoContentDescription* content) {
-  std::vector<Json::Value> rtpmap(ReadValues(value, "rtpmap"));
-  if (rtpmap.empty())
-    return false;
-
-  std::vector<Json::Value>::const_iterator iter =
-      rtpmap.begin();
-  std::vector<Json::Value>::const_iterator iter_end =
-      rtpmap.end();
-  for (; iter != iter_end; ++iter) {
-    cricket::VideoCodec codec;
-    std::string pltype(iter->begin().memberName());
-    talk_base::FromString(pltype, &codec.id);
-    Json::Value codec_info((*iter)[pltype]);
-    std::vector<std::string> tokens;
-    talk_base::split(codec_info["codec"].asString(), '/', &tokens);
-    codec.name = tokens[1];
-    // TODO: Remove once we can get size from signaling message.
-    codec.width = WebRtcSession::kDefaultVideoCodecWidth;
-    codec.height = WebRtcSession::kDefaultVideoCodecHeight;
-    content->AddCodec(codec);
-  }
-  return true;
-}
-
-bool ParseIceCandidates(const Json::Value& value,
-                        std::vector<cricket::Candidate>* candidates) {
-  Json::Value attributes(ReadValue(value, "attributes"));
-  std::string ice_pwd(ReadString(attributes, "ice-pwd"));
-  std::string ice_ufrag(ReadString(attributes, "ice-ufrag"));
-
-  std::vector<Json::Value> jcandidates(ReadValues(attributes, "candidate"));
-
-  std::vector<Json::Value>::const_iterator iter =
-      jcandidates.begin();
-  std::vector<Json::Value>::const_iterator iter_end =
-      jcandidates.end();
-  for (; iter != iter_end; ++iter) {
-    cricket::Candidate cand;
-
-    unsigned int generation;
-    if (!GetUIntFromJsonObject(*iter, "generation", &generation))
-      return false;
-    cand.set_generation_str(talk_base::ToString(generation));
-
-    std::string proto;
-    if (!GetStringFromJsonObject(*iter, "proto", &proto))
-      return false;
-    cand.set_protocol(proto);
-
-    std::string priority;
-    if (!GetStringFromJsonObject(*iter, "priority", &priority))
-      return false;
-    cand.set_preference_str(priority);
-
-    std::string str;
-    talk_base::SocketAddress addr;
-    if (!GetStringFromJsonObject(*iter, "ip", &str))
-      return false;
-    addr.SetIP(str);
-    if (!GetStringFromJsonObject(*iter, "port", &str))
-      return false;
-    int port;
-    if (!talk_base::FromString(str, &port))
-      return false;
-    addr.SetPort(port);
-    cand.set_address(addr);
-
-    if (!GetStringFromJsonObject(*iter, "type", &str))
-      return false;
-    cand.set_type(str);
-
-    if (!GetStringFromJsonObject(*iter, "name", &str))
-      return false;
-    cand.set_name(str);
-
-    if (!GetStringFromJsonObject(*iter, "network_name", &str))
-      return false;
-    cand.set_network_name(str);
-
-    if (!GetStringFromJsonObject(*iter, "username", &str))
-      return false;
-    cand.set_username(str);
-
-    if (!GetStringFromJsonObject(*iter, "password", &str))
-      return false;
-    cand.set_password(str);
-
-    candidates->push_back(cand);
-  }
-  return true;
-}
-
-std::vector<Json::Value> ReadValues(
-    const Json::Value& value, const std::string& key) {
-  std::vector<Json::Value> objects;
-  for (Json::Value::ArrayIndex i = 0; i < value[key].size(); ++i) {
-    objects.push_back(value[key][i]);
-  }
-  return objects;
-}
-
-Json::Value ReadValue(const Json::Value& value, const std::string& key) {
-  return value[key];
-}
-
-std::string ReadString(const Json::Value& value, const std::string& key) {
-  return value[key].asString();
-}
-
-uint32 ReadUInt(const Json::Value& value, const std::string& key) {
-  return value[key].asUInt();
-}
-
-void Append(Json::Value* object, const std::string& key, bool value) {
-  (*object)[key] = Json::Value(value);
-}
-
-void Append(Json::Value* object, const std::string& key, int value) {
-  (*object)[key] = Json::Value(value);
-}
-
-void Append(Json::Value* object, const std::string& key,
-            const std::string& value) {
-  (*object)[key] = Json::Value(value);
-}
-
-void Append(Json::Value* object, const std::string& key, uint32 value) {
-  (*object)[key] = Json::Value(value);
-}
-
-void Append(Json::Value* object, const std::string& key,
-            const Json::Value& value) {
-  (*object)[key] = value;
-}
-
-void Append(Json::Value* object,
-            const std::string & key,
-            const std::vector<Json::Value>& values) {
-  for (std::vector<Json::Value>::const_iterator iter = values.begin();
-      iter != values.end(); ++iter) {
-    (*object)[key].append(*iter);
-  }
-}
-
-}  // namespace webrtc
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/webrtcjson.h b/third_party/libjingle/source/talk/app/webrtcv1/webrtcjson.h
deleted file mode 100644
index d923f83..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/webrtcjson.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_WEBRTCJSON_H_
-#define TALK_APP_WEBRTC_WEBRTCJSON_H_
-
-#include <string>
-
-#include "talk/p2p/base/candidate.h"
-#include "talk/session/phone/codec.h"
-
-namespace Json {
-class Value;
-}
-
-namespace cricket {
-class AudioContentDescription;
-class VideoContentDescription;
-struct ContentInfo;
-class SessionDescription;
-}
-
-namespace webrtc {
-
-bool GetJsonSignalingMessage(
-    const cricket::SessionDescription* sdp,
-    const std::vector<cricket::Candidate>& candidates,
-    std::string* signaling_message);
-
-bool ParseJsonSignalingMessage(const std::string& signaling_message,
-                               cricket::SessionDescription** sdp,
-                               std::vector<cricket::Candidate>* candidates);
-}
-
-#endif  // TALK_APP_WEBRTC_WEBRTCJSON_H_
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/webrtcsession.cc b/third_party/libjingle/source/talk/app/webrtcv1/webrtcsession.cc
deleted file mode 100644
index 0678627..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/webrtcsession.cc
+++ /dev/null
@@ -1,537 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/app/webrtcv1/webrtcsession.h"
-
-#include <string>
-#include <vector>
-
-#include "talk/base/common.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/p2p/base/constants.h"
-#include "talk/p2p/base/sessiondescription.h"
-#include "talk/p2p/base/p2ptransport.h"
-#include "talk/session/phone/channel.h"
-#include "talk/session/phone/channelmanager.h"
-#include "talk/session/phone/mediasessionclient.h"
-#include "talk/session/phone/voicechannel.h"
-
-namespace webrtc {
-
-enum {
-  MSG_CANDIDATE_TIMEOUT = 101,
-};
-
-static const int kAudioMonitorPollFrequency = 100;
-static const int kMonitorPollFrequency = 1000;
-
-// We allow 30 seconds to establish a connection; beyond that we consider
-// it an error
-static const int kCallSetupTimeout = 30 * 1000;
-// A loss of connectivity is probably due to the Internet connection going
-// down, and it might take a while to come back on wireless networks, so we
-// use a longer timeout for that.
-static const int kCallLostTimeout = 60 * 1000;
-
-static const char kVideoStream[] = "video_rtp";
-static const char kAudioStream[] = "rtp";
-
-static const int kDefaultVideoCodecId = 100;
-static const int kDefaultVideoCodecFramerate = 30;
-static const char kDefaultVideoCodecName[] = "VP8";
-
-WebRtcSession::WebRtcSession(const std::string& id,
-                             bool incoming,
-                             cricket::PortAllocator* allocator,
-                             cricket::ChannelManager* channelmgr,
-                             talk_base::Thread* signaling_thread)
-    : BaseSession(signaling_thread, channelmgr->worker_thread(),
-                  allocator, id, "", !incoming),
-      transport_(NULL),
-      channel_manager_(channelmgr),
-      transports_writable_(false),
-      muted_(false),
-      camera_muted_(false),
-      setup_timeout_(kCallSetupTimeout),
-      signaling_thread_(signaling_thread),
-      incoming_(incoming),
-      port_allocator_(allocator),
-      desc_factory_(channel_manager_) {
-}
-
-WebRtcSession::~WebRtcSession() {
-  RemoveAllStreams();
-  // TODO: Do we still need Terminate?
-  // if (state_ != STATE_RECEIVEDTERMINATE) {
-  //   Terminate();
-  // }
-  if (transport_) {
-    delete transport_;
-    transport_ = NULL;
-  }
-}
-
-bool WebRtcSession::Initiate() {
-  const cricket::VideoCodec default_codec(kDefaultVideoCodecId,
-      kDefaultVideoCodecName, kDefaultVideoCodecWidth, kDefaultVideoCodecHeight,
-      kDefaultVideoCodecFramerate, 0);
-  channel_manager_->SetDefaultVideoEncoderConfig(
-      cricket::VideoEncoderConfig(default_codec));
-
-  if (signaling_thread_ == NULL)
-    return false;
-
-  transport_ = CreateTransport();
-
-  if (transport_ == NULL)
-    return false;
-
-  transport_->set_allow_local_ips(true);
-
-  // start transports
-  transport_->SignalRequestSignaling.connect(
-      this, &WebRtcSession::OnRequestSignaling);
-  transport_->SignalCandidatesReady.connect(
-      this, &WebRtcSession::OnCandidatesReady);
-  transport_->SignalWritableState.connect(
-      this, &WebRtcSession::OnWritableState);
-  // Limit the amount of time that setting up a call may take.
-  StartTransportTimeout(kCallSetupTimeout);
-  return true;
-}
-
-cricket::Transport* WebRtcSession::CreateTransport() {
-  ASSERT(signaling_thread()->IsCurrent());
-  return new cricket::P2PTransport(
-      talk_base::Thread::Current(),
-      channel_manager_->worker_thread(), port_allocator());
-}
-
-bool WebRtcSession::CreateVoiceChannel(const std::string& stream_id) {
-  // RTCP disabled
-  cricket::VoiceChannel* voice_channel =
-      channel_manager_->CreateVoiceChannel(this, stream_id, true);
-  if (voice_channel == NULL) {
-    LOG(LERROR) << "Unable to create voice channel.";
-    return false;
-  }
-  StreamInfo* stream_info = new StreamInfo(stream_id);
-  stream_info->channel = voice_channel;
-  stream_info->video = false;
-  streams_.push_back(stream_info);
-  return true;
-}
-
-bool WebRtcSession::CreateVideoChannel(const std::string& stream_id) {
-  // RTCP disabled
-  cricket::VideoChannel* video_channel =
-      channel_manager_->CreateVideoChannel(this, stream_id, true, NULL);
-  if (video_channel == NULL) {
-    LOG(LERROR) << "Unable to create video channel.";
-    return false;
-  }
-  StreamInfo* stream_info = new StreamInfo(stream_id);
-  stream_info->channel = video_channel;
-  stream_info->video = true;
-  streams_.push_back(stream_info);
-  return true;
-}
-
-cricket::TransportChannel* WebRtcSession::CreateChannel(
-    const std::string& content_name,
-    const std::string& name) {
-  if (!transport_) {
-    return NULL;
-  }
-  std::string type;
-  if (content_name.compare(kVideoStream) == 0) {
-    type = cricket::NS_GINGLE_VIDEO;
-  } else {
-    type = cricket::NS_GINGLE_AUDIO;
-  }
-  cricket::TransportChannel* transport_channel =
-      transport_->CreateChannel(name, type);
-  ASSERT(transport_channel != NULL);
-  return transport_channel;
-}
-
-cricket::TransportChannel* WebRtcSession::GetChannel(
-    const std::string& content_name, const std::string& name) {
-  if (!transport_)
-    return NULL;
-
-  return transport_->GetChannel(name);
-}
-
-void WebRtcSession::DestroyChannel(
-    const std::string& content_name, const std::string& name) {
-  if (!transport_)
-    return;
-
-  transport_->DestroyChannel(name);
-}
-
-void WebRtcSession::OnMessage(talk_base::Message* message) {
-  switch (message->message_id) {
-    case MSG_CANDIDATE_TIMEOUT:
-      if (transport_->writable()) {
-        // This should never happen: The timout triggered even
-        // though a call was successfully set up.
-        ASSERT(false);
-      }
-      SignalFailedCall();
-      break;
-    default:
-      cricket::BaseSession::OnMessage(message);
-      break;
-  }
-}
-
-bool WebRtcSession::Connect() {
-  if (streams_.empty()) {
-    // nothing to initiate
-    return false;
-  }
-  // lets connect all the transport channels created before for this session
-  transport_->ConnectChannels();
-
-  // create an offer now. This is to call SetState
-  // Actual offer will be send when OnCandidatesReady callback received
-  cricket::SessionDescription* offer = CreateOffer();
-  set_local_description(offer);
-  SetState((incoming()) ? STATE_SENTACCEPT : STATE_SENTINITIATE);
-
-  // Enable all the channels
-  EnableAllStreams();
-  SetVideoCapture(true);
-  return true;
-}
-
-bool WebRtcSession::SetVideoRenderer(const std::string& stream_id,
-                                     cricket::VideoRenderer* renderer) {
-  bool ret = false;
-  StreamMap::iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    StreamInfo* stream_info = (*iter);
-    if (stream_info->stream_id.compare(stream_id) == 0) {
-      ASSERT(stream_info->channel != NULL);
-      ASSERT(stream_info->video);
-      cricket::VideoChannel* channel = static_cast<cricket::VideoChannel*>(
-          stream_info->channel);
-      ret = channel->SetRenderer(0, renderer);
-      break;
-    }
-  }
-  return ret;
-}
-
-bool WebRtcSession::SetVideoCapture(bool capture) {
-  channel_manager_->SetVideoCapture(capture);
-  return true;
-}
-
-bool WebRtcSession::RemoveStream(const std::string& stream_id) {
-  bool ret = false;
-  StreamMap::iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    StreamInfo* sinfo = (*iter);
-    if (sinfo->stream_id.compare(stream_id) == 0) {
-      if (!sinfo->video) {
-        cricket::VoiceChannel* channel = static_cast<cricket::VoiceChannel*> (
-            sinfo->channel);
-        channel->Enable(false);
-        // Note: If later the channel is used by multiple streams, then we
-        // should not destroy the channel until all the streams are removed.
-        channel_manager_->DestroyVoiceChannel(channel);
-      } else {
-        cricket::VideoChannel* channel = static_cast<cricket::VideoChannel*> (
-            sinfo->channel);
-        channel->Enable(false);
-        // Note: If later the channel is used by multiple streams, then we
-        // should not destroy the channel until all the streams are removed.
-        channel_manager_->DestroyVideoChannel(channel);
-      }
-      // channel and transport will be deleted in
-      // DestroyVoiceChannel/DestroyVideoChannel
-      streams_.erase(iter);
-      ret = true;
-      break;
-    }
-  }
-  if (!ret) {
-    LOG(LERROR) << "No streams found for stream id " << stream_id;
-    // TODO: trigger onError callback
-  }
-  return ret;
-}
-
-void WebRtcSession::EnableAllStreams() {
-  StreamMap::const_iterator i;
-  for (i = streams_.begin(); i != streams_.end(); ++i) {
-    cricket::BaseChannel* channel = (*i)->channel;
-    if (channel)
-      channel->Enable(true);
-  }
-}
-
-void WebRtcSession::RemoveAllStreams() {
-  SetState(STATE_RECEIVEDTERMINATE);
-
-  // signaling_thread_->Post(this, MSG_RTC_REMOVEALLSTREAMS);
-  // First build a list of streams to remove and then remove them.
-  // The reason we do this is that if we remove the streams inside the
-  // loop, a stream might get removed while we're enumerating and the iterator
-  // will become invalid (and we crash).
-  // streams_ entry will be removed from ChannelManager callback method
-  // DestroyChannel
-  std::vector<std::string> streams_to_remove;
-  StreamMap::iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter)
-    streams_to_remove.push_back((*iter)->stream_id);
-
-  for (std::vector<std::string>::iterator i = streams_to_remove.begin();
-       i != streams_to_remove.end(); ++i) {
-    RemoveStream(*i);
-  }
-}
-
-bool WebRtcSession::HasStream(const std::string& stream_id) const {
-  StreamMap::const_iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    StreamInfo* sinfo = (*iter);
-    if (stream_id.compare(sinfo->stream_id) == 0) {
-      return true;
-    }
-  }
-  return false;
-}
-
-bool WebRtcSession::HasChannel(bool video) const {
-  StreamMap::const_iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    StreamInfo* sinfo = (*iter);
-    if (sinfo->video == video) {
-      return true;
-    }
-  }
-  return false;
-}
-
-bool WebRtcSession::HasAudioChannel() const {
-  return HasChannel(false);
-}
-
-bool WebRtcSession::HasVideoChannel() const {
-  return HasChannel(true);
-}
-
-void WebRtcSession::OnRequestSignaling(cricket::Transport* transport) {
-  transport->OnSignalingReady();
-}
-
-void WebRtcSession::OnWritableState(cricket::Transport* transport) {
-  ASSERT(transport == transport_);
-  const bool transports_writable = transport_->writable();
-  if (transports_writable) {
-    if (transports_writable != transports_writable_) {
-      signaling_thread_->Clear(this, MSG_CANDIDATE_TIMEOUT);
-    } else {
-      // At one point all channels were writable and we had full connectivity,
-      // but then we lost it. Start the timeout again to kill the call if it
-      // doesn't come back.
-      StartTransportTimeout(kCallLostTimeout);
-    }
-    transports_writable_ = transports_writable;
-  }
-  NotifyTransportState();
-  return;
-}
-
-void WebRtcSession::StartTransportTimeout(int timeout) {
-  talk_base::Thread::Current()->PostDelayed(timeout, this,
-                                            MSG_CANDIDATE_TIMEOUT,
-                                            NULL);
-}
-
-void WebRtcSession::NotifyTransportState() {
-}
-
-bool WebRtcSession::OnInitiateMessage(
-    cricket::SessionDescription* offer,
-    const std::vector<cricket::Candidate>& candidates) {
-  if (!offer) {
-    LOG(LERROR) << "No SessionDescription from peer";
-    return false;
-  }
-
-  // Get capabilities from offer before generating an answer to it.
-  cricket::MediaSessionOptions options;
-  if (GetFirstAudioContent(offer))
-    options.has_audio = true;
-  if (GetFirstVideoContent(offer))
-    options.has_video = true;
-
-  talk_base::scoped_ptr<cricket::SessionDescription> answer;
-  answer.reset(CreateAnswer(offer, options));
-
-  if (!answer.get()) {
-    return false;
-  }
-
-  const cricket::ContentInfo* audio_content = GetFirstAudioContent(
-      answer.get());
-  const cricket::ContentInfo* video_content = GetFirstVideoContent(
-      answer.get());
-
-  if (!audio_content && !video_content) {
-    return false;
-  }
-
-  bool ret = true;
-  if (audio_content) {
-    ret = !HasAudioChannel() &&
-          CreateVoiceChannel(audio_content->name);
-    if (!ret) {
-      LOG(LERROR) << "Failed to create voice channel for "
-                  << audio_content->name;
-      return false;
-    }
-  }
-
-  if (video_content) {
-    ret = !HasVideoChannel() &&
-          CreateVideoChannel(video_content->name);
-    if (!ret) {
-      LOG(LERROR) << "Failed to create video channel for "
-                  << video_content->name;
-      return false;
-    }
-  }
-  // Provide remote candidates to the transport
-  transport_->OnRemoteCandidates(candidates);
-
-  set_remote_description(offer);
-  SetState(STATE_RECEIVEDINITIATE);
-
-  transport_->ConnectChannels();
-  EnableAllStreams();
-
-  set_local_description(answer.release());
-
-  // AddStream called only once with Video label
-  if (video_content) {
-    SignalAddStream(video_content->name, true);
-  } else {
-    SignalAddStream(audio_content->name, false);
-  }
-  SetState(STATE_SENTACCEPT);
-  return true;
-}
-
-bool WebRtcSession::OnRemoteDescription(
-    cricket::SessionDescription* desc,
-    const std::vector<cricket::Candidate>& candidates) {
-  if (state() == STATE_SENTACCEPT ||
-      state() == STATE_RECEIVEDACCEPT ||
-      state() == STATE_INPROGRESS) {
-    transport_->OnRemoteCandidates(candidates);
-    return true;
-  }
-  // Session description is always accepted.
-  set_remote_description(desc);
-  SetState(STATE_RECEIVEDACCEPT);
-  // Will trigger OnWritableState() if successful.
-  transport_->OnRemoteCandidates(candidates);
-
-  if (!incoming()) {
-    // Trigger OnAddStream callback at the initiator
-    const cricket::ContentInfo* video_content = GetFirstVideoContent(desc);
-    if (video_content && !SendSignalAddStream(true)) {
-      LOG(LERROR) << "Video stream unexpected in answer.";
-      return false;
-    } else {
-      const cricket::ContentInfo* audio_content = GetFirstAudioContent(desc);
-      if (audio_content && !SendSignalAddStream(false)) {
-        LOG(LERROR) << "Audio stream unexpected in answer.";
-        return false;
-      }
-    }
-  }
-  return true;
-}
-
-// Send the SignalAddStream with the stream_id based on the content type.
-bool WebRtcSession::SendSignalAddStream(bool video) {
-  StreamMap::const_iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    StreamInfo* sinfo = (*iter);
-    if (sinfo->video == video) {
-      SignalAddStream(sinfo->stream_id, video);
-      return true;
-    }
-  }
-  return false;
-}
-
-cricket::SessionDescription* WebRtcSession::CreateOffer() {
-  cricket::MediaSessionOptions options;
-  options.has_audio = false;  // disable default option
-  StreamMap::const_iterator iter;
-  for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
-    if ((*iter)->video) {
-      options.has_video = true;
-    } else {
-      options.has_audio = true;
-    }
-  }
-  // We didn't save the previous offer.
-  const cricket::SessionDescription* previous_offer = NULL;
-  return desc_factory_.CreateOffer(options, previous_offer);
-}
-
-cricket::SessionDescription* WebRtcSession::CreateAnswer(
-    const cricket::SessionDescription* offer,
-    const cricket::MediaSessionOptions& options) {
-  // We didn't save the previous answer.
-  const cricket::SessionDescription* previous_answer = NULL;
-  return desc_factory_.CreateAnswer(offer, options, previous_answer);
-}
-
-void WebRtcSession::SetError(Error error) {
-  BaseSession::SetError(error);
-}
-
-void WebRtcSession::OnCandidatesReady(
-    cricket::Transport* transport,
-    const std::vector<cricket::Candidate>& candidates) {
-  std::vector<cricket::Candidate>::const_iterator iter;
-  for (iter = candidates.begin(); iter != candidates.end(); ++iter) {
-    local_candidates_.push_back(*iter);
-  }
-  SignalLocalDescription(local_description(), candidates);
-}
-} /* namespace webrtc */
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/webrtcsession.h b/third_party/libjingle/source/talk/app/webrtcv1/webrtcsession.h
deleted file mode 100644
index 8f6c6ad..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/webrtcsession.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_APP_WEBRTC_WEBRTCSESSION_H_
-#define TALK_APP_WEBRTC_WEBRTCSESSION_H_
-
-#include <map>
-#include <string>
-#include <vector>
-
-#include "talk/base/logging.h"
-#include "talk/base/messagehandler.h"
-#include "talk/p2p/base/candidate.h"
-#include "talk/p2p/base/session.h"
-#include "talk/session/phone/channel.h"
-#include "talk/session/phone/mediachannel.h"
-#include "talk/session/phone/mediasession.h"
-
-namespace cricket {
-class ChannelManager;
-class Transport;
-class TransportChannel;
-class VoiceChannel;
-class VideoChannel;
-struct ConnectionInfo;
-}
-
-namespace Json {
-class Value;
-}
-
-namespace webrtc {
-
-typedef std::vector<cricket::AudioCodec> AudioCodecs;
-typedef std::vector<cricket::VideoCodec> VideoCodecs;
-
-class WebRtcSession : public cricket::BaseSession {
- public:
-  WebRtcSession(const std::string& id,
-                    bool incoming,
-                    cricket::PortAllocator* allocator,
-                    cricket::ChannelManager* channelmgr,
-                    talk_base::Thread* signaling_thread);
-
-  ~WebRtcSession();
-
-  bool Initiate();
-  bool Connect();
-  bool OnRemoteDescription(cricket::SessionDescription* sdp,
-      const std::vector<cricket::Candidate>& candidates);
-  bool OnInitiateMessage(cricket::SessionDescription* sdp,
-      const std::vector<cricket::Candidate>& candidates);
-  bool CreateVoiceChannel(const std::string& stream_id);
-  bool CreateVideoChannel(const std::string& stream_id);
-  bool RemoveStream(const std::string& stream_id);
-  void RemoveAllStreams();
-
-  // Returns true if we have either a voice or video stream matching this label.
-  bool HasStream(const std::string& label) const;
-  bool HasChannel(bool video) const;
-
-  // Returns true if there's one or more audio channels in the session.
-  bool HasAudioChannel() const;
-
-  // Returns true if there's one or more video channels in the session.
-  bool HasVideoChannel() const;
-
-  bool SetVideoRenderer(const std::string& stream_id,
-                        cricket::VideoRenderer* renderer);
-
-  // This signal occurs when all the streams have been removed.
-  // It is triggered by a successful call to the RemoveAllStream or
-  // the OnRemoteDescription with stream deleted signaling message with the
-  // candidates port equal to 0.
-  sigslot::signal1<WebRtcSession*> SignalRemoveStreamMessage;
-
-  // This signal indicates a stream has been added properly.
-  // It is triggered by a successful call to the OnInitiateMessage or
-  // the OnRemoteDescription and if it's going to the STATE_RECEIVEDACCEPT.
-  sigslot::signal2<const std::string&, bool> SignalAddStream;
-
-  // This signal occurs when one stream is removed with the signaling
-  // message from the remote peer with the candidates port equal to 0.
-  sigslot::signal2<const std::string&, bool> SignalRemoveStream;
-
-  // This signal occurs when the local candidate is ready
-  sigslot::signal2<const cricket::SessionDescription*,
-      const std::vector<cricket::Candidate>&> SignalLocalDescription;
-
-  // This signal triggers when setting up or resuming a call has not been
-  // successful before a certain time out.
-  sigslot::signal0<> SignalFailedCall;
-
-  bool muted() const { return muted_; }
-  bool camera_muted() const { return camera_muted_; }
-  const std::vector<cricket::Candidate>& local_candidates() {
-    return local_candidates_;
-  }
-  void set_incoming(bool incoming) { incoming_ = incoming; }
-  bool incoming() const { return incoming_; }
-  cricket::PortAllocator* port_allocator() const { return port_allocator_; }
-  talk_base::Thread* signaling_thread() const { return signaling_thread_; }
-
-  static const int kDefaultVideoCodecWidth = 640;
-  static const int kDefaultVideoCodecHeight = 480;
-
- protected:
-  // methods from cricket::BaseSession
-  virtual void SetError(cricket::BaseSession::Error error);
-  virtual cricket::TransportChannel* CreateChannel(
-      const std::string& content_name, const std::string& name);
-  virtual cricket::TransportChannel* GetChannel(
-      const std::string& content_name, const std::string& name);
-  virtual void DestroyChannel(
-      const std::string& content_name, const std::string& name);
-
- private:
-  struct StreamInfo {
-    explicit StreamInfo(const std::string stream_id)
-        : channel(NULL),
-          video(false),
-          stream_id(stream_id) {}
-
-    StreamInfo()
-        : channel(NULL),
-          video(false) {}
-    cricket::BaseChannel* channel;
-    bool video;
-    std::string stream_id;
-  };
-  // Not really a map (vector).
-  typedef std::vector<StreamInfo*> StreamMap;
-
-  // methods signaled by the transport
-  void OnRequestSignaling(cricket::Transport* transport);
-  void OnCandidatesReady(cricket::Transport* transport,
-                         const std::vector<cricket::Candidate>& candidates);
-  void OnWritableState(cricket::Transport* transport);
-  void OnTransportError(cricket::Transport* transport);
-  void OnChannelGone(cricket::Transport* transport);
-
-  bool CheckForStreamDeleteMessage(
-      const std::vector<cricket::Candidate>& candidates);
-  void ProcessTerminateAccept(cricket::SessionDescription* desc);
-
-  void UpdateTransportWritableState();
-  bool CheckAllTransportsWritable();
-  void StartTransportTimeout(int timeout);
-  void NotifyTransportState();
-
-  cricket::SessionDescription* CreateOffer();
-  cricket::SessionDescription* CreateAnswer(
-      const cricket::SessionDescription* answer,
-      const cricket::MediaSessionOptions& options);
-
-  // from MessageHandler
-  virtual void OnMessage(talk_base::Message* message);
-
-  virtual cricket::Transport* CreateTransport();
-  cricket::Transport* GetTransport();
-
-  typedef std::map<std::string, cricket::TransportChannel*> TransportChannelMap;
-
-  bool SetVideoCapture(bool capture);
-  void EnableAllStreams();
-  bool SendSignalAddStream(bool video);
-
-  cricket::Transport* transport_;
-  cricket::ChannelManager* channel_manager_;
-  std::vector<StreamInfo*> streams_;
-  TransportChannelMap transport_channels_;
-  bool transports_writable_;
-  bool muted_;
-  bool camera_muted_;
-  int setup_timeout_;
-  std::vector<cricket::Candidate> local_candidates_;
-
-  talk_base::Thread* signaling_thread_;
-  bool incoming_;
-  cricket::PortAllocator* port_allocator_;
-  cricket::MediaSessionDescriptionFactory desc_factory_;
-};
-
-}  // namespace webrtc
-
-#endif  // TALK_APP_WEBRTC_WEBRTCSESSION_H_
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/webrtcsession_unittest.cc b/third_party/libjingle/source/talk/app/webrtcv1/webrtcsession_unittest.cc
deleted file mode 100644
index 2c23d6a..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/webrtcsession_unittest.cc
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <stdio.h>
-
-#include <list>
-
-#include "base/gunit.h"
-#include "base/helpers.h"
-#include "talk/app/webrtcv1/unittest_utilities.h"
-#include "talk/app/webrtcv1/webrtcsession.h"
-#include "talk/base/fakenetwork.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/thread.h"
-#include "talk/p2p/base/fakesession.h"
-#include "talk/p2p/base/portallocator.h"
-#include "talk/p2p/base/sessiondescription.h"
-#include "talk/p2p/client/fakeportallocator.h"
-#include "talk/session/phone/mediasessionclient.h"
-
-class WebRtcSessionTest
-    : public sigslot::has_slots<>,
-      public testing::Test {
- public:
-  enum CallbackId {
-    kNone,
-    kOnAddStream,
-    kOnRemoveStream,
-    kOnLocalDescription,
-    kOnFailedCall,
-  };
-
-  WebRtcSessionTest()
-      : callback_ids_(),
-        last_stream_id_(""),
-        last_was_video_(false),
-        last_description_ptr_(NULL),
-        last_candidates_(),
-        session_(NULL),
-        id_(),
-        receiving_(false),
-        allocator_(NULL),
-        channel_manager_(NULL),
-        worker_thread_(NULL),
-        signaling_thread_(NULL) {
-  }
-
-  ~WebRtcSessionTest() {
-    session_.reset();
-  }
-
-  void OnAddStream(const std::string& stream_id, bool video) {
-    callback_ids_.push_back(kOnAddStream);
-    last_stream_id_ = stream_id;
-    last_was_video_ = video;
-  }
-  void OnRemoveStream(const std::string& stream_id, bool video) {
-    callback_ids_.push_back(kOnRemoveStream);
-    last_stream_id_ = stream_id;
-    last_was_video_ = video;
-  }
-  void OnLocalDescription(
-      const cricket::SessionDescription* desc,
-      const std::vector<cricket::Candidate>& candidates) {
-    callback_ids_.push_back(kOnLocalDescription);
-    last_description_ptr_.reset(CopySessionDescription(desc));
-    CopyCandidates(candidates, &last_candidates_);
-  }
-  cricket::SessionDescription* GetLocalDescription(
-      std::vector<cricket::Candidate>* candidates) {
-    if (last_candidates_.empty()) {
-      return NULL;
-    }
-    if (!last_description_ptr_.get()) {
-      return NULL;
-    }
-    CopyCandidates(last_candidates_, candidates);
-    return CopySessionDescription(last_description_ptr_.get());
-  }
-
-  void OnFailedCall() {
-    callback_ids_.push_back(kOnFailedCall);
-  }
-
-  CallbackId PopOldestCallback() {
-    if (callback_ids_.empty()) {
-      return kNone;
-    }
-    const CallbackId return_value = callback_ids_.front();
-    callback_ids_.pop_front();
-    return return_value;
-  }
-
-  CallbackId PeekOldestCallback() {
-    if (callback_ids_.empty()) {
-      return kNone;
-    }
-    const CallbackId return_value = callback_ids_.front();
-    return return_value;
-  }
-
-  void Reset() {
-    callback_ids_.clear();
-    last_stream_id_ = "";
-    last_was_video_ = false;
-    last_description_ptr_.reset();
-    last_candidates_.clear();
-  }
-
-  bool WaitForCallback(CallbackId id, int timeout_ms) {
-    bool success = false;
-    for (int ms = 0; ms < timeout_ms; ms++) {
-      const CallbackId peek_id = PeekOldestCallback();
-      if (peek_id == id) {
-        PopOldestCallback();
-        success = true;
-        break;
-      } else if (peek_id != kNone) {
-        success = false;
-        break;
-      }
-      talk_base::Thread::Current()->ProcessMessages(1);
-    }
-    return success;
-  }
-
-  bool Init(bool receiving) {
-    if (signaling_thread_ != NULL)
-        return false;
-    signaling_thread_ = talk_base::Thread::Current();
-    receiving_ = receiving;
-
-    if (worker_thread_!= NULL)
-        return false;
-    worker_thread_ = talk_base::Thread::Current();
-
-    cricket::FakePortAllocator* fake_port_allocator =
-        new cricket::FakePortAllocator(worker_thread_, NULL);
-
-    allocator_.reset(static_cast<cricket::PortAllocator*>(fake_port_allocator));
-
-    channel_manager_.reset(new cricket::ChannelManager(worker_thread_));
-    if (!channel_manager_->Init())
-      return false;
-
-    talk_base::CreateRandomString(8, &id_);
-
-    session_.reset(new webrtc::WebRtcSession(
-        id_, receiving_ , allocator_.get(),
-        channel_manager_.get(),
-        signaling_thread_));
-    session_->SignalAddStream.connect(this, &WebRtcSessionTest::OnAddStream);
-    session_->SignalRemoveStream.connect(this,
-        &WebRtcSessionTest::OnRemoveStream);
-    session_->SignalLocalDescription.connect(this,
-        &WebRtcSessionTest::OnLocalDescription);
-    session_->SignalFailedCall.connect(this, &WebRtcSessionTest::OnFailedCall);
-    return true;
-  }
-
-  // All session APIs must be called from the signaling thread.
-  bool CallInitiate() {
-    return session_->Initiate();
-  }
-
-  bool CallConnect() {
-    if (!session_->Connect())
-      return false;
-    // This callback does not happen with FakeTransport!
-    if (!WaitForCallback(kOnLocalDescription, 1000)) {
-      return false;
-    }
-    return true;
-  }
-
-  bool CallOnRemoteDescription(
-      cricket::SessionDescription* description,
-      std::vector<cricket::Candidate> candidates) {
-    if (!session_->OnRemoteDescription(description, candidates)) {
-      return false;
-    }
-    if (!WaitForCallback(kOnAddStream, 1000)) {
-      return false;
-    }
-    return true;
-  }
-
-  bool CallOnInitiateMessage(
-      cricket::SessionDescription* description,
-      const std::vector<cricket::Candidate>& candidates) {
-    if (!session_->OnInitiateMessage(description, candidates)) {
-      return false;
-    }
-    if (!WaitForCallback(kOnAddStream, 1000)) {
-      return false;
-    }
-    return true;
-  }
-
-  bool CallCreateVoiceChannel(const std::string& stream_id) {
-    if (!session_->CreateVoiceChannel(stream_id)) {
-      return false;
-    }
-    return true;
-  }
-
-  bool CallCreateVideoChannel(const std::string& stream_id) {
-    if (!session_->CreateVideoChannel(stream_id)) {
-      return false;
-    }
-    return true;
-  }
-
-  bool CallRemoveStream(const std::string& stream_id) {
-    return session_->RemoveStream(stream_id);
-  }
-
-  void CallRemoveAllStreams() {
-    session_->RemoveAllStreams();
-  }
-
-  bool CallHasChannel(const std::string& label) {
-    return session_->HasStream(label);
-  }
-
-  bool CallHasChannel(bool video) {
-    return session_->HasChannel(video);
-  }
-
-  bool CallHasAudioChannel() {
-    return session_->HasAudioChannel();
-  }
-
-  bool CallHasVideoChannel() {
-    return session_->HasVideoChannel();
-  }
-
-  bool CallSetVideoRenderer(const std::string& stream_id,
-                            cricket::VideoRenderer* renderer) {
-    return session_->SetVideoRenderer(stream_id, renderer);
-  }
-
-  const std::vector<cricket::Candidate>& CallLocalCandidates() {
-    return session_->local_candidates();
-  }
-
- private:
-  std::list<CallbackId> callback_ids_;
-
-  std::string last_stream_id_;
-  bool last_was_video_;
-  talk_base::scoped_ptr<cricket::SessionDescription> last_description_ptr_;
-  std::vector<cricket::Candidate> last_candidates_;
-
-  talk_base::scoped_ptr<webrtc::WebRtcSession> session_;
-  std::string id_;
-  bool receiving_;
-
-  talk_base::scoped_ptr<cricket::PortAllocator> allocator_;
-
-  talk_base::scoped_ptr<cricket::ChannelManager> channel_manager_;
-
-  talk_base::Thread* worker_thread_;
-  talk_base::Thread* signaling_thread_;
-};
-
-bool CallbackReceived(WebRtcSessionTest* session, int timeout) {
-  EXPECT_EQ_WAIT(WebRtcSessionTest::kNone, session->PeekOldestCallback(),
-                 timeout);
-  const WebRtcSessionTest::CallbackId peek_id =
-      session->PeekOldestCallback();
-  return peek_id != WebRtcSessionTest::kNone;
-}
-
-TEST_F(WebRtcSessionTest, InitializationReceiveSanity) {
-  const bool kReceiving = true;
-  ASSERT_TRUE(Init(kReceiving));
-  ASSERT_TRUE(CallInitiate());
-
-  // Should return false because no stream has been set up yet.
-  EXPECT_FALSE(CallConnect());
-  const bool kVideo = true;
-  EXPECT_FALSE(CallHasChannel(kVideo));
-  EXPECT_FALSE(CallHasChannel(!kVideo));
-
-  EXPECT_EQ(kNone, PopOldestCallback());
-}
-
-TEST_F(WebRtcSessionTest, AudioSendCallSetUp) {
-  const bool kReceiving = false;
-  ASSERT_TRUE(Init(kReceiving));
-
-  ASSERT_TRUE(CallInitiate());
-
-  ASSERT_TRUE(CallCreateVoiceChannel("Audio"));
-  ASSERT_TRUE(CallConnect());
-
-  std::vector<cricket::Candidate> candidates;
-  cricket::SessionDescription* local_session = GetLocalDescription(
-      &candidates);
-  ASSERT_FALSE(candidates.empty());
-  ASSERT_FALSE(local_session == NULL);
-  if (!CallOnRemoteDescription(local_session, candidates)) {
-      delete local_session;
-      FAIL();
-  }
-
-  // All callbacks should be caught. Assert it.
-  ASSERT_FALSE(CallbackReceived(this, 1000));
-  ASSERT_TRUE(CallHasAudioChannel() &&
-              !CallHasVideoChannel());
-}
-
-TEST_F(WebRtcSessionTest, VideoSendCallSetUp) {
-  const bool kReceiving = false;
-  ASSERT_TRUE(Init(kReceiving));
-
-  ASSERT_TRUE(CallInitiate());
-
-  ASSERT_TRUE(CallCreateVideoChannel("Video"));
-  ASSERT_TRUE(CallConnect());
-
-  std::vector<cricket::Candidate> candidates;
-  cricket::SessionDescription* local_session = GetLocalDescription(
-      &candidates);
-  ASSERT_FALSE(candidates.empty());
-  ASSERT_FALSE(local_session == NULL);
-
-  if (!CallOnRemoteDescription(local_session, candidates)) {
-      delete local_session;
-      FAIL();
-  }
-
-  // All callbacks should be caught. Assert it.
-  ASSERT_FALSE(CallbackReceived(this, 1000));
-  ASSERT_TRUE(!CallHasAudioChannel() &&
-              CallHasVideoChannel());
-}
-
-TEST_F(WebRtcSessionTest, AudioReceiveCallSetUp) {
-  const bool kReceiving = true;
-  const bool video = false;
-
-  ASSERT_TRUE(Init(kReceiving));
-
-  std::vector<cricket::Candidate> candidates;
-  cricket::SessionDescription* local_session =
-      GenerateFakeSession(video, &candidates);
-  ASSERT_FALSE(candidates.empty());
-  ASSERT_FALSE(local_session == NULL);
-  ASSERT_TRUE(CallInitiate());
-  if (!CallOnInitiateMessage(local_session, candidates)) {
-    delete local_session;
-    FAIL();
-  }
-  ASSERT_TRUE(CallConnect());
-  ASSERT_FALSE(CallbackReceived(this, 1000));
-
-  ASSERT_TRUE(CallHasAudioChannel() &&
-              !CallHasVideoChannel());
-}
-
-TEST_F(WebRtcSessionTest, VideoReceiveCallSetUp) {
-  const bool kReceiving = true;
-  const bool video = true;
-
-  ASSERT_TRUE(Init(kReceiving));
-
-  std::vector<cricket::Candidate> candidates;
-  cricket::SessionDescription* local_session =
-      GenerateFakeSession(video, &candidates);
-  ASSERT_FALSE(candidates.empty());
-  ASSERT_FALSE(local_session == NULL);
-  ASSERT_TRUE(CallInitiate());
-  if (!CallOnInitiateMessage(local_session, candidates)) {
-    delete local_session;
-    FAIL();
-  }
-  ASSERT_TRUE(CallConnect());
-  ASSERT_FALSE(CallbackReceived(this, 1000));
-  ASSERT_TRUE(!CallHasAudioChannel() &&
-              CallHasVideoChannel());
-}
diff --git a/third_party/libjingle/source/talk/app/webrtcv1/webrtcv1.scons b/third_party/libjingle/source/talk/app/webrtcv1/webrtcv1.scons
deleted file mode 100644
index a159290..0000000
--- a/third_party/libjingle/source/talk/app/webrtcv1/webrtcv1.scons
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- Python -*-
-import talk
-
-Import('env')
-
-# local sources
-talk.Library(
-  env,
-  name = 'webrtcv1',
-  srcs = [
-    'peerconnectionimpl.cc',
-    'peerconnectionproxy.cc',
-    'peerconnectionfactory.cc',
-    'webrtcjson.cc',
-    'webrtcsession.cc',
-  ],
-)
-
-talk.Unittest(
-  env,
-  name = 'webrtcv1',
-  srcs = [
-    'peerconnection_unittest.cc',
-    'unittest_utilities.cc',
-    'webrtcsession_unittest.cc',
-  ],
-  libs = [
-    'base',
-    'expat',
-    'jpeg',
-    'json',
-    'p2p',
-    'phone',
-    'srtp',
-    'webrtcv1',
-    'xmpp',
-    'xmllite',
-    'yuvscaler'
-  ],
-  include_talk_media_libs = True,
-  mac_libs = [
-    'crypto',
-    'ssl',
-  ],
-  mac_FRAMEWORKS = [
-    'Foundation',
-    'IOKit',
-    'QTKit',
-  ],
-  win_link_flags = [('', '/nodefaultlib:libcmt')[env.Bit('debug')]],
-  lin_libs = [
-    'rt',
-    'dl',
-    'sound',
-    'X11',
-    'Xext',
-    'Xfixes',
-    'Xrandr'
-  ],
-)
diff --git a/third_party/libjingle/source/talk/base/Equifax_Secure_Global_eBusiness_CA-1.h b/third_party/libjingle/source/talk/base/Equifax_Secure_Global_eBusiness_CA-1.h
deleted file mode 100644
index 6ff97a6..0000000
--- a/third_party/libjingle/source/talk/base/Equifax_Secure_Global_eBusiness_CA-1.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// This file is the Equifax Secure global eBusiness CA-1 certificate
-// in C form.
-
-// It was generated with the following command line:
-// > openssl x509 -in Equifax_Secure_Global_eBusiness_CA-1.cer -noout -C
-
-// The certificate was retrieved from:
-// http://www.geotrust.com/resources/root_certificates/certificates/Equifax_Secure_Global_eBusiness_CA-1.cer
-
-/* subject:/C=US/O=Equifax Secure Inc./CN=Equifax Secure Global eBusiness CA-1 */
-/* issuer :/C=US/O=Equifax Secure Inc./CN=Equifax Secure Global eBusiness CA-1 */
-unsigned char EquifaxSecureGlobalEBusinessCA1_certificate[660]={
-0x30,0x82,0x02,0x90,0x30,0x82,0x01,0xF9,0xA0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,
-0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x04,0x05,0x00,0x30,
-0x5A,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x1C,
-0x30,0x1A,0x06,0x03,0x55,0x04,0x0A,0x13,0x13,0x45,0x71,0x75,0x69,0x66,0x61,0x78,
-0x20,0x53,0x65,0x63,0x75,0x72,0x65,0x20,0x49,0x6E,0x63,0x2E,0x31,0x2D,0x30,0x2B,
-0x06,0x03,0x55,0x04,0x03,0x13,0x24,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x20,0x53,
-0x65,0x63,0x75,0x72,0x65,0x20,0x47,0x6C,0x6F,0x62,0x61,0x6C,0x20,0x65,0x42,0x75,
-0x73,0x69,0x6E,0x65,0x73,0x73,0x20,0x43,0x41,0x2D,0x31,0x30,0x1E,0x17,0x0D,0x39,
-0x39,0x30,0x36,0x32,0x31,0x30,0x34,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,0x32,0x30,
-0x30,0x36,0x32,0x31,0x30,0x34,0x30,0x30,0x30,0x30,0x5A,0x30,0x5A,0x31,0x0B,0x30,
-0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x1C,0x30,0x1A,0x06,0x03,
-0x55,0x04,0x0A,0x13,0x13,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x20,0x53,0x65,0x63,
-0x75,0x72,0x65,0x20,0x49,0x6E,0x63,0x2E,0x31,0x2D,0x30,0x2B,0x06,0x03,0x55,0x04,
-0x03,0x13,0x24,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x20,0x53,0x65,0x63,0x75,0x72,
-0x65,0x20,0x47,0x6C,0x6F,0x62,0x61,0x6C,0x20,0x65,0x42,0x75,0x73,0x69,0x6E,0x65,
-0x73,0x73,0x20,0x43,0x41,0x2D,0x31,0x30,0x81,0x9F,0x30,0x0D,0x06,0x09,0x2A,0x86,
-0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8D,0x00,0x30,0x81,0x89,
-0x02,0x81,0x81,0x00,0xBA,0xE7,0x17,0x90,0x02,0x65,0xB1,0x34,0x55,0x3C,0x49,0xC2,
-0x51,0xD5,0xDF,0xA7,0xD1,0x37,0x8F,0xD1,0xE7,0x81,0x73,0x41,0x52,0x60,0x9B,0x9D,
-0xA1,0x17,0x26,0x78,0xAD,0xC7,0xB1,0xE8,0x26,0x94,0x32,0xB5,0xDE,0x33,0x8D,0x3A,
-0x2F,0xDB,0xF2,0x9A,0x7A,0x5A,0x73,0x98,0xA3,0x5C,0xE9,0xFB,0x8A,0x73,0x1B,0x5C,
-0xE7,0xC3,0xBF,0x80,0x6C,0xCD,0xA9,0xF4,0xD6,0x2B,0xC0,0xF7,0xF9,0x99,0xAA,0x63,
-0xA2,0xB1,0x47,0x02,0x0F,0xD4,0xE4,0x51,0x3A,0x12,0x3C,0x6C,0x8A,0x5A,0x54,0x84,
-0x70,0xDB,0xC1,0xC5,0x90,0xCF,0x72,0x45,0xCB,0xA8,0x59,0xC0,0xCD,0x33,0x9D,0x3F,
-0xA3,0x96,0xEB,0x85,0x33,0x21,0x1C,0x3E,0x1E,0x3E,0x60,0x6E,0x76,0x9C,0x67,0x85,
-0xC5,0xC8,0xC3,0x61,0x02,0x03,0x01,0x00,0x01,0xA3,0x66,0x30,0x64,0x30,0x11,0x06,
-0x09,0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x00,0x07,
-0x30,0x0F,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04,0x05,0x30,0x03,0x01,0x01,
-0xFF,0x30,0x1F,0x06,0x03,0x55,0x1D,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0xBE,0xA8,
-0xA0,0x74,0x72,0x50,0x6B,0x44,0xB7,0xC9,0x23,0xD8,0xFB,0xA8,0xFF,0xB3,0x57,0x6B,
-0x68,0x6C,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0xBE,0xA8,0xA0,
-0x74,0x72,0x50,0x6B,0x44,0xB7,0xC9,0x23,0xD8,0xFB,0xA8,0xFF,0xB3,0x57,0x6B,0x68,
-0x6C,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x04,0x05,0x00,
-0x03,0x81,0x81,0x00,0x30,0xE2,0x01,0x51,0xAA,0xC7,0xEA,0x5F,0xDA,0xB9,0xD0,0x65,
-0x0F,0x30,0xD6,0x3E,0xDA,0x0D,0x14,0x49,0x6E,0x91,0x93,0x27,0x14,0x31,0xEF,0xC4,
-0xF7,0x2D,0x45,0xF8,0xEC,0xC7,0xBF,0xA2,0x41,0x0D,0x23,0xB4,0x92,0xF9,0x19,0x00,
-0x67,0xBD,0x01,0xAF,0xCD,0xE0,0x71,0xFC,0x5A,0xCF,0x64,0xC4,0xE0,0x96,0x98,0xD0,
-0xA3,0x40,0xE2,0x01,0x8A,0xEF,0x27,0x07,0xF1,0x65,0x01,0x8A,0x44,0x2D,0x06,0x65,
-0x75,0x52,0xC0,0x86,0x10,0x20,0x21,0x5F,0x6C,0x6B,0x0F,0x6C,0xAE,0x09,0x1C,0xAF,
-0xF2,0xA2,0x18,0x34,0xC4,0x75,0xA4,0x73,0x1C,0xF1,0x8D,0xDC,0xEF,0xAD,0xF9,0xB3,
-0x76,0xB4,0x92,0xBF,0xDC,0x95,0x10,0x1E,0xBE,0xCB,0xC8,0x3B,0x5A,0x84,0x60,0x19,
-0x56,0x94,0xA9,0x55,
-};
diff --git a/third_party/libjingle/source/talk/base/asyncfile.cc b/third_party/libjingle/source/talk/base/asyncfile.cc
deleted file mode 100644
index 5c6e11d..0000000
--- a/third_party/libjingle/source/talk/base/asyncfile.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * libjingle
- * Copyright 2010, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/asyncfile.h"
-
-namespace talk_base {
-
-AsyncFile::AsyncFile() {
-}
-
-AsyncFile::~AsyncFile() {
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/asyncfile.h b/third_party/libjingle/source/talk/base/asyncfile.h
deleted file mode 100644
index 8af52be..0000000
--- a/third_party/libjingle/source/talk/base/asyncfile.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2010, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_ASYNCFILE_H__
-#define TALK_BASE_ASYNCFILE_H__
-
-#include "talk/base/sigslot.h"
-
-namespace talk_base {
-
-// Provides the ability to perform file I/O asynchronously.
-// TODO: Create a common base class with AsyncSocket.
-class AsyncFile {
- public:
-  AsyncFile();
-  virtual ~AsyncFile();
-
-  // Determines whether the file will receive read events.
-  virtual bool readable() = 0;
-  virtual void set_readable(bool value) = 0;
-
-  // Determines whether the file will receive write events.
-  virtual bool writable() = 0;
-  virtual void set_writable(bool value) = 0;
-
-  sigslot::signal1<AsyncFile*> SignalReadEvent;
-  sigslot::signal1<AsyncFile*> SignalWriteEvent;
-  sigslot::signal2<AsyncFile*, int> SignalCloseEvent;
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_ASYNCFILE_H__
diff --git a/third_party/libjingle/source/talk/base/asynchttprequest.cc b/third_party/libjingle/source/talk/base/asynchttprequest.cc
deleted file mode 100644
index 68f6100..0000000
--- a/third_party/libjingle/source/talk/base/asynchttprequest.cc
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2010, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/asynchttprequest.h"
-
-namespace talk_base {
-
-enum {
-  MSG_TIMEOUT = SignalThread::ST_MSG_FIRST_AVAILABLE,
-  MSG_LAUNCH_REQUEST
-};
-static const int kDefaultHTTPTimeout = 30 * 1000;  // 30 sec
-
-///////////////////////////////////////////////////////////////////////////////
-// AsyncHttpRequest
-///////////////////////////////////////////////////////////////////////////////
-
-AsyncHttpRequest::AsyncHttpRequest(const std::string &user_agent)
-    : start_delay_(0),
-      firewall_(NULL),
-      port_(80),
-      secure_(false),
-      timeout_(kDefaultHTTPTimeout),
-      fail_redirect_(false),
-      factory_(Thread::Current()->socketserver(), user_agent),
-      pool_(&factory_),
-      client_(user_agent.c_str(), &pool_),
-      error_(HE_NONE) {
-  client_.SignalHttpClientComplete.connect(this,
-      &AsyncHttpRequest::OnComplete);
-}
-
-AsyncHttpRequest::~AsyncHttpRequest() {
-}
-
-void AsyncHttpRequest::OnWorkStart() {
-  if (start_delay_ <= 0) {
-    LaunchRequest();
-  } else {
-    Thread::Current()->PostDelayed(start_delay_, this, MSG_LAUNCH_REQUEST);
-  }
-}
-
-void AsyncHttpRequest::OnWorkStop() {
-  // worker is already quitting, no need to explicitly quit
-  LOG(LS_INFO) << "HttpRequest cancelled";
-}
-
-void AsyncHttpRequest::OnComplete(HttpClient* client, HttpErrorType error) {
-  Thread::Current()->Clear(this, MSG_TIMEOUT);
-
-  set_error(error);
-  if (!error) {
-    LOG(LS_INFO) << "HttpRequest completed successfully";
-
-    std::string value;
-    if (client_.response().hasHeader(HH_LOCATION, &value)) {
-      response_redirect_ = value.c_str();
-    }
-  } else {
-    LOG(LS_INFO) << "HttpRequest completed with error: " << error;
-  }
-
-  worker()->Quit();
-}
-
-void AsyncHttpRequest::OnMessage(Message* message) {
-  switch (message->message_id) {
-   case MSG_TIMEOUT:
-    LOG(LS_INFO) << "HttpRequest timed out";
-    client_.reset();
-    worker()->Quit();
-    break;
-   case MSG_LAUNCH_REQUEST:
-    LaunchRequest();
-    break;
-   default:
-    SignalThread::OnMessage(message);
-    break;
-  }
-}
-
-void AsyncHttpRequest::DoWork() {
-  // Do nothing while we wait for the request to finish. We only do this so
-  // that we can be a SignalThread; in the future this class should not be
-  // a SignalThread, since it does not need to spawn a new thread.
-  Thread::Current()->ProcessMessages(kForever);
-}
-
-void AsyncHttpRequest::LaunchRequest() {
-  factory_.SetProxy(proxy_);
-  if (secure_)
-    factory_.UseSSL(host_.c_str());
-
-  bool transparent_proxy = (port_ == 80) &&
-           ((proxy_.type == PROXY_HTTPS) || (proxy_.type == PROXY_UNKNOWN));
-  if (transparent_proxy) {
-    client_.set_proxy(proxy_);
-  }
-  client_.set_fail_redirect(fail_redirect_);
-  client_.set_server(SocketAddress(host_, port_));
-
-  LOG(LS_INFO) << "HttpRequest start: " << host_ + client_.request().path;
-
-  Thread::Current()->PostDelayed(timeout_, this, MSG_TIMEOUT);
-  client_.start();
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/asynchttprequest.h b/third_party/libjingle/source/talk/base/asynchttprequest.h
deleted file mode 100644
index 13edf61..0000000
--- a/third_party/libjingle/source/talk/base/asynchttprequest.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2010, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_ASYNCHTTPREQUEST_H_
-#define TALK_BASE_ASYNCHTTPREQUEST_H_
-
-#include <string>
-#include "talk/base/event.h"
-#include "talk/base/httpclient.h"
-#include "talk/base/signalthread.h"
-#include "talk/base/socketpool.h"
-#include "talk/base/sslsocketfactory.h"
-
-namespace talk_base {
-
-class FirewallManager;
-
-///////////////////////////////////////////////////////////////////////////////
-// AsyncHttpRequest
-// Performs an HTTP request on a background thread.  Notifies on the foreground
-// thread once the request is done (successfully or unsuccessfully).
-///////////////////////////////////////////////////////////////////////////////
-
-class AsyncHttpRequest : public SignalThread {
- public:
-  explicit AsyncHttpRequest(const std::string &user_agent);
-  ~AsyncHttpRequest();
-
-  // If start_delay is less than or equal to zero, this starts immediately.
-  // Start_delay defaults to zero.
-  int start_delay() const { return start_delay_; }
-  void set_start_delay(int delay) { start_delay_ = delay; }
-
-  const ProxyInfo& proxy() const { return proxy_; }
-  void set_proxy(const ProxyInfo& proxy) {
-    proxy_ = proxy;
-  }
-  void set_firewall(FirewallManager * firewall) {
-    firewall_ = firewall;
-  }
-
-  // The DNS name of the host to connect to.
-  const std::string& host() { return host_; }
-  void set_host(const std::string& host) { host_ = host; }
-
-  // The port to connect to on the target host.
-  int port() { return port_; }
-  void set_port(int port) { port_ = port; }
-
-  // Whether the request should use SSL.
-  bool secure() { return secure_; }
-  void set_secure(bool secure) { secure_ = secure; }
-
-  // Time to wait on the download, in ms.
-  int timeout() { return timeout_; }
-  void set_timeout(int timeout) { timeout_ = timeout; }
-
-  // Fail redirects to allow analysis of redirect urls, etc.
-  bool fail_redirect() const { return fail_redirect_; }
-  void set_fail_redirect(bool redirect) { fail_redirect_ = redirect; }
-
-  // Returns the redirect when redirection occurs
-  const std::string& response_redirect() { return response_redirect_; }
-
-  HttpRequestData& request() { return client_.request(); }
-  HttpResponseData& response() { return client_.response(); }
-  HttpErrorType error() { return error_; }
-
- protected:
-  void set_error(HttpErrorType error) { error_ = error; }
-  virtual void OnWorkStart();
-  virtual void OnWorkStop();
-  void OnComplete(HttpClient* client, HttpErrorType error);
-  virtual void OnMessage(Message* message);
-  virtual void DoWork();
-
- private:
-  void LaunchRequest();
-
-  int start_delay_;
-  ProxyInfo proxy_;
-  FirewallManager* firewall_;
-  std::string host_;
-  int port_;
-  bool secure_;
-  int timeout_;
-  bool fail_redirect_;
-  SslSocketFactory factory_;
-  ReuseSocketPool pool_;
-  HttpClient client_;
-  HttpErrorType error_;
-  std::string response_redirect_;
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_ASYNCHTTPREQUEST_H_
diff --git a/third_party/libjingle/source/talk/base/asynchttprequest_unittest.cc b/third_party/libjingle/source/talk/base/asynchttprequest_unittest.cc
deleted file mode 100644
index b7a8a03..0000000
--- a/third_party/libjingle/source/talk/base/asynchttprequest_unittest.cc
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string>
-#include "talk/base/asynchttprequest.h"
-#include "talk/base/gunit.h"
-#include "talk/base/httpserver.h"
-#include "talk/base/socketstream.h"
-#include "talk/base/thread.h"
-
-namespace talk_base {
-
-static const SocketAddress kServerAddr("127.0.0.1", 0);
-static const SocketAddress kServerHostnameAddr("localhost", 0);
-static const char kServerGetPath[] = "/get";
-static const char kServerPostPath[] = "/post";
-static const char kServerResponse[] = "This is a test";
-  
-class TestHttpServer : public HttpServer, public sigslot::has_slots<> {
- public:
-  TestHttpServer(Thread* thread, const SocketAddress& addr)
-      : socket_(thread->socketserver()->CreateAsyncSocket(SOCK_STREAM)) {
-    socket_->Bind(addr);
-    socket_->Listen(5);
-    socket_->SignalReadEvent.connect(this, &TestHttpServer::OnAccept);
-  }
-
-  SocketAddress address() const { return socket_->GetLocalAddress(); }
-
- private:
-  void OnAccept(AsyncSocket* socket) {
-    AsyncSocket* new_socket = socket_->Accept(NULL);
-    if (new_socket) {
-      HandleConnection(new SocketStream(new_socket));
-    }
-  }
-  talk_base::scoped_ptr<AsyncSocket> socket_;
-};
-
-class AsyncHttpRequestTest : public testing::Test,
-                             public sigslot::has_slots<> {
- public:
-  AsyncHttpRequestTest()
-      : started_(false),
-        done_(false),
-        server_(Thread::Current(), kServerAddr) {
-    server_.SignalHttpRequest.connect(this, &AsyncHttpRequestTest::OnRequest);
-  }
-
-  bool started() const { return started_; }
-  bool done() const { return done_; }
-
-  AsyncHttpRequest* CreateGetRequest(const std::string& host, int port,
-                                     const std::string& path) {
-    talk_base::AsyncHttpRequest* request =
-        new talk_base::AsyncHttpRequest("unittest");
-    request->SignalWorkDone.connect(this,
-        &AsyncHttpRequestTest::OnRequestDone);
-    request->request().verb = talk_base::HV_GET;
-    request->set_host(host);
-    request->set_port(port);
-    request->request().path = path;
-    request->response().document.reset(new MemoryStream());
-    return request;
-  }
-  AsyncHttpRequest* CreatePostRequest(const std::string& host, int port,
-                                      const std::string& path,
-                                      const std::string content_type,
-                                      StreamInterface* content) {
-    talk_base::AsyncHttpRequest* request =
-        new talk_base::AsyncHttpRequest("unittest");
-    request->SignalWorkDone.connect(this,
-        &AsyncHttpRequestTest::OnRequestDone);
-    request->request().verb = talk_base::HV_POST;
-    request->set_host(host);
-    request->set_port(port);
-    request->request().path = path;
-    request->request().setContent(content_type, content);
-    request->response().document.reset(new MemoryStream());
-    return request;
-  }
-
-  const TestHttpServer& server() const { return server_; }
-
- protected:
-  void OnRequest(HttpServer* server, HttpServerTransaction* t) {
-    started_ = true;
-
-    if (t->request.path == kServerGetPath) {
-      t->response.set_success("text/plain", new MemoryStream(kServerResponse));
-    } else if (t->request.path == kServerPostPath) {
-      // reverse the data and reply
-      size_t size;
-      StreamInterface* in = t->request.document.get();
-      StreamInterface* out = new MemoryStream();
-      in->GetSize(&size);
-      for (size_t i = 0; i < size; ++i) {
-        char ch;
-        in->SetPosition(size - i - 1);
-        in->Read(&ch, 1, NULL, NULL);
-        out->Write(&ch, 1, NULL, NULL);
-      }
-      out->Rewind();
-      t->response.set_success("text/plain", out);
-    } else {
-      t->response.set_error(404);
-    }
-    server_.Respond(t);
-  }
-  void OnRequestDone(SignalThread* thread) {
-    done_ = true;
-  }
-
- private:
-  bool started_;
-  bool done_;
-  TestHttpServer server_;
-};
-
-TEST_F(AsyncHttpRequestTest, TestGetSuccess) {
-  AsyncHttpRequest* req = CreateGetRequest(
-      kServerHostnameAddr.hostname(), server().address().port(),
-      kServerGetPath);
-  EXPECT_FALSE(started());
-  req->Start();
-  EXPECT_TRUE_WAIT(started(), 100);  // Should have started by now.
-  EXPECT_TRUE_WAIT(done(), 5000);
-  std::string response;
-  EXPECT_EQ(200U, req->response().scode);
-  ASSERT_TRUE(req->response().document.get() != NULL);
-  req->response().document->Rewind();
-  req->response().document->ReadLine(&response);
-  EXPECT_EQ(kServerResponse, response);
-  req->Release();
-}
-
-TEST_F(AsyncHttpRequestTest, TestGetNotFound) {
-  AsyncHttpRequest* req = CreateGetRequest(
-      kServerHostnameAddr.hostname(), server().address().port(),
-      "/bad");
-  req->Start();
-  EXPECT_TRUE_WAIT(done(), 5000);
-  size_t size;
-  EXPECT_EQ(404U, req->response().scode);
-  ASSERT_TRUE(req->response().document.get() != NULL);
-  req->response().document->GetSize(&size);
-  EXPECT_EQ(0U, size);
-  req->Release();
-}
-
-TEST_F(AsyncHttpRequestTest, TestPostSuccess) {
-  AsyncHttpRequest* req = CreatePostRequest(
-      kServerHostnameAddr.hostname(), server().address().port(),
-      kServerPostPath, "text/plain", new MemoryStream("abcd1234"));
-  req->Start();
-  EXPECT_TRUE_WAIT(done(), 5000);
-  std::string response;
-  EXPECT_EQ(200U, req->response().scode);
-  ASSERT_TRUE(req->response().document.get() != NULL);
-  req->response().document->Rewind();
-  req->response().document->ReadLine(&response);
-  EXPECT_EQ("4321dcba", response);
-  req->Release();
-}
-
-// Ensure that we shut down properly even if work is outstanding.
-TEST_F(AsyncHttpRequestTest, TestCancel) {
-  AsyncHttpRequest* req = CreateGetRequest(
-      kServerHostnameAddr.hostname(), server().address().port(),
-      kServerGetPath);
-  req->Start();
-  req->Destroy(true);
-}
-
-TEST_F(AsyncHttpRequestTest, TestGetSuccessDelay) {
-  AsyncHttpRequest* req = CreateGetRequest(
-      kServerHostnameAddr.hostname(), server().address().port(),
-      kServerGetPath);
-  req->set_start_delay(10);  // Delay 10ms.
-  req->Start();
-  Thread::SleepMs(5);
-  EXPECT_FALSE(started());  // Should not have started immediately.
-  EXPECT_TRUE_WAIT(started(), 200);  // Should have started by now.
-  EXPECT_TRUE_WAIT(done(), 5000);
-  std::string response;
-  EXPECT_EQ(200U, req->response().scode);
-  ASSERT_TRUE(req->response().document.get() != NULL);
-  req->response().document->Rewind();
-  req->response().document->ReadLine(&response);
-  EXPECT_EQ(kServerResponse, response);
-  req->Release();
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/asyncpacketsocket.cc b/third_party/libjingle/source/talk/base/asyncpacketsocket.cc
deleted file mode 100644
index 7628c12..0000000
--- a/third_party/libjingle/source/talk/base/asyncpacketsocket.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice, 
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products 
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if defined(_MSC_VER) && _MSC_VER < 1300
-#pragma warning(disable:4786)
-#endif
-
-#include "talk/base/asyncpacketsocket.h"
-
-namespace talk_base {
-
-AsyncPacketSocket::AsyncPacketSocket(AsyncSocket* socket) : socket_(socket) {
-}
-
-AsyncPacketSocket::~AsyncPacketSocket() {
-  delete socket_;
-}
-
-SocketAddress AsyncPacketSocket::GetLocalAddress() const {
-  return socket_->GetLocalAddress();
-}
-
-SocketAddress AsyncPacketSocket::GetRemoteAddress() const {
-  return socket_->GetRemoteAddress();
-}
-
-int AsyncPacketSocket::Bind(const SocketAddress& addr) {
-  return socket_->Bind(addr);
-}
-
-int AsyncPacketSocket::Connect(const SocketAddress& addr) {
-  return socket_->Connect(addr);
-}
-
-int AsyncPacketSocket::Send(const void *pv, size_t cb) {
-  return socket_->Send(pv, cb);
-}
-
-int AsyncPacketSocket::SendTo(
-    const void *pv, size_t cb, const SocketAddress& addr) {
-  return socket_->SendTo(pv, cb, addr);
-}
-
-int AsyncPacketSocket::Close() {
-  return socket_->Close();
-}
-
-Socket::ConnState AsyncPacketSocket::GetState() const {
-  return socket_->GetState();
-}
-
-int AsyncPacketSocket::GetOption(Socket::Option opt, int* value) {
-  return socket_->GetOption(opt, value);
-}
-
-int AsyncPacketSocket::SetOption(Socket::Option opt, int value) {
-  return socket_->SetOption(opt, value);
-}
-
-int AsyncPacketSocket::GetError() const {
-  return socket_->GetError();
-}
-
-void AsyncPacketSocket::SetError(int error) {
-  return socket_->SetError(error);
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/asyncpacketsocket.h b/third_party/libjingle/source/talk/base/asyncpacketsocket.h
deleted file mode 100644
index 901b811..0000000
--- a/third_party/libjingle/source/talk/base/asyncpacketsocket.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice, 
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products 
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_ASYNCPACKETSOCKET_H_
-#define TALK_BASE_ASYNCPACKETSOCKET_H_
-
-#include "talk/base/sigslot.h"
-#include "talk/base/socket.h"
-
-namespace talk_base {
-
-// Provides the ability to receive packets asynchronously. Sends are not
-// buffered since it is acceptable to drop packets under high load.
-class AsyncPacketSocket : public sigslot::has_slots<> {
- public:
-  enum State {
-    STATE_CLOSED,
-    STATE_BINDING,
-    STATE_BOUND,
-    STATE_CONNECTING,
-    STATE_CONNECTED
-  };
-
-  AsyncPacketSocket() { }
-  virtual ~AsyncPacketSocket() { }
-
-  // Returns current local address. Address may be set to NULL if the
-  // socket is not bound yet (GetState() returns STATE_BINDING).
-  virtual SocketAddress GetLocalAddress() const = 0;
-
-  // Returns remote address. Returns zeroes if this is not a client TCP socket.
-  virtual SocketAddress GetRemoteAddress() const = 0;
-
-  // Send a packet.
-  virtual int Send(const void *pv, size_t cb) = 0;
-  virtual int SendTo(const void *pv, size_t cb, const SocketAddress& addr) = 0;
-
-  // Close the socket.
-  virtual int Close() = 0;
-
-  // Returns current state of the socket.
-  virtual State GetState() const = 0;
-
-  // Get/set options.
-  virtual int GetOption(Socket::Option opt, int* value) = 0;
-  virtual int SetOption(Socket::Option opt, int value) = 0;
-
-  // Get/Set current error.
-  // TODO: Remove SetError().
-  virtual int GetError() const = 0;
-  virtual void SetError(int error) = 0;
-
-  // Emitted each time a packet is read. Used only for UDP and
-  // connected TCP sockets.
-  sigslot::signal4<AsyncPacketSocket*, const char*, size_t,
-                   const SocketAddress&> SignalReadPacket;
-
-  // Emitted after address for the socket is allocated, i.e. binding
-  // is finished. State of the socket is changed from BINDING to BOUND
-  // (for UDP and server TCP sockets) or CONNECTING (for client TCP
-  // sockets).
-  sigslot::signal2<AsyncPacketSocket*, const SocketAddress&> SignalAddressReady;
-
-  // Emitted for client TCP sockets when state is changed from
-  // CONNECTING to CONNECTED.
-  sigslot::signal1<AsyncPacketSocket*> SignalConnect;
-
-  // Emitted for client TCP sockets when state is changed from
-  // CONNECTED to CLOSED.
-  sigslot::signal2<AsyncPacketSocket*, int> SignalClose;
-
-  // Used only for listening TCP sockets.
-  sigslot::signal2<AsyncPacketSocket*, AsyncPacketSocket*> SignalNewConnection;
-
- private:
-  DISALLOW_EVIL_CONSTRUCTORS(AsyncPacketSocket);
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_ASYNCPACKETSOCKET_H_
diff --git a/third_party/libjingle/source/talk/base/asyncsocket.cc b/third_party/libjingle/source/talk/base/asyncsocket.cc
deleted file mode 100644
index d9ed94c..0000000
--- a/third_party/libjingle/source/talk/base/asyncsocket.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * libjingle
- * Copyright 2010, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/asyncsocket.h"
-
-namespace talk_base {
-
-AsyncSocket::AsyncSocket() {
-}
-
-AsyncSocket::~AsyncSocket() {
-}
-
-AsyncSocketAdapter::AsyncSocketAdapter(AsyncSocket* socket) : socket_(NULL) {
-  Attach(socket);
-}
-
-AsyncSocketAdapter::~AsyncSocketAdapter() {
-  delete socket_;
-}
-
-void AsyncSocketAdapter::Attach(AsyncSocket* socket) {
-  ASSERT(!socket_);
-  socket_ = socket;
-  if (socket_) {
-    socket_->SignalConnectEvent.connect(this,
-        &AsyncSocketAdapter::OnConnectEvent);
-    socket_->SignalReadEvent.connect(this,
-        &AsyncSocketAdapter::OnReadEvent);
-    socket_->SignalWriteEvent.connect(this,
-        &AsyncSocketAdapter::OnWriteEvent);
-    socket_->SignalCloseEvent.connect(this,
-        &AsyncSocketAdapter::OnCloseEvent);
-  }
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/asyncsocket.h b/third_party/libjingle/source/talk/base/asyncsocket.h
deleted file mode 100644
index 3d12984..0000000
--- a/third_party/libjingle/source/talk/base/asyncsocket.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2010, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_ASYNCSOCKET_H_
-#define TALK_BASE_ASYNCSOCKET_H_
-
-#include "talk/base/common.h"
-#include "talk/base/sigslot.h"
-#include "talk/base/socket.h"
-
-namespace talk_base {
-
-// TODO: Remove Socket and rename AsyncSocket to Socket.
-
-// Provides the ability to perform socket I/O asynchronously.
-class AsyncSocket : public Socket {
- public:
-  AsyncSocket();
-  virtual ~AsyncSocket();
-
-  virtual AsyncSocket* Accept(SocketAddress* paddr) = 0;
-
-  sigslot::signal1<AsyncSocket*> SignalReadEvent;        // ready to read
-  sigslot::signal1<AsyncSocket*> SignalWriteEvent;       // ready to write
-  sigslot::signal1<AsyncSocket*> SignalConnectEvent;     // connected
-  sigslot::signal2<AsyncSocket*, int> SignalCloseEvent;  // closed
-};
-
-class AsyncSocketAdapter : public AsyncSocket, public sigslot::has_slots<> {
- public:
-  // The adapted socket may explicitly be NULL, and later assigned using Attach.
-  // However, subclasses which support detached mode must override any methods
-  // that will be called during the detached period (usually GetState()), to
-  // avoid dereferencing a null pointer.
-  explicit AsyncSocketAdapter(AsyncSocket* socket);
-  virtual ~AsyncSocketAdapter();
-  void Attach(AsyncSocket* socket);
-  virtual SocketAddress GetLocalAddress() const {
-    return socket_->GetLocalAddress();
-  }
-  virtual SocketAddress GetRemoteAddress() const {
-    return socket_->GetRemoteAddress();
-  }
-  virtual int Bind(const SocketAddress& addr) {
-    return socket_->Bind(addr);
-  }
-  virtual int Connect(const SocketAddress& addr) {
-    return socket_->Connect(addr);
-  }
-  virtual int Send(const void* pv, size_t cb) {
-    return socket_->Send(pv, cb);
-  }
-  virtual int SendTo(const void* pv, size_t cb, const SocketAddress& addr) {
-    return socket_->SendTo(pv, cb, addr);
-  }
-  virtual int Recv(void* pv, size_t cb) {
-    return socket_->Recv(pv, cb);
-  }
-  virtual int RecvFrom(void* pv, size_t cb, SocketAddress* paddr) {
-    return socket_->RecvFrom(pv, cb, paddr);
-  }
-  virtual int Listen(int backlog) {
-    return socket_->Listen(backlog);
-  }
-  virtual AsyncSocket* Accept(SocketAddress* paddr) {
-    return socket_->Accept(paddr);
-  }
-  virtual int Close() {
-    return socket_->Close();
-  }
-  virtual int GetError() const {
-    return socket_->GetError();
-  }
-  virtual void SetError(int error) {
-    return socket_->SetError(error);
-  }
-  virtual ConnState GetState() const {
-    return socket_->GetState();
-  }
-  virtual int EstimateMTU(uint16* mtu) {
-    return socket_->EstimateMTU(mtu);
-  }
-  virtual int GetOption(Option opt, int* value) {
-    return socket_->GetOption(opt, value);
-  }
-  virtual int SetOption(Option opt, int value) {
-    return socket_->SetOption(opt, value);
-  }
-
- protected:
-  virtual void OnConnectEvent(AsyncSocket* socket) {
-    SignalConnectEvent(this);
-  }
-  virtual void OnReadEvent(AsyncSocket* socket) {
-    SignalReadEvent(this);
-  }
-  virtual void OnWriteEvent(AsyncSocket* socket) {
-    SignalWriteEvent(this);
-  }
-  virtual void OnCloseEvent(AsyncSocket* socket, int err) {
-    SignalCloseEvent(this, err);
-  }
-
-  AsyncSocket* socket_;
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_ASYNCSOCKET_H_
diff --git a/third_party/libjingle/source/talk/base/asynctcpsocket.cc b/third_party/libjingle/source/talk/base/asynctcpsocket.cc
deleted file mode 100644
index de656ab..0000000
--- a/third_party/libjingle/source/talk/base/asynctcpsocket.cc
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2010, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/asynctcpsocket.h"
-
-#include <cstring>
-
-#include "talk/base/byteorder.h"
-#include "talk/base/common.h"
-#include "talk/base/logging.h"
-
-#ifdef POSIX
-#include <errno.h>
-#endif  // POSIX
-
-namespace talk_base {
-
-static const size_t MAX_PACKET_SIZE = 64 * 1024;
-
-typedef uint16 PacketLength;
-static const size_t PKT_LEN_SIZE = sizeof(PacketLength);
-
-static const size_t BUF_SIZE = MAX_PACKET_SIZE + PKT_LEN_SIZE;
-
-static const int LISTEN_BACKLOG = 5;
-
-// Binds and connects |socket| and creates AsyncTCPSocket for
-// it. Takes ownership of |socket|. Returns NULL if bind() or
-// connect() fail (|socket| is destroyed in that case).
-AsyncTCPSocket* AsyncTCPSocket::Create(
-    AsyncSocket* socket,
-    const SocketAddress& bind_address,
-    const SocketAddress& remote_address) {
-  scoped_ptr<AsyncSocket> owned_socket(socket);
-  if (socket->Bind(bind_address) < 0) {
-    LOG(LS_ERROR) << "Bind() failed with error " << socket->GetError();
-    return NULL;
-  }
-  if (socket->Connect(remote_address) < 0) {
-    LOG(LS_ERROR) << "Connect() failed with error " << socket->GetError();
-    return NULL;
-  }
-  return new AsyncTCPSocket(owned_socket.release(), false);
-}
-
-AsyncTCPSocket::AsyncTCPSocket(AsyncSocket* socket, bool listen)
-    : socket_(socket),
-      listen_(listen),
-      insize_(BUF_SIZE),
-      inpos_(0),
-      outsize_(BUF_SIZE),
-      outpos_(0) {
-  inbuf_ = new char[insize_];
-  outbuf_ = new char[outsize_];
-
-  ASSERT(socket_.get() != NULL);
-  socket_->SignalConnectEvent.connect(this, &AsyncTCPSocket::OnConnectEvent);
-  socket_->SignalReadEvent.connect(this, &AsyncTCPSocket::OnReadEvent);
-  socket_->SignalWriteEvent.connect(this, &AsyncTCPSocket::OnWriteEvent);
-  socket_->SignalCloseEvent.connect(this, &AsyncTCPSocket::OnCloseEvent);
-
-  if (listen_) {
-    if (socket_->Listen(LISTEN_BACKLOG) < 0) {
-      LOG(LS_ERROR) << "Listen() failed with error " << socket_->GetError();
-    }
-  }
-}
-
-AsyncTCPSocket::~AsyncTCPSocket() {
-  delete [] inbuf_;
-  delete [] outbuf_;
-}
-
-SocketAddress AsyncTCPSocket::GetLocalAddress() const {
-  return socket_->GetLocalAddress();
-}
-
-SocketAddress AsyncTCPSocket::GetRemoteAddress() const {
-  return socket_->GetRemoteAddress();
-}
-
-int AsyncTCPSocket::Send(const void *pv, size_t cb) {
-  if (cb > MAX_PACKET_SIZE) {
-    socket_->SetError(EMSGSIZE);
-    return -1;
-  }
-
-  // If we are blocking on send, then silently drop this packet
-  if (outpos_)
-    return static_cast<int>(cb);
-
-  PacketLength pkt_len = HostToNetwork16(static_cast<PacketLength>(cb));
-  memcpy(outbuf_, &pkt_len, PKT_LEN_SIZE);
-  memcpy(outbuf_ + PKT_LEN_SIZE, pv, cb);
-  outpos_ = PKT_LEN_SIZE + cb;
-
-  int res = Flush();
-  if (res <= 0) {
-    // drop packet if we made no progress
-    outpos_ = 0;
-    return res;
-  }
-
-  // We claim to have sent the whole thing, even if we only sent partial
-  return static_cast<int>(cb);
-}
-
-int AsyncTCPSocket::SendTo(const void *pv, size_t cb,
-                           const SocketAddress& addr) {
-  if (addr == GetRemoteAddress())
-    return Send(pv, cb);
-
-  ASSERT(false);
-  socket_->SetError(ENOTCONN);
-  return -1;
-}
-
-int AsyncTCPSocket::Close() {
-  return socket_->Close();
-}
-
-AsyncTCPSocket::State AsyncTCPSocket::GetState() const {
-  switch (socket_->GetState()) {
-    case Socket::CS_CLOSED:
-      return STATE_CLOSED;
-    case Socket::CS_CONNECTING:
-      if (listen_) {
-        return STATE_BOUND;
-      } else {
-        return STATE_CONNECTING;
-      }
-    case Socket::CS_CONNECTED:
-      return STATE_CONNECTED;
-    default:
-      ASSERT(false);
-      return STATE_CLOSED;
-  }
-}
-
-int AsyncTCPSocket::GetOption(Socket::Option opt, int* value) {
-  return socket_->GetOption(opt, value);
-}
-
-int AsyncTCPSocket::SetOption(Socket::Option opt, int value) {
-  return socket_->SetOption(opt, value);
-}
-
-int AsyncTCPSocket::GetError() const {
-  return socket_->GetError();
-}
-
-void AsyncTCPSocket::SetError(int error) {
-  return socket_->SetError(error);
-}
-
-int AsyncTCPSocket::SendRaw(const void * pv, size_t cb) {
-  if (outpos_ + cb > outsize_) {
-    socket_->SetError(EMSGSIZE);
-    return -1;
-  }
-
-  memcpy(outbuf_ + outpos_, pv, cb);
-  outpos_ += cb;
-
-  return Flush();
-}
-
-void AsyncTCPSocket::ProcessInput(char * data, size_t& len) {
-  SocketAddress remote_addr(GetRemoteAddress());
-
-  while (true) {
-    if (len < PKT_LEN_SIZE)
-      return;
-
-    PacketLength pkt_len;
-    memcpy(&pkt_len, data, PKT_LEN_SIZE);
-    pkt_len = NetworkToHost16(pkt_len);
-
-    if (len < PKT_LEN_SIZE + pkt_len)
-      return;
-
-    SignalReadPacket(this, data + PKT_LEN_SIZE, pkt_len, remote_addr);
-
-    len -= PKT_LEN_SIZE + pkt_len;
-    if (len > 0) {
-      memmove(data, data + PKT_LEN_SIZE + pkt_len, len);
-    }
-  }
-}
-
-int AsyncTCPSocket::Flush() {
-  int res = socket_->Send(outbuf_, outpos_);
-  if (res <= 0) {
-    return res;
-  }
-  if (static_cast<size_t>(res) <= outpos_) {
-    outpos_ -= res;
-  } else {
-    ASSERT(false);
-    return -1;
-  }
-  if (outpos_ > 0) {
-    memmove(outbuf_, outbuf_ + res, outpos_);
-  }
-  return res;
-}
-
-void AsyncTCPSocket::OnConnectEvent(AsyncSocket* socket) {
-  SignalConnect(this);
-}
-
-void AsyncTCPSocket::OnReadEvent(AsyncSocket* socket) {
-  ASSERT(socket_.get() == socket);
-
-  if (listen_) {
-    talk_base::SocketAddress address;
-    talk_base::AsyncSocket* new_socket = socket->Accept(&address);
-    if (!new_socket) {
-      // TODO: Do something better like forwarding the error
-      // to the user.
-      LOG(LS_ERROR) << "TCP accept failed with error " << socket_->GetError();
-      return;
-    }
-
-    SignalNewConnection(this, new AsyncTCPSocket(new_socket, false));
-
-    // Prime a read event in case data is waiting.
-    new_socket->SignalReadEvent(new_socket);
-  } else {
-    int len = socket_->Recv(inbuf_ + inpos_, insize_ - inpos_);
-    if (len < 0) {
-      // TODO: Do something better like forwarding the error to the user.
-      if (!socket_->IsBlocking()) {
-        LOG(LS_ERROR) << "Recv() returned error: " << socket_->GetError();
-      }
-      return;
-    }
-
-    inpos_ += len;
-
-    ProcessInput(inbuf_, inpos_);
-
-    if (inpos_ >= insize_) {
-      LOG(LS_ERROR) << "input buffer overflow";
-      ASSERT(false);
-      inpos_ = 0;
-    }
-  }
-}
-
-void AsyncTCPSocket::OnWriteEvent(AsyncSocket* socket) {
-  ASSERT(socket_.get() == socket);
-
-  if (outpos_ > 0) {
-    Flush();
-  }
-}
-
-void AsyncTCPSocket::OnCloseEvent(AsyncSocket* socket, int error) {
-  SignalClose(this, error);
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/asynctcpsocket.h b/third_party/libjingle/source/talk/base/asynctcpsocket.h
deleted file mode 100644
index 07d6284..0000000
--- a/third_party/libjingle/source/talk/base/asynctcpsocket.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2010, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_ASYNCTCPSOCKET_H_
-#define TALK_BASE_ASYNCTCPSOCKET_H_
-
-#include "talk/base/asyncpacketsocket.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/socketfactory.h"
-
-namespace talk_base {
-
-// Simulates UDP semantics over TCP.  Send and Recv packet sizes
-// are preserved, and drops packets silently on Send, rather than
-// buffer them in user space.
-class AsyncTCPSocket : public AsyncPacketSocket {
- public:
-  // Binds and connects |socket| and creates AsyncTCPSocket for
-  // it. Takes ownership of |socket|. Returns NULL if bind() or
-  // connect() fail (|socket| is destroyed in that case).
-  static AsyncTCPSocket* Create(AsyncSocket* socket,
-                                const SocketAddress& bind_address,
-                                const SocketAddress& remote_address);
-  explicit AsyncTCPSocket(AsyncSocket* socket, bool listen);
-  virtual ~AsyncTCPSocket();
-
-  virtual SocketAddress GetLocalAddress() const;
-  virtual SocketAddress GetRemoteAddress() const;
-  virtual int Send(const void *pv, size_t cb);
-  virtual int SendTo(const void *pv, size_t cb, const SocketAddress& addr);
-  virtual int Close();
-
-  virtual State GetState() const;
-  virtual int GetOption(Socket::Option opt, int* value);
-  virtual int SetOption(Socket::Option opt, int value);
-  virtual int GetError() const;
-  virtual void SetError(int error);
-
- protected:
-  int SendRaw(const void* pv, size_t cb);
-  virtual void ProcessInput(char* data, size_t& len);
-
- private:
-  int Flush();
-
-  // Called by the underlying socket
-  void OnConnectEvent(AsyncSocket* socket);
-  void OnReadEvent(AsyncSocket* socket);
-  void OnWriteEvent(AsyncSocket* socket);
-  void OnCloseEvent(AsyncSocket* socket, int error);
-
-  scoped_ptr<AsyncSocket> socket_;
-  bool listen_;
-  char* inbuf_, * outbuf_;
-  size_t insize_, inpos_, outsize_, outpos_;
-
-  DISALLOW_EVIL_CONSTRUCTORS(AsyncTCPSocket);
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_ASYNCTCPSOCKET_H_
diff --git a/third_party/libjingle/source/talk/base/asyncudpsocket.cc b/third_party/libjingle/source/talk/base/asyncudpsocket.cc
deleted file mode 100644
index 8452a65..0000000
--- a/third_party/libjingle/source/talk/base/asyncudpsocket.cc
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice, 
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products 
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/asyncudpsocket.h"
-#include "talk/base/logging.h"
-
-namespace talk_base {
-
-static const int BUF_SIZE = 64 * 1024;
-
-AsyncUDPSocket* AsyncUDPSocket::Create(
-    AsyncSocket* socket,
-    const SocketAddress& bind_address) {
-  scoped_ptr<AsyncSocket> owned_socket(socket);
-  if (socket->Bind(bind_address) < 0) {
-    LOG(LS_ERROR) << "Bind() failed with error " << socket->GetError();
-    return NULL;
-  }
-  return new AsyncUDPSocket(owned_socket.release());
-}
-
-AsyncUDPSocket* AsyncUDPSocket::Create(SocketFactory* factory,
-                                       const SocketAddress& bind_address) {
-  AsyncSocket* socket = factory->CreateAsyncSocket(SOCK_DGRAM);
-  if (!socket)
-    return NULL;
-  return Create(socket, bind_address);
-}
-
-AsyncUDPSocket::AsyncUDPSocket(AsyncSocket* socket)
-    : socket_(socket) {
-  ASSERT(socket_.get() != NULL);
-  size_ = BUF_SIZE;
-  buf_ = new char[size_];
-
-  // The socket should start out readable but not writable.
-  socket_->SignalReadEvent.connect(this, &AsyncUDPSocket::OnReadEvent);
-}
-
-AsyncUDPSocket::~AsyncUDPSocket() {
-  delete [] buf_;
-}
-
-SocketAddress AsyncUDPSocket::GetLocalAddress() const {
-  return socket_->GetLocalAddress();
-}
-
-SocketAddress AsyncUDPSocket::GetRemoteAddress() const {
-  return socket_->GetRemoteAddress();
-}
-
-int AsyncUDPSocket::Send(const void *pv, size_t cb) {
-  return socket_->Send(pv, cb);
-}
-
-int AsyncUDPSocket::SendTo(
-    const void *pv, size_t cb, const SocketAddress& addr) {
-  return socket_->SendTo(pv, cb, addr);
-}
-
-int AsyncUDPSocket::Close() {
-  return socket_->Close();
-}
-
-AsyncUDPSocket::State AsyncUDPSocket::GetState() const {
-  return STATE_BOUND;
-}
-
-int AsyncUDPSocket::GetOption(Socket::Option opt, int* value) {
-  return socket_->GetOption(opt, value);
-}
-
-int AsyncUDPSocket::SetOption(Socket::Option opt, int value) {
-  return socket_->SetOption(opt, value);
-}
-
-int AsyncUDPSocket::GetError() const {
-  return socket_->GetError();
-}
-
-void AsyncUDPSocket::SetError(int error) {
-  return socket_->SetError(error);
-}
-
-void AsyncUDPSocket::OnReadEvent(AsyncSocket* socket) {
-  ASSERT(socket_.get() == socket);
-
-  SocketAddress remote_addr;
-  int len = socket_->RecvFrom(buf_, size_, &remote_addr);
-  if (len < 0) {
-    // An error here typically means we got an ICMP error in response to our
-    // send datagram, indicating the remote address was unreachable.
-    // When doing ICE, this kind of thing will often happen.
-    // TODO: Do something better like forwarding the error to the user.
-    SocketAddress local_addr = socket_->GetLocalAddress();
-    LOG(LS_INFO) << "AsyncUDPSocket[" << local_addr.ToString() << "] "
-                 << "receive failed with error " << socket_->GetError();
-    return;
-  }
-
-  // TODO: Make sure that we got all of the packet.
-  // If we did not, then we should resize our buffer to be large enough.
-  SignalReadPacket(this, buf_, (size_t)len, remote_addr);
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/asyncudpsocket.h b/third_party/libjingle/source/talk/base/asyncudpsocket.h
deleted file mode 100644
index 207d119..0000000
--- a/third_party/libjingle/source/talk/base/asyncudpsocket.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice, 
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products 
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_ASYNCUDPSOCKET_H_
-#define TALK_BASE_ASYNCUDPSOCKET_H_
-
-#include "talk/base/asyncpacketsocket.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/socketfactory.h"
-
-namespace talk_base {
-
-// Provides the ability to receive packets asynchronously.  Sends are not
-// buffered since it is acceptable to drop packets under high load.
-class AsyncUDPSocket : public AsyncPacketSocket {
- public:
-  // Binds |socket| and creates AsyncUDPSocket for it. Takes ownership
-  // of |socket|. Returns NULL if bind() fails (|socket| is destroyed
-  // in that case).
-  static AsyncUDPSocket* Create(AsyncSocket* socket,
-                                const SocketAddress& bind_address);
-  // Creates a new socket for sending asynchronous UDP packets using an
-  // asynchronous socket from the given factory.
-  static AsyncUDPSocket* Create(SocketFactory* factory,
-                                const SocketAddress& bind_address);
-  explicit AsyncUDPSocket(AsyncSocket* socket);
-  virtual ~AsyncUDPSocket();
-
-  virtual SocketAddress GetLocalAddress() const;
-  virtual SocketAddress GetRemoteAddress() const;
-  virtual int Send(const void *pv, size_t cb);
-  virtual int SendTo(const void *pv, size_t cb, const SocketAddress& addr);
-  virtual int Close();
-
-  virtual State GetState() const;
-  virtual int GetOption(Socket::Option opt, int* value);
-  virtual int SetOption(Socket::Option opt, int value);
-  virtual int GetError() const;
-  virtual void SetError(int error);
-
- private:
-  // Called when the underlying socket is ready to be read from.
-  void OnReadEvent(AsyncSocket* socket);
-
-  scoped_ptr<AsyncSocket> socket_;
-  char* buf_;
-  size_t size_;
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_ASYNCUDPSOCKET_H_
diff --git a/third_party/libjingle/source/talk/base/atomicops.h b/third_party/libjingle/source/talk/base/atomicops.h
deleted file mode 100644
index 94ade69..0000000
--- a/third_party/libjingle/source/talk/base/atomicops.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * libjingle
- * Copyright 2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_ATOMICOPS_H_
-#define TALK_BASE_ATOMICOPS_H_
-
-#include <string>
-
-#include "talk/base/basictypes.h"
-#include "talk/base/common.h"
-#include "talk/base/logging.h"
-#include "talk/base/scoped_ptr.h"
-
-namespace talk_base {
-
-// A single-producer, single-consumer, fixed-size queue.
-// All methods not ending in Unsafe can be safely called without locking,
-// provided that calls to consumer methods (Peek/Pop) or producer methods (Push)
-// only happen on a single thread per method type. If multiple threads need to
-// read simultaneously or write simultaneously, other synchronization is
-// necessary. Synchronization is also required if a call into any Unsafe method
-// could happen at the same time as a call to any other method.
-template <typename T>
-class FixedSizeLockFreeQueue {
- private:
-// Atomic primitives and memory barrier
-#if defined(__arm__)
-  typedef uint32 Atomic32;
-
-  // Copied from google3/base/atomicops-internals-arm-v6plus.h
-  static inline void MemoryBarrier() {
-    asm volatile("dmb":::"memory");
-  }
-
-  // Adapted from google3/base/atomicops-internals-arm-v6plus.h
-  static inline void AtomicIncrement(volatile Atomic32* ptr) {
-    Atomic32 str_success, value;
-    asm volatile (
-        "1:\n"
-        "ldrex  %1, [%2]\n"
-        "add    %1, %1, #1\n"
-        "strex  %0, %1, [%2]\n"
-        "teq    %0, #0\n"
-        "bne    1b"
-        : "=&r"(str_success), "=&r"(value)
-        : "r" (ptr)
-        : "cc", "memory");
-  }
-#elif !defined(SKIP_ATOMIC_CHECK)
-#error "No atomic operations defined for the given architecture."
-#endif
-
- public:
-  // Constructs an empty queue, with capacity 0.
-  FixedSizeLockFreeQueue() : pushed_count_(0),
-                             popped_count_(0),
-                             capacity_(0),
-                             data_(NULL) {}
-  // Constructs an empty queue with the given capacity.
-  FixedSizeLockFreeQueue(size_t capacity) : pushed_count_(0),
-                                            popped_count_(0),
-                                            capacity_(capacity),
-                                            data_(new T[capacity]) {}
-
-  // Pushes a value onto the queue. Returns true if the value was successfully
-  // pushed (there was space in the queue). This method can be safely called at
-  // the same time as PeekFront/PopFront.
-  bool PushBack(T value) {
-    if (capacity_ == 0) {
-      LOG(LS_WARNING) << "Queue capacity is 0.";
-      return false;
-    }
-    if (IsFull()) {
-      return false;
-    }
-
-    data_[pushed_count_ % capacity_] = value;
-    // Make sure the data is written before the count is incremented, so other
-    // threads can't see the value exists before being able to read it.
-    MemoryBarrier();
-    AtomicIncrement(&pushed_count_);
-    return true;
-  }
-
-  // Retrieves the oldest value pushed onto the queue. Returns true if there was
-  // an item to peek (the queue was non-empty). This method can be safely called
-  // at the same time as PushBack.
-  bool PeekFront(T* value_out) {
-    if (capacity_ == 0) {
-      LOG(LS_WARNING) << "Queue capacity is 0.";
-      return false;
-    }
-    if (IsEmpty()) {
-      return false;
-    }
-
-    *value_out = data_[popped_count_ % capacity_];
-    return true;
-  }
-
-  // Retrieves the oldest value pushed onto the queue and removes it from the
-  // queue. Returns true if there was an item to pop (the queue was non-empty).
-  // This method can be safely called at the same time as PushBack.
-  bool PopFront(T* value_out) {
-    if (PeekFront(value_out)) {
-      AtomicIncrement(&popped_count_);
-      return true;
-    }
-    return false;
-  }
-
-  // Clears the current items in the queue and sets the new (fixed) size. This
-  // method cannot be called at the same time as any other method.
-  void ClearAndResizeUnsafe(int new_capacity) {
-    capacity_ = new_capacity;
-    data_.reset(new T[new_capacity]);
-    pushed_count_ = 0;
-    popped_count_ = 0;
-  }
-
-  // Returns true if there is no space left in the queue for new elements.
-  int IsFull() const { return pushed_count_ == popped_count_ + capacity_; }
-  // Returns true if there are no elements in the queue.
-  int IsEmpty() const { return pushed_count_ == popped_count_; }
-  // Returns the current number of elements in the queue. This is always in the
-  // range [0, capacity]
-  size_t Size() const { return pushed_count_ - popped_count_; }
-
-  // Returns the capacity of the queue (max size).
-  size_t capacity() const { return capacity_; }
-
- private:
-  volatile Atomic32 pushed_count_;
-  volatile Atomic32 popped_count_;
-  size_t capacity_;
-  talk_base::scoped_array<T> data_;
-  DISALLOW_COPY_AND_ASSIGN(FixedSizeLockFreeQueue);
-};
-
-}
-
-#endif  // TALK_BASE_ATOMICOPS_H_
diff --git a/third_party/libjingle/source/talk/base/atomicops_unittest.cc b/third_party/libjingle/source/talk/base/atomicops_unittest.cc
deleted file mode 100644
index 24804c6..0000000
--- a/third_party/libjingle/source/talk/base/atomicops_unittest.cc
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * libjingle
- * Copyright 2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if !defined(__arm__)
-// For testing purposes, define faked versions of the atomic operations
-#include "talk/base/basictypes.h"
-namespace talk_base {
-typedef uint32 Atomic32;
-static inline void MemoryBarrier() { }
-static inline void AtomicIncrement(volatile Atomic32* ptr) {
-  *ptr = *ptr + 1;
-}
-}
-#define SKIP_ATOMIC_CHECK
-#endif
-
-#include "talk/base/atomicops.h"
-#include "talk/base/gunit.h"
-#include "talk/base/helpers.h"
-#include "talk/base/logging.h"
-
-TEST(FixedSizeLockFreeQueueTest, TestDefaultConstruct) {
-  talk_base::FixedSizeLockFreeQueue<int> queue;
-  EXPECT_EQ(0u, queue.capacity());
-  EXPECT_EQ(0u, queue.Size());
-  EXPECT_FALSE(queue.PushBack(1));
-  int val;
-  EXPECT_FALSE(queue.PopFront(&val));
-}
-
-TEST(FixedSizeLockFreeQueueTest, TestConstruct) {
-  talk_base::FixedSizeLockFreeQueue<int> queue(5);
-  EXPECT_EQ(5u, queue.capacity());
-  EXPECT_EQ(0u, queue.Size());
-  int val;
-  EXPECT_FALSE(queue.PopFront(&val));
-}
-
-TEST(FixedSizeLockFreeQueueTest, TestPushPop) {
-  talk_base::FixedSizeLockFreeQueue<int> queue(2);
-  EXPECT_EQ(2u, queue.capacity());
-  EXPECT_EQ(0u, queue.Size());
-  EXPECT_TRUE(queue.PushBack(1));
-  EXPECT_EQ(1u, queue.Size());
-  EXPECT_TRUE(queue.PushBack(2));
-  EXPECT_EQ(2u, queue.Size());
-  EXPECT_FALSE(queue.PushBack(3));
-  EXPECT_EQ(2u, queue.Size());
-  int val;
-  EXPECT_TRUE(queue.PopFront(&val));
-  EXPECT_EQ(1, val);
-  EXPECT_EQ(1u, queue.Size());
-  EXPECT_TRUE(queue.PopFront(&val));
-  EXPECT_EQ(2, val);
-  EXPECT_EQ(0u, queue.Size());
-  EXPECT_FALSE(queue.PopFront(&val));
-  EXPECT_EQ(0u, queue.Size());
-}
-
-TEST(FixedSizeLockFreeQueueTest, TestResize) {
-  talk_base::FixedSizeLockFreeQueue<int> queue(2);
-  EXPECT_EQ(2u, queue.capacity());
-  EXPECT_EQ(0u, queue.Size());
-  EXPECT_TRUE(queue.PushBack(1));
-  EXPECT_EQ(1u, queue.Size());
-
-  queue.ClearAndResizeUnsafe(5);
-  EXPECT_EQ(5u, queue.capacity());
-  EXPECT_EQ(0u, queue.Size());
-  int val;
-  EXPECT_FALSE(queue.PopFront(&val));
-}
diff --git a/third_party/libjingle/source/talk/base/autodetectproxy.cc b/third_party/libjingle/source/talk/base/autodetectproxy.cc
deleted file mode 100644
index 37faa4d..0000000
--- a/third_party/libjingle/source/talk/base/autodetectproxy.cc
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/autodetectproxy.h"
-#include "talk/base/httpcommon.h"
-#include "talk/base/httpcommon-inl.h"
-#include "talk/base/proxydetect.h"
-
-namespace talk_base {
-
-enum { MSG_TIMEOUT = SignalThread::ST_MSG_FIRST_AVAILABLE };
-
-static const ProxyType TEST_ORDER[] = {
-  PROXY_HTTPS, PROXY_SOCKS5, PROXY_UNKNOWN
-};
-
-static const int kSavedStringLimit = 128;
-
-static void SaveStringToStack(char *dst,
-                              const std::string &src,
-                              size_t dst_size) {
-  strncpy(dst, src.c_str(), dst_size - 1);
-  dst[dst_size - 1] = '\0';
-}
-
-AutoDetectProxy::AutoDetectProxy(const std::string& user_agent)
-    : agent_(user_agent), socket_(NULL), next_(0) {
-}
-
-AutoDetectProxy::~AutoDetectProxy() {
-}
-
-void AutoDetectProxy::DoWork() {
-  // TODO: Try connecting to server_url without proxy first here?
-  if (!server_url_.empty()) {
-    LOG(LS_INFO) << "GetProxySettingsForUrl(" << server_url_ << ") - start";
-    GetProxySettingsForUrl(agent_.c_str(), server_url_.c_str(), proxy_, true);
-    LOG(LS_INFO) << "GetProxySettingsForUrl - stop";
-  }
-  Url<char> url(proxy_.address.IPAsString());
-  if (url.valid()) {
-    LOG(LS_WARNING) << "AutoDetectProxy removing http prefix on proxy host";
-    proxy_.address.SetIP(url.host());
-  }
-  LOG(LS_INFO) << "AutoDetectProxy found proxy at " << proxy_.address;
-  if (proxy_.type == PROXY_UNKNOWN) {
-    LOG(LS_INFO) << "AutoDetectProxy initiating proxy classification";
-    Next();
-    // Process I/O until Stop()
-    Thread::Current()->ProcessMessages(kForever);
-    // Clean up the autodetect socket, from the thread that created it
-    delete socket_;
-  }
-  // TODO: If we found a proxy, try to use it to verify that it
-  // works by sending a request to server_url. This could either be
-  // done here or by the HttpPortAllocator.
-}
-
-void AutoDetectProxy::OnMessage(Message *msg) {
-  if (MSG_TIMEOUT == msg->message_id) {
-    OnCloseEvent(socket_, ETIMEDOUT);
-  } else {
-    // This must be the ST_MSG_WORKER_DONE message that deletes the
-    // AutoDetectProxy object. We have observed crashes within this stack that
-    // seem to be highly reproducible for a small subset of users and thus are
-    // probably correlated with a specific proxy setting, so copy potentially
-    // relevant information onto the stack to make it available in Windows
-    // minidumps.
-
-    // Save the user agent and the number of auto-detection passes that we
-    // needed.
-    char agent[kSavedStringLimit];
-    SaveStringToStack(agent, agent_, sizeof agent);
-
-    int next = next_;
-
-    // Now the detected proxy config (minus the password field, which could be
-    // sensitive).
-    ProxyType type = proxy().type;
-
-    char address_hostname[kSavedStringLimit];
-    SaveStringToStack(address_hostname,
-                      proxy().address.hostname(),
-                      sizeof address_hostname);
-
-    IPAddress address_ip = proxy().address.ipaddr();
-
-    uint16 address_port = proxy().address.port();
-
-    char autoconfig_url[kSavedStringLimit];
-    SaveStringToStack(autoconfig_url,
-                      proxy().autoconfig_url,
-                      sizeof autoconfig_url);
-
-    bool autodetect = proxy().autodetect;
-
-    char bypass_list[kSavedStringLimit];
-    SaveStringToStack(bypass_list, proxy().bypass_list, sizeof bypass_list);
-
-    char username[kSavedStringLimit];
-    SaveStringToStack(username, proxy().username, sizeof username);
-
-    SignalThread::OnMessage(msg);
-
-    // Log the gathered data at a log level that will never actually be enabled
-    // so that the compiler is forced to retain the data on the stack.
-    LOG(LS_SENSITIVE) << agent << " " << next << " " << type << " "
-                      << address_hostname << " " << address_ip << " "
-                      << address_port << " " << autoconfig_url << " "
-                      << autodetect << " " << bypass_list << " " << username;
-  }
-}
-
-void AutoDetectProxy::Next() {
-  if (TEST_ORDER[next_] >= PROXY_UNKNOWN) {
-    Complete(PROXY_UNKNOWN);
-    return;
-  }
-
-  LOG(LS_VERBOSE) << "AutoDetectProxy connecting to "
-                  << proxy_.address.ToString();
-
-  if (socket_) {
-    Thread::Current()->Clear(this, MSG_TIMEOUT);
-    socket_->Close();
-    Thread::Current()->Dispose(socket_);
-    socket_ = NULL;
-  }
-
-  socket_ = Thread::Current()->socketserver()->CreateAsyncSocket(SOCK_STREAM);
-  socket_->SignalConnectEvent.connect(this, &AutoDetectProxy::OnConnectEvent);
-  socket_->SignalReadEvent.connect(this, &AutoDetectProxy::OnReadEvent);
-  socket_->SignalCloseEvent.connect(this, &AutoDetectProxy::OnCloseEvent);
-  socket_->Connect(proxy_.address);
-
-  // Timeout after 2 seconds
-  Thread::Current()->PostDelayed(2000, this, MSG_TIMEOUT);
-}
-
-void AutoDetectProxy::Complete(ProxyType type) {
-  Thread::Current()->Clear(this, MSG_TIMEOUT);
-  socket_->Close();
-
-  proxy_.type = type;
-  LoggingSeverity sev = (proxy_.type == PROXY_UNKNOWN) ? LS_ERROR : LS_INFO;
-  LOG_V(sev) << "AutoDetectProxy detected " << proxy_.address.ToString()
-             << " as type " << proxy_.type;
-
-  Thread::Current()->Quit();
-}
-
-void AutoDetectProxy::OnConnectEvent(AsyncSocket * socket) {
-  std::string probe;
-
-  switch (TEST_ORDER[next_]) {
-    case PROXY_HTTPS:
-      probe.assign("CONNECT www.google.com:443 HTTP/1.0\r\n"
-                   "User-Agent: ");
-      probe.append(agent_);
-      probe.append("\r\n"
-                   "Host: www.google.com\r\n"
-                   "Content-Length: 0\r\n"
-                   "Proxy-Connection: Keep-Alive\r\n"
-                   "\r\n");
-      break;
-    case PROXY_SOCKS5:
-      probe.assign("\005\001\000", 3);
-      break;
-    default:
-      ASSERT(false);
-      return;
-  }
-
-  LOG(LS_VERBOSE) << "AutoDetectProxy probing type " << TEST_ORDER[next_]
-                  << " sending " << probe.size() << " bytes";
-  socket_->Send(probe.data(), probe.size());
-}
-
-void AutoDetectProxy::OnReadEvent(AsyncSocket * socket) {
-  char data[257];
-  int len = socket_->Recv(data, 256);
-  if (len > 0) {
-    data[len] = 0;
-    LOG(LS_VERBOSE) << "AutoDetectProxy read " << len << " bytes";
-  }
-
-  switch (TEST_ORDER[next_]) {
-    case PROXY_HTTPS:
-      if ((len >= 2) && (data[0] == '\x05')) {
-        Complete(PROXY_SOCKS5);
-        return;
-      }
-      if ((len >= 5) && (strncmp(data, "HTTP/", 5) == 0)) {
-        Complete(PROXY_HTTPS);
-        return;
-      }
-      break;
-    case PROXY_SOCKS5:
-      if ((len >= 2) && (data[0] == '\x05')) {
-        Complete(PROXY_SOCKS5);
-        return;
-      }
-      break;
-    default:
-      ASSERT(false);
-      return;
-  }
-
-  ++next_;
-  Next();
-}
-
-void AutoDetectProxy::OnCloseEvent(AsyncSocket * socket, int error) {
-  LOG(LS_VERBOSE) << "AutoDetectProxy closed with error: " << error;
-  ++next_;
-  Next();
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/autodetectproxy.h b/third_party/libjingle/source/talk/base/autodetectproxy.h
deleted file mode 100644
index 121737f..0000000
--- a/third_party/libjingle/source/talk/base/autodetectproxy.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_AUTODETECTPROXY_H_
-#define TALK_BASE_AUTODETECTPROXY_H_
-
-#include <string>
-
-#include "talk/base/constructormagic.h"
-#include "talk/base/cryptstring.h"
-#include "talk/base/proxyinfo.h"
-#include "talk/base/signalthread.h"
-
-namespace talk_base {
-
-///////////////////////////////////////////////////////////////////////////////
-// AutoDetectProxy
-///////////////////////////////////////////////////////////////////////////////
-
-class AsyncSocket;
-
-class AutoDetectProxy : public SignalThread {
- public:
-  explicit AutoDetectProxy(const std::string& user_agent);
-
-  const ProxyInfo& proxy() const { return proxy_; }
-
-  void set_server_url(const std::string& url) {
-    server_url_ = url;
-  }
-  void set_proxy(const SocketAddress& proxy) {
-    proxy_.type = PROXY_UNKNOWN;
-    proxy_.address = proxy;
-  }
-  void set_auth_info(bool use_auth, const std::string& username,
-                     const CryptString& password) {
-    if (use_auth) {
-      proxy_.username = username;
-      proxy_.password = password;
-    }
-  }
-
- protected:
-  virtual ~AutoDetectProxy();
-
-  // SignalThread Interface
-  virtual void DoWork();
-  virtual void OnMessage(Message *msg);
-
-  void Next();
-  void Complete(ProxyType type);
-
-  void OnConnectEvent(AsyncSocket * socket);
-  void OnReadEvent(AsyncSocket * socket);
-  void OnCloseEvent(AsyncSocket * socket, int error);
-
- private:
-  std::string agent_;
-  std::string server_url_;
-  ProxyInfo proxy_;
-  AsyncSocket* socket_;
-  int next_;
-
-  DISALLOW_IMPLICIT_CONSTRUCTORS(AutoDetectProxy);
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_AUTODETECTPROXY_H_
diff --git a/third_party/libjingle/source/talk/base/autodetectproxy_unittest.cc b/third_party/libjingle/source/talk/base/autodetectproxy_unittest.cc
deleted file mode 100644
index bdf2786..0000000
--- a/third_party/libjingle/source/talk/base/autodetectproxy_unittest.cc
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/autodetectproxy.h"
-#include "talk/base/gunit.h"
-#include "talk/base/httpcommon.h"
-#include "talk/base/httpcommon-inl.h"
-
-namespace talk_base {
-
-static const char kUserAgent[] = "";
-static const char kPath[] = "/";
-static const char kHost[] = "relay.google.com";
-static const uint16 kPort = 443;
-static const bool kSecure = true;
-// Each of the two stages in AutoDetectProxy has a 2-second time-out, so 5
-// seconds total should be enough.
-static const int kTimeoutMs = 5000;
-
-class AutoDetectProxyTest : public testing::Test, public sigslot::has_slots<> {
- public:
-  AutoDetectProxyTest() : auto_detect_proxy_(NULL), done_(false) {}
-
- protected:
-  bool Create(const std::string &user_agent,
-              const std::string &path,
-              const std::string &host,
-              uint16 port,
-              bool secure) {
-    auto_detect_proxy_ = new AutoDetectProxy(user_agent);
-    EXPECT_TRUE(auto_detect_proxy_ != NULL);
-    if (!auto_detect_proxy_) {
-      return false;
-    }
-    Url<char> host_url(path, host, port);
-    host_url.set_secure(secure);
-    auto_detect_proxy_->set_server_url(host_url.url());
-    auto_detect_proxy_->SignalWorkDone.connect(
-        this,
-        &AutoDetectProxyTest::OnWorkDone);
-    auto_detect_proxy_->Start();
-    return true;
-  }
-
-  bool Run(int timeout_ms) {
-    EXPECT_TRUE_WAIT(done_, timeout_ms);
-    return done_;
-  }
-
- private:
-  void OnWorkDone(talk_base::SignalThread *thread) {
-    AutoDetectProxy *auto_detect_proxy =
-        static_cast<talk_base::AutoDetectProxy *>(thread);
-    EXPECT_TRUE(auto_detect_proxy == auto_detect_proxy_);
-    auto_detect_proxy_ = NULL;
-    auto_detect_proxy->Release();
-    done_ = true;
-  }
-
-  AutoDetectProxy *auto_detect_proxy_;
-  bool done_;
-};
-
-// Test that proxy detection completes successfully. (Does not actually verify
-// the correct detection result since we don't know what proxy to expect on an
-// arbitrary machine.)
-TEST_F(AutoDetectProxyTest, TestProxyDetection) {
-  ASSERT_TRUE(Create(kUserAgent,
-                     kPath,
-                     kHost,
-                     kPort,
-                     kSecure));
-  ASSERT_TRUE(Run(kTimeoutMs));
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/bandwidthsmoother.cc b/third_party/libjingle/source/talk/base/bandwidthsmoother.cc
deleted file mode 100644
index 130f2a8..0000000
--- a/third_party/libjingle/source/talk/base/bandwidthsmoother.cc
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * libjingle
- * Copyright 2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/bandwidthsmoother.h"
-
-#include <limits.h>
-
-namespace talk_base {
-
-BandwidthSmoother::BandwidthSmoother(int initial_bandwidth_guess,
-                                     uint32 time_between_increase,
-                                     double percent_increase,
-                                     size_t samples_count_to_average)
-    : time_between_increase_(time_between_increase),
-      percent_increase_(talk_base::_max(1.0, percent_increase)),
-      time_at_last_change_(0),
-      bandwidth_estimation_(initial_bandwidth_guess),
-      accumulator_(samples_count_to_average) {
-}
-
-// Samples a new bandwidth measurement
-// returns true if the bandwidth estimation changed
-bool BandwidthSmoother::Sample(uint32 sample_time, int bandwidth) {
-  if (bandwidth < 0) {
-    return false;
-  }
-
-  accumulator_.AddSample(bandwidth);
-
-  // Replace bandwidth with the mean of sampled bandwidths.
-  bandwidth = accumulator_.ComputeMean();
-
-  if (bandwidth < bandwidth_estimation_) {
-    time_at_last_change_ = sample_time;
-    bandwidth_estimation_ = bandwidth;
-    return true;
-  }
-
-  const int old_bandwidth_estimation = bandwidth_estimation_;
-  const double increase_threshold_d = percent_increase_ * bandwidth_estimation_;
-  if (increase_threshold_d > INT_MAX) {
-    // If bandwidth goes any higher we would overflow.
-    return false;
-  }
-
-  const int increase_threshold = static_cast<int>(increase_threshold_d);
-  if (bandwidth < increase_threshold) {
-    time_at_last_change_ = sample_time;
-    // The value of bandwidth_estimation remains the same if we don't exceed
-    // percent_increase_ * bandwidth_estimation_ for at least
-    // time_between_increase_ time.
-  } else if (sample_time >= time_at_last_change_ + time_between_increase_) {
-    time_at_last_change_ = sample_time;
-    if (increase_threshold == 0) {
-      bandwidth_estimation_ = bandwidth / 2;
-    } else {
-      bandwidth_estimation_ = increase_threshold;
-    }
-  }
-  // Else don't make a change.
-
-  return old_bandwidth_estimation != bandwidth_estimation_;
-}
-
-}  // namespace talk_base
-
diff --git a/third_party/libjingle/source/talk/base/bandwidthsmoother.h b/third_party/libjingle/source/talk/base/bandwidthsmoother.h
deleted file mode 100644
index afd1e52..0000000
--- a/third_party/libjingle/source/talk/base/bandwidthsmoother.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * libjingle
- * Copyright 2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_BANDWIDTHSMOOTHER_H_
-#define TALK_BASE_BANDWIDTHSMOOTHER_H_
-
-#include "talk/base/rollingaccumulator.h"
-#include "talk/base/timeutils.h"
-
-namespace talk_base {
-
-// The purpose of BandwidthSmoother is to smooth out bandwidth
-// estimations so that 'trstate' messages can be triggered when we
-// are "sure" there is sufficient bandwidth.  To avoid frequent fluctuations,
-// we take a slightly pessimistic view of our bandwidth.  We only increase
-// our estimation when we have sampled bandwidth measurements of values
-// at least as large as the current estimation * percent_increase
-// for at least time_between_increase time.  If a sampled bandwidth
-// is less than our current estimation we immediately decrease our estimation
-// to that sampled value.
-class BandwidthSmoother {
- public:
-  BandwidthSmoother(int initial_bandwidth_guess,
-                    uint32 time_between_increase,
-                    double percent_increase,
-                    size_t samples_count_to_average);
-
-  // Samples a new bandwidth measurement.
-  // bandwidth is expected to be non-negative.
-  // returns true if the bandwidth estimation changed
-  bool Sample(uint32 sample_time, int bandwidth);
-
-  int get_bandwidth_estimation() const {
-    return bandwidth_estimation_;
-  }
-
- private:
-  uint32 time_between_increase_;
-  double percent_increase_;
-  uint32 time_at_last_change_;
-  int bandwidth_estimation_;
-  RollingAccumulator<int> accumulator_;
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_BANDWIDTHSMOOTHER_H_
diff --git a/third_party/libjingle/source/talk/base/bandwidthsmoother_unittest.cc b/third_party/libjingle/source/talk/base/bandwidthsmoother_unittest.cc
deleted file mode 100644
index 1eb79bd..0000000
--- a/third_party/libjingle/source/talk/base/bandwidthsmoother_unittest.cc
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * libjingle
- * Copyright 2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <limits.h>
-
-#include "talk/base/bandwidthsmoother.h"
-#include "talk/base/gunit.h"
-
-namespace talk_base {
-
-class BandwidthSmootherTest : public testing::Test {
- public:
-};
-
-static const int kTimeBetweenIncrease = 10;
-static const double kPercentIncrease = 1.1;
-static const size_t kSamplesCountToAverage = 1;
-
-TEST_F(BandwidthSmootherTest, TestSampleIncrease) {
-  BandwidthSmoother mon(1000,  // initial_bandwidth_guess
-                        kTimeBetweenIncrease,
-                        kPercentIncrease,
-                        kSamplesCountToAverage);
-
-  int bandwidth_sample = 1000;
-  EXPECT_EQ(bandwidth_sample, mon.get_bandwidth_estimation());
-  bandwidth_sample =
-      static_cast<int>(bandwidth_sample * kPercentIncrease);
-  EXPECT_FALSE(mon.Sample(9, bandwidth_sample));
-  EXPECT_TRUE(mon.Sample(10, bandwidth_sample));
-  EXPECT_EQ(bandwidth_sample, mon.get_bandwidth_estimation());
-  int next_expected_est =
-      static_cast<int>(bandwidth_sample * kPercentIncrease);
-  bandwidth_sample *= 2;
-  EXPECT_TRUE(mon.Sample(20, bandwidth_sample));
-  EXPECT_EQ(next_expected_est, mon.get_bandwidth_estimation());
-}
-
-TEST_F(BandwidthSmootherTest, TestSampleIncreaseFromZero) {
-  BandwidthSmoother mon(0,  // initial_bandwidth_guess
-                        kTimeBetweenIncrease,
-                        kPercentIncrease,
-                        kSamplesCountToAverage);
-
-  int bandwidth_sample = 1000;
-  EXPECT_FALSE(mon.Sample(9, bandwidth_sample));
-  EXPECT_TRUE(mon.Sample(10, bandwidth_sample));
-  EXPECT_EQ(bandwidth_sample/2, mon.get_bandwidth_estimation());
-}
-
-TEST_F(BandwidthSmootherTest, TestSampleDecrease) {
-  BandwidthSmoother mon(1000,  // initial_bandwidth_guess
-                        kTimeBetweenIncrease,
-                        kPercentIncrease,
-                        kSamplesCountToAverage);
-
-  int bandwidth_sample = 999;
-  EXPECT_TRUE(mon.Sample(1, bandwidth_sample));
-  EXPECT_EQ(bandwidth_sample, mon.get_bandwidth_estimation());
-}
-
-TEST_F(BandwidthSmootherTest, TestSampleRollover) {
-  const int initial_bandwidth_guess = 2000000000;  // > INT_MAX/1.1
-  BandwidthSmoother mon(initial_bandwidth_guess,
-                        kTimeBetweenIncrease,
-                        kPercentIncrease,
-                        kSamplesCountToAverage);
-
-  EXPECT_FALSE(mon.Sample(10, INT_MAX));
-  EXPECT_EQ(initial_bandwidth_guess, mon.get_bandwidth_estimation());
-}
-
-TEST_F(BandwidthSmootherTest, TestSampleNegative) {
-  BandwidthSmoother mon(1000,  // initial_bandwidth_guess
-                        kTimeBetweenIncrease,
-                        kPercentIncrease,
-                        kSamplesCountToAverage);
-
-  EXPECT_FALSE(mon.Sample(10, -1));
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/base64.cc b/third_party/libjingle/source/talk/base/base64.cc
deleted file mode 100644
index 0c9ee73..0000000
--- a/third_party/libjingle/source/talk/base/base64.cc
+++ /dev/null
@@ -1,243 +0,0 @@
-
-//*********************************************************************
-//* Base64 - a simple base64 encoder and decoder.
-//*
-//*     Copyright (c) 1999, Bob Withers - bwit@pobox.com
-//*
-//* This code may be freely used for any purpose, either personal
-//* or commercial, provided the authors copyright notice remains
-//* intact.
-//*
-//* Enhancements by Stanley Yamane:
-//*     o reverse lookup table for the decode function
-//*     o reserve string buffer space in advance
-//*
-//*********************************************************************
-
-#include "talk/base/base64.h"
-#include "talk/base/common.h"
-
-using std::string;
-using std::vector;
-
-namespace talk_base {
-
-static const char kPad = '=';
-static const unsigned char pd = 0xFD;  // Padding
-static const unsigned char sp = 0xFE;  // Whitespace
-static const unsigned char il = 0xFF;  // Illegal base64 character
-
-const char Base64::Base64Table[] =
-// 0000000000111111111122222222223333333333444444444455555555556666
-// 0123456789012345678901234567890123456789012345678901234567890123
-  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-// Decode Table gives the index of any valid base64 character in the
-// Base64 table
-// 65 == A, 97 == a, 48 == 0, 43 == +, 47 == /
-
-const unsigned char Base64::DecodeTable[] = {
-// 0  1  2  3  4  5  6  7  8  9
-  il,il,il,il,il,il,il,il,il,sp,  //   0 -   9
-  sp,sp,sp,sp,il,il,il,il,il,il,  //  10 -  19
-  il,il,il,il,il,il,il,il,il,il,  //  20 -  29
-  il,il,sp,il,il,il,il,il,il,il,  //  30 -  39
-  il,il,il,62,il,il,il,63,52,53,  //  40 -  49
-  54,55,56,57,58,59,60,61,il,il,  //  50 -  59
-  il,pd,il,il,il, 0, 1, 2, 3, 4,  //  60 -  69
-   5, 6, 7, 8, 9,10,11,12,13,14,  //  70 -  79
-  15,16,17,18,19,20,21,22,23,24,  //  80 -  89
-  25,il,il,il,il,il,il,26,27,28,  //  90 -  99
-  29,30,31,32,33,34,35,36,37,38,  // 100 - 109
-  39,40,41,42,43,44,45,46,47,48,  // 110 - 119
-  49,50,51,il,il,il,il,il,il,il,  // 120 - 129
-  il,il,il,il,il,il,il,il,il,il,  // 130 - 139
-  il,il,il,il,il,il,il,il,il,il,  // 140 - 149
-  il,il,il,il,il,il,il,il,il,il,  // 150 - 159
-  il,il,il,il,il,il,il,il,il,il,  // 160 - 169
-  il,il,il,il,il,il,il,il,il,il,  // 170 - 179
-  il,il,il,il,il,il,il,il,il,il,  // 180 - 189
-  il,il,il,il,il,il,il,il,il,il,  // 190 - 199
-  il,il,il,il,il,il,il,il,il,il,  // 200 - 209
-  il,il,il,il,il,il,il,il,il,il,  // 210 - 219
-  il,il,il,il,il,il,il,il,il,il,  // 220 - 229
-  il,il,il,il,il,il,il,il,il,il,  // 230 - 239
-  il,il,il,il,il,il,il,il,il,il,  // 240 - 249
-  il,il,il,il,il,il               // 250 - 255
-};
-
-bool Base64::IsBase64Char(char ch) {
-  return (('A' <= ch) && (ch <= 'Z')) ||
-         (('a' <= ch) && (ch <= 'z')) ||
-         (('0' <= ch) && (ch <= '9')) ||
-         (ch == '+') || (ch == '/');
-}
-
-bool Base64::IsBase64Encoded(const std::string& str) {
-  for (size_t i = 0; i < str.size(); ++i) {
-    if (!IsBase64Char(str.at(i)))
-      return false;
-  }
-  return true;
-}
-
-void Base64::EncodeFromArray(const void* data, size_t len, string* result) {
-  ASSERT(NULL != result);
-  result->clear();
-  result->reserve(((len + 2) / 3) * 4);
-  const unsigned char* byte_data = static_cast<const unsigned char*>(data);
-
-  unsigned char c;
-  size_t i = 0;
-  while (i < len) {
-    c = (byte_data[i] >> 2) & 0x3f;
-    result->push_back(Base64Table[c]);
-
-    c = (byte_data[i] << 4) & 0x3f;
-    if (++i < len) {
-      c |= (byte_data[i] >> 4) & 0x0f;
-    }
-    result->push_back(Base64Table[c]);
-
-    if (i < len) {
-      c = (byte_data[i] << 2) & 0x3f;
-      if (++i < len) {
-        c |= (byte_data[i] >> 6) & 0x03;
-      }
-      result->push_back(Base64Table[c]);
-    } else {
-      result->push_back(kPad);
-    }
-
-    if (i < len) {
-      c = byte_data[i] & 0x3f;
-      result->push_back(Base64Table[c]);
-      ++i;
-    } else {
-      result->push_back(kPad);
-    }
-  }
-}
-
-size_t Base64::GetNextQuantum(DecodeFlags parse_flags, bool illegal_pads,
-                              const char* data, size_t len, size_t* dpos,
-                              unsigned char qbuf[4], bool* padded)
-{
-  size_t byte_len = 0, pad_len = 0, pad_start = 0;
-  for (; (byte_len < 4) && (*dpos < len); ++*dpos) {
-    qbuf[byte_len] = DecodeTable[static_cast<unsigned char>(data[*dpos])];
-    if ((il == qbuf[byte_len]) || (illegal_pads && (pd == qbuf[byte_len]))) {
-      if (parse_flags != DO_PARSE_ANY)
-        break;
-      // Ignore illegal characters
-    } else if (sp == qbuf[byte_len]) {
-      if (parse_flags == DO_PARSE_STRICT)
-        break;
-      // Ignore spaces
-    } else if (pd == qbuf[byte_len]) {
-      if (byte_len < 2) {
-        if (parse_flags != DO_PARSE_ANY)
-          break;
-        // Ignore unexpected padding
-      } else if (byte_len + pad_len >= 4) {
-        if (parse_flags != DO_PARSE_ANY)
-          break;
-        // Ignore extra pads
-      } else {
-        if (1 == ++pad_len) {
-          pad_start = *dpos;
-        }
-      }
-    } else {
-      if (pad_len > 0) {
-        if (parse_flags != DO_PARSE_ANY)
-          break;
-        // Ignore pads which are followed by data
-        pad_len = 0;
-      }
-      ++byte_len;
-    }
-  }
-  for (size_t i = byte_len; i < 4; ++i) {
-    qbuf[i] = 0;
-  }
-  if (4 == byte_len + pad_len) {
-    *padded = true;
-  } else {
-    *padded = false;
-    if (pad_len) {
-      // Roll back illegal padding
-      *dpos = pad_start;
-    }
-  }
-  return byte_len;
-}
-
-bool Base64::DecodeFromArray(const char* data, size_t len, DecodeFlags flags,
-                             string* result, size_t* data_used) {
-  return DecodeFromArrayTemplate<string>(data, len, flags, result, data_used);
-}
-
-bool Base64::DecodeFromArray(const char* data, size_t len, DecodeFlags flags,
-                             vector<char>* result, size_t* data_used) {
-  return DecodeFromArrayTemplate<vector<char> >(data, len, flags, result,
-                                                data_used);
-}
-
-template<typename T>
-bool Base64::DecodeFromArrayTemplate(const char* data, size_t len,
-                                     DecodeFlags flags, T* result,
-                                     size_t* data_used)
-{
-  ASSERT(NULL != result);
-  ASSERT(flags <= (DO_PARSE_MASK | DO_PAD_MASK | DO_TERM_MASK));
-
-  const DecodeFlags parse_flags = flags & DO_PARSE_MASK;
-  const DecodeFlags pad_flags   = flags & DO_PAD_MASK;
-  const DecodeFlags term_flags  = flags & DO_TERM_MASK;
-  ASSERT(0 != parse_flags);
-  ASSERT(0 != pad_flags);
-  ASSERT(0 != term_flags);
-
-  result->clear();
-  result->reserve(len);
-
-  size_t dpos = 0;
-  bool success = true, padded;
-  unsigned char c, qbuf[4];
-  while (dpos < len) {
-    size_t qlen = GetNextQuantum(parse_flags, (DO_PAD_NO == pad_flags),
-                                 data, len, &dpos, qbuf, &padded);
-    c = (qbuf[0] << 2) | ((qbuf[1] >> 4) & 0x3);
-    if (qlen >= 2) {
-      result->push_back(c);
-      c = ((qbuf[1] << 4) & 0xf0) | ((qbuf[2] >> 2) & 0xf);
-      if (qlen >= 3) {
-        result->push_back(c);
-        c = ((qbuf[2] << 6) & 0xc0) | qbuf[3];
-        if (qlen >= 4) {
-          result->push_back(c);
-          c = 0;
-        }
-      }
-    }
-    if (qlen < 4) {
-      if ((DO_TERM_ANY != term_flags) && (0 != c)) {
-        success = false;  // unused bits
-      }
-      if ((DO_PAD_YES == pad_flags) && !padded) {
-        success = false;  // expected padding
-      }
-      break;
-    }
-  }
-  if ((DO_TERM_BUFFER == term_flags) && (dpos != len)) {
-    success = false;  // unused chars
-  }
-  if (data_used) {
-    *data_used = dpos;
-  }
-  return success;
-}
-
-} // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/base64.h b/third_party/libjingle/source/talk/base/base64.h
deleted file mode 100644
index 2e37bc3..0000000
--- a/third_party/libjingle/source/talk/base/base64.h
+++ /dev/null
@@ -1,96 +0,0 @@
-
-//*********************************************************************
-//* C_Base64 - a simple base64 encoder and decoder.
-//*
-//*     Copyright (c) 1999, Bob Withers - bwit@pobox.com
-//*
-//* This code may be freely used for any purpose, either personal
-//* or commercial, provided the authors copyright notice remains
-//* intact.
-//*********************************************************************
-
-#ifndef TALK_BASE_BASE64_H__
-#define TALK_BASE_BASE64_H__
-
-#include <string>
-#include <vector>
-
-namespace talk_base {
-
-class Base64
-{
-public:
-  enum DecodeOption {
-    DO_PARSE_STRICT =  1,  // Parse only base64 characters
-    DO_PARSE_WHITE  =  2,  // Parse only base64 and whitespace characters
-    DO_PARSE_ANY    =  3,  // Parse all characters
-    DO_PARSE_MASK   =  3,
-
-    DO_PAD_YES      =  4,  // Padding is required
-    DO_PAD_ANY      =  8,  // Padding is optional
-    DO_PAD_NO       = 12,  // Padding is disallowed
-    DO_PAD_MASK     = 12,
-
-    DO_TERM_BUFFER  = 16,  // Must termiante at end of buffer
-    DO_TERM_CHAR    = 32,  // May terminate at any character boundary
-    DO_TERM_ANY     = 48,  // May terminate at a sub-character bit offset
-    DO_TERM_MASK    = 48,
-
-    // Strictest interpretation
-    DO_STRICT = DO_PARSE_STRICT | DO_PAD_YES | DO_TERM_BUFFER,
-
-    DO_LAX    = DO_PARSE_ANY | DO_PAD_ANY | DO_TERM_CHAR,
-  };
-  typedef int DecodeFlags;
-
-  static bool IsBase64Char(char ch);
-
-  // Determines whether the given string consists entirely of valid base64
-  // encoded characters.
-  static bool IsBase64Encoded(const std::string& str);
-
-  static void EncodeFromArray(const void* data, size_t len,
-                              std::string* result);
-  static bool DecodeFromArray(const char* data, size_t len, DecodeFlags flags,
-                              std::string* result, size_t* data_used);
-  static bool DecodeFromArray(const char* data, size_t len, DecodeFlags flags,
-                              std::vector<char>* result, size_t* data_used);
-
-  // Convenience Methods
-  static inline std::string Encode(const std::string& data) {
-    std::string result;
-    EncodeFromArray(data.data(), data.size(), &result);
-    return result;
-  }
-  static inline std::string Decode(const std::string& data, DecodeFlags flags) {
-    std::string result;
-    DecodeFromArray(data.data(), data.size(), flags, &result, NULL);
-    return result;
-  }
-  static inline bool Decode(const std::string& data, DecodeFlags flags,
-                            std::string* result, size_t* data_used)
-  {
-    return DecodeFromArray(data.data(), data.size(), flags, result, data_used);
-  }
-  static inline bool Decode(const std::string& data, DecodeFlags flags,
-                            std::vector<char>* result, size_t* data_used)
-  {
-    return DecodeFromArray(data.data(), data.size(), flags, result, data_used);
-  }
-
-private:
-  static const char Base64Table[];
-  static const unsigned char DecodeTable[];
-
-  static size_t GetNextQuantum(DecodeFlags parse_flags, bool illegal_pads,
-                               const char* data, size_t len, size_t* dpos,
-                               unsigned char qbuf[4], bool* padded);
-  template<typename T>
-  static bool DecodeFromArrayTemplate(const char* data, size_t len,
-                                      DecodeFlags flags, T* result,
-                                      size_t* data_used);
-};
-
-} // namespace talk_base
-
-#endif // TALK_BASE_BASE64_H__
diff --git a/third_party/libjingle/source/talk/base/basicdefs.h b/third_party/libjingle/source/talk/base/basicdefs.h
deleted file mode 100644
index 1f79228..0000000
--- a/third_party/libjingle/source/talk/base/basicdefs.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_BASICDEFS_H__
-#define TALK_BASE_BASICDEFS_H__
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#define ARRAY_SIZE(x) (static_cast<int>((sizeof(x)/sizeof(x[0]))))
-
-#endif // TAKL_BASE_BASICDEFS_H__
diff --git a/third_party/libjingle/source/talk/base/basicpacketsocketfactory.cc b/third_party/libjingle/source/talk/base/basicpacketsocketfactory.cc
deleted file mode 100644
index d1da08e..0000000
--- a/third_party/libjingle/source/talk/base/basicpacketsocketfactory.cc
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * libjingle
- * Copyright 2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/basicpacketsocketfactory.h"
-
-#include "talk/base/asyncudpsocket.h"
-#include "talk/base/asynctcpsocket.h"
-#include "talk/base/logging.h"
-#include "talk/base/socketadapters.h"
-#include "talk/base/thread.h"
-
-namespace talk_base {
-
-BasicPacketSocketFactory::BasicPacketSocketFactory()
-    : thread_(Thread::Current()),
-      socket_factory_(NULL) {
-}
-
-BasicPacketSocketFactory::BasicPacketSocketFactory(Thread* thread)
-    : thread_(thread),
-      socket_factory_(NULL) {
-}
-
-BasicPacketSocketFactory::BasicPacketSocketFactory(
-    SocketFactory* socket_factory)
-    : thread_(NULL),
-      socket_factory_(socket_factory) {
-}
-
-BasicPacketSocketFactory::~BasicPacketSocketFactory() {
-}
-
-AsyncPacketSocket* BasicPacketSocketFactory::CreateUdpSocket(
-    const SocketAddress& address, int min_port, int max_port) {
-  // UDP sockets are simple.
-  talk_base::AsyncSocket* socket =
-      socket_factory()->CreateAsyncSocket(SOCK_DGRAM);
-  if (!socket) {
-    return NULL;
-  }
-  if (BindSocket(socket, address, min_port, max_port) < 0) {
-    LOG(LS_ERROR) << "UDP bind failed with error "
-                    << socket->GetError();
-    delete socket;
-    return NULL;
-  }
-  return new talk_base::AsyncUDPSocket(socket);
-}
-
-AsyncPacketSocket* BasicPacketSocketFactory::CreateServerTcpSocket(
-    const SocketAddress& local_address, int min_port, int max_port, bool ssl) {
-  talk_base::AsyncSocket* socket =
-      socket_factory()->CreateAsyncSocket(SOCK_STREAM);
-  if (!socket) {
-    return NULL;
-  }
-
-  if (BindSocket(socket, local_address, min_port, max_port) < 0) {
-    LOG(LS_ERROR) << "TCP bind failed with error "
-                  << socket->GetError();
-    delete socket;
-    return NULL;
-  }
-
-  // If using SSLTCP, wrap the TCP socket in a pseudo-SSL socket.
-  if (ssl) {
-    socket = new talk_base::AsyncSSLSocket(socket);
-  }
-
-  // Set TCP_NODELAY (via OPT_NODELAY) for improved performance.
-  // See http://go/gtalktcpnodelayexperiment
-  socket->SetOption(talk_base::Socket::OPT_NODELAY, 1);
-
-  return new talk_base::AsyncTCPSocket(socket, true);
-}
-
-AsyncPacketSocket* BasicPacketSocketFactory::CreateClientTcpSocket(
-    const SocketAddress& local_address, const SocketAddress& remote_address,
-    const ProxyInfo& proxy_info, const std::string& user_agent, bool ssl) {
-  talk_base::AsyncSocket* socket =
-      socket_factory()->CreateAsyncSocket(SOCK_STREAM);
-  if (!socket) {
-    return NULL;
-  }
-
-  if (BindSocket(socket, local_address, 0, 0) < 0) {
-    LOG(LS_ERROR) << "TCP bind failed with error "
-                  << socket->GetError();
-    delete socket;
-    return NULL;
-  }
-
-  // If using a proxy, wrap the socket in a proxy socket.
-  if (proxy_info.type == talk_base::PROXY_SOCKS5) {
-    socket = new talk_base::AsyncSocksProxySocket(
-        socket, proxy_info.address, proxy_info.username, proxy_info.password);
-  } else if (proxy_info.type == talk_base::PROXY_HTTPS) {
-    socket = new talk_base::AsyncHttpsProxySocket(
-        socket, user_agent, proxy_info.address,
-        proxy_info.username, proxy_info.password);
-  }
-
-  // If using SSLTCP, wrap the TCP socket in a pseudo-SSL socket.
-  if (ssl) {
-    socket = new talk_base::AsyncSSLSocket(socket);
-  }
-
-  if (socket->Connect(remote_address) < 0) {
-    LOG(LS_ERROR) << "TCP connect failed with error "
-                  << socket->GetError();
-    delete socket;
-    return NULL;
-  }
-
-  // Finally, wrap that socket in a TCP packet socket.
-  talk_base::AsyncTCPSocket* tcp_socket =
-      new talk_base::AsyncTCPSocket(socket, false);
-
-  // Set TCP_NODELAY (via OPT_NODELAY) for improved performance.
-  // See http://go/gtalktcpnodelayexperiment
-  tcp_socket->SetOption(talk_base::Socket::OPT_NODELAY, 1);
-
-  return tcp_socket;
-}
-
-int BasicPacketSocketFactory::BindSocket(
-    AsyncSocket* socket, const SocketAddress& local_address,
-    int min_port, int max_port) {
-  int ret = -1;
-  if (min_port == 0 && max_port == 0) {
-    // If there's no port range, let the OS pick a port for us.
-    ret = socket->Bind(local_address);
-  } else {
-    // Otherwise, try to find a port in the provided range.
-    for (int port = min_port; ret < 0 && port <= max_port; ++port) {
-      ret = socket->Bind(talk_base::SocketAddress(local_address.ipaddr(),
-                                                  port));
-    }
-  }
-  return ret;
-}
-
-SocketFactory* BasicPacketSocketFactory::socket_factory() {
-  if (thread_) {
-    ASSERT(thread_ == Thread::Current());
-    return thread_->socketserver();
-  } else {
-    return socket_factory_;
-  }
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/basicpacketsocketfactory.h b/third_party/libjingle/source/talk/base/basicpacketsocketfactory.h
deleted file mode 100644
index bf66bc8..0000000
--- a/third_party/libjingle/source/talk/base/basicpacketsocketfactory.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * libjingle
- * Copyright 2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_BASICPACKETSOCKETFACTORY_H_
-#define TALK_BASE_BASICPACKETSOCKETFACTORY_H_
-
-#include "talk/base/packetsocketfactory.h"
-
-namespace talk_base {
-
-class AsyncSocket;
-class SocketFactory;
-class Thread;
-
-class BasicPacketSocketFactory : public PacketSocketFactory {
- public:
-  BasicPacketSocketFactory();
-  explicit BasicPacketSocketFactory(Thread* thread);
-  explicit BasicPacketSocketFactory(SocketFactory* socket_factory);
-  virtual ~BasicPacketSocketFactory();
-
-  virtual AsyncPacketSocket* CreateUdpSocket(
-      const SocketAddress& local_address, int min_port, int max_port);
-  virtual AsyncPacketSocket* CreateServerTcpSocket(
-      const SocketAddress& local_address, int min_port, int max_port, bool ssl);
-  virtual AsyncPacketSocket* CreateClientTcpSocket(
-      const SocketAddress& local_address, const SocketAddress& remote_address,
-      const ProxyInfo& proxy_info, const std::string& user_agent, bool ssl);
-
- private:
-  int BindSocket(AsyncSocket* socket, const SocketAddress& local_address,
-                 int min_port, int max_port);
-
-  SocketFactory* socket_factory();
-
-  Thread* thread_;
-  SocketFactory* socket_factory_;
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_BASICPACKETSOCKETFACTORY_H_
diff --git a/third_party/libjingle/source/talk/base/basictypes.h b/third_party/libjingle/source/talk/base/basictypes.h
deleted file mode 100644
index f16ccf2..0000000
--- a/third_party/libjingle/source/talk/base/basictypes.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * libjingle
- * Copyright 2004 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_BASICTYPES_H__
-#define TALK_BASE_BASICTYPES_H__
-
-#include <stddef.h>  // for NULL, size_t
-
-#if !(defined(_MSC_VER) && (_MSC_VER < 1600))
-#include <stdint.h>  // for uintptr_t
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "talk/base/constructormagic.h"
-
-#if !defined(INT_TYPES_DEFINED)
-#define INT_TYPES_DEFINED
-#ifdef COMPILER_MSVC
-typedef unsigned __int64 uint64;
-typedef __int64 int64;
-#ifndef INT64_C
-#define INT64_C(x) x ## I64
-#endif
-#ifndef UINT64_C
-#define UINT64_C(x) x ## UI64
-#endif
-#define INT64_F "I64"
-#else  // COMPILER_MSVC
-// On Mac OS X, cssmconfig.h defines uint64 as uint64_t
-#if defined(OSX)
-typedef uint64_t uint64;
-typedef int64_t int64;
-#ifndef INT64_C
-#define INT64_C(x) x ## L
-#endif
-#ifndef UINT64_C
-#define UINT64_C(x) x ## UL
-#endif
-#define INT64_F "l"
-#elif defined(__LP64__)
-typedef unsigned long uint64;
-typedef long int64;
-#ifndef INT64_C
-#define INT64_C(x) x ## L
-#endif
-#ifndef UINT64_C
-#define UINT64_C(x) x ## UL
-#endif
-#define INT64_F "l"
-#else  // __LP64__
-typedef unsigned long long uint64;
-typedef long long int64;
-#ifndef INT64_C
-#define INT64_C(x) x ## LL
-#endif
-#ifndef UINT64_C
-#define UINT64_C(x) x ## ULL
-#endif
-#define INT64_F "ll"
-#endif  // __LP64__
-#endif  // COMPILER_MSVC
-typedef unsigned int uint32;
-typedef int int32;
-typedef unsigned short uint16;
-typedef short int16;
-typedef unsigned char uint8;
-typedef signed char int8;
-#endif  // INT_TYPES_DEFINED
-
-#ifdef WIN32
-typedef int socklen_t;
-#endif
-
-namespace talk_base {
-  template<class T> inline T _min(T a, T b) { return (a > b) ? b : a; }
-  template<class T> inline T _max(T a, T b) { return (a < b) ? b : a; }
-
-  // For wait functions that take a number of milliseconds, kForever indicates
-  // unlimited time.
-  const int kForever = -1;
-}
-
-// Detect compiler is for x86 or x64.
-#if defined(__x86_64__) || defined(_M_X64) || \
-    defined(__i386__) || defined(_M_IX86)
-#define CPU_X86 1
-#endif
-
-#define ALIGNP(p, t) \
-  (reinterpret_cast<uint8*>(((reinterpret_cast<uintptr_t>(p) + \
-  ((t)-1)) & ~((t)-1))))
-#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
-
-#ifndef UNUSED
-#define UNUSED(x) Unused(static_cast<const void *>(&x))
-#define UNUSED2(x,y) Unused(static_cast<const void *>(&x)); Unused(static_cast<const void *>(&y))
-#define UNUSED3(x,y,z) Unused(static_cast<const void *>(&x)); Unused(static_cast<const void *>(&y)); Unused(static_cast<const void *>(&z))
-#define UNUSED4(x,y,z,a) Unused(static_cast<const void *>(&x)); Unused(static_cast<const void *>(&y)); Unused(static_cast<const void *>(&z)); Unused(static_cast<const void *>(&a))
-#define UNUSED5(x,y,z,a,b) Unused(static_cast<const void *>(&x)); Unused(static_cast<const void *>(&y)); Unused(static_cast<const void *>(&z)); Unused(static_cast<const void *>(&a)); Unused(static_cast<const void *>(&b))
-inline void Unused(const void *) { }
-#endif // UNUSED
-
-#if defined(__GNUC__)
-#define GCC_ATTR(x) __attribute__ ((x))
-#else  // !__GNUC__
-#define GCC_ATTR(x)
-#endif  // !__GNUC__
-
-#endif // TALK_BASE_BASICTYPES_H__
diff --git a/third_party/libjingle/source/talk/base/buffer.h b/third_party/libjingle/source/talk/base/buffer.h
deleted file mode 100644
index 311cfad..0000000
--- a/third_party/libjingle/source/talk/base/buffer.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * libjingle
- * Copyright 2004-2010, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_BUFFER_H_
-#define TALK_BASE_BUFFER_H_
-
-#include <cstring>
-
-#include "talk/base/scoped_ptr.h"
-
-namespace talk_base {
-
-// Basic buffer class, can be grown and shrunk dynamically.
-// Unlike std::string/vector, does not initialize data when expanding capacity.
-class Buffer {
- public:
-  Buffer() {
-    Construct(NULL, 0, 0);
-  }
-  Buffer(const void* data, size_t length) {
-    Construct(data, length, length);
-  }
-  Buffer(const void* data, size_t length, size_t capacity) {
-    Construct(data, length, capacity);
-  }
-  Buffer(const Buffer& buf) {
-    Construct(buf.data(), buf.length(), buf.length());
-  }
-
-  const char* data() const { return data_.get(); }
-  char* data() { return data_.get(); }
-  // TODO: should this be size(), like STL?
-  size_t length() const { return length_; }
-  size_t capacity() const { return capacity_; }
-
-  Buffer& operator=(const Buffer& buf) {
-    if (&buf != this) {
-      Construct(buf.data(), buf.length(), buf.length());
-    }
-    return *this;
-  }
-  bool operator==(const Buffer& buf) const {
-    return (length_ == buf.length() &&
-            memcmp(data_.get(), buf.data(), length_) == 0);
-  }
-  bool operator!=(const Buffer& buf) const {
-    return !operator==(buf);
-  }
-
-  void SetData(const void* data, size_t length) {
-    ASSERT(data != NULL || length == 0);
-    SetLength(length);
-    memcpy(data_.get(), data, length);
-  }
-  void AppendData(const void* data, size_t length) {
-    ASSERT(data != NULL || length == 0);
-    size_t old_length = length_;
-    SetLength(length_ + length);
-    memcpy(data_.get() + old_length, data, length);
-  }
-  void SetLength(size_t length) {
-    SetCapacity(length);
-    length_ = length;
-  }
-  void SetCapacity(size_t capacity) {
-    if (capacity > capacity_) {
-      talk_base::scoped_array<char> data(new char[capacity]);
-      memcpy(data.get(), data_.get(), length_);
-      data_.swap(data);
-      capacity_ = capacity;
-    }
-  }
-
-  void TransferTo(Buffer* buf) {
-    ASSERT(buf != NULL);
-    buf->data_.reset(data_.release());
-    buf->length_ = length_;
-    buf->capacity_ = capacity_;
-    Construct(NULL, 0, 0);
-  }
-
- protected:
-  void Construct(const void* data, size_t length, size_t capacity) {
-    data_.reset(new char[capacity_ = capacity]);
-    SetData(data, length);
-  }
-
-  scoped_array<char> data_;
-  size_t length_;
-  size_t capacity_;
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_BUFFER_H_
diff --git a/third_party/libjingle/source/talk/base/buffer_unittest.cc b/third_party/libjingle/source/talk/base/buffer_unittest.cc
deleted file mode 100644
index b0aa243..0000000
--- a/third_party/libjingle/source/talk/base/buffer_unittest.cc
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/buffer.h"
-#include "talk/base/gunit.h"
-
-namespace talk_base {
-
-static const char kTestData[] = {
-  0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF
-};
-
-TEST(BufferTest, TestConstructDefault) {
-  Buffer buf;
-  EXPECT_EQ(0U, buf.length());
-  EXPECT_EQ(0U, buf.capacity());
-  EXPECT_EQ(Buffer(), buf);
-}
-
-TEST(BufferTest, TestConstructEmptyWithCapacity) {
-  Buffer buf(NULL, 0, 256U);
-  EXPECT_EQ(0U, buf.length());
-  EXPECT_EQ(256U, buf.capacity());
-  EXPECT_EQ(Buffer(), buf);
-}
-
-TEST(BufferTest, TestConstructData) {
-  Buffer buf(kTestData, sizeof(kTestData));
-  EXPECT_EQ(sizeof(kTestData), buf.length());
-  EXPECT_EQ(sizeof(kTestData), buf.capacity());
-  EXPECT_EQ(0, memcmp(buf.data(), kTestData, sizeof(kTestData)));
-  EXPECT_EQ(Buffer(kTestData, sizeof(kTestData)), buf);
-}
-
-TEST(BufferTest, TestConstructDataWithCapacity) {
-  Buffer buf(kTestData, sizeof(kTestData), 256U);
-  EXPECT_EQ(sizeof(kTestData), buf.length());
-  EXPECT_EQ(256U, buf.capacity());
-  EXPECT_EQ(0, memcmp(buf.data(), kTestData, sizeof(kTestData)));
-  EXPECT_EQ(Buffer(kTestData, sizeof(kTestData)), buf);
-}
-
-TEST(BufferTest, TestConstructCopy) {
-  Buffer buf1(kTestData, sizeof(kTestData), 256), buf2(buf1);
-  EXPECT_EQ(sizeof(kTestData), buf2.length());
-  EXPECT_EQ(sizeof(kTestData), buf2.capacity());  // capacity isn't copied
-  EXPECT_EQ(0, memcmp(buf2.data(), kTestData, sizeof(kTestData)));
-  EXPECT_EQ(buf1, buf2);
-}
-
-TEST(BufferTest, TestAssign) {
-  Buffer buf1, buf2(kTestData, sizeof(kTestData), 256);
-  EXPECT_NE(buf1, buf2);
-  buf1 = buf2;
-  EXPECT_EQ(sizeof(kTestData), buf1.length());
-  EXPECT_EQ(sizeof(kTestData), buf1.capacity());  // capacity isn't copied
-  EXPECT_EQ(0, memcmp(buf1.data(), kTestData, sizeof(kTestData)));
-  EXPECT_EQ(buf1, buf2);
-}
-
-TEST(BufferTest, TestSetData) {
-  Buffer buf;
-  buf.SetData(kTestData, sizeof(kTestData));
-  EXPECT_EQ(sizeof(kTestData), buf.length());
-  EXPECT_EQ(sizeof(kTestData), buf.capacity());
-  EXPECT_EQ(0, memcmp(buf.data(), kTestData, sizeof(kTestData)));
-}
-
-TEST(BufferTest, TestAppendData) {
-  Buffer buf(kTestData, sizeof(kTestData));
-  buf.AppendData(kTestData, sizeof(kTestData));
-  EXPECT_EQ(2 * sizeof(kTestData), buf.length());
-  EXPECT_EQ(2 * sizeof(kTestData), buf.capacity());
-  EXPECT_EQ(0, memcmp(buf.data(), kTestData, sizeof(kTestData)));
-  EXPECT_EQ(0, memcmp(buf.data() + sizeof(kTestData),
-                      kTestData, sizeof(kTestData)));
-}
-
-TEST(BufferTest, TestSetLengthSmaller) {
-  Buffer buf;
-  buf.SetData(kTestData, sizeof(kTestData));
-  buf.SetLength(sizeof(kTestData) / 2);
-  EXPECT_EQ(sizeof(kTestData) / 2, buf.length());
-  EXPECT_EQ(sizeof(kTestData), buf.capacity());
-  EXPECT_EQ(0, memcmp(buf.data(), kTestData, sizeof(kTestData) / 2));
-}
-
-TEST(BufferTest, TestSetLengthLarger) {
-  Buffer buf;
-  buf.SetData(kTestData, sizeof(kTestData));
-  buf.SetLength(sizeof(kTestData) * 2);
-  EXPECT_EQ(sizeof(kTestData) * 2, buf.length());
-  EXPECT_EQ(sizeof(kTestData) * 2, buf.capacity());
-  EXPECT_EQ(0, memcmp(buf.data(), kTestData, sizeof(kTestData)));
-}
-
-TEST(BufferTest, TestSetCapacitySmaller) {
-  Buffer buf;
-  buf.SetData(kTestData, sizeof(kTestData));
-  buf.SetCapacity(sizeof(kTestData) / 2);  // should be ignored
-  EXPECT_EQ(sizeof(kTestData), buf.length());
-  EXPECT_EQ(sizeof(kTestData), buf.capacity());
-  EXPECT_EQ(0, memcmp(buf.data(), kTestData, sizeof(kTestData)));
-}
-
-TEST(BufferTest, TestSetCapacityLarger) {
-  Buffer buf(kTestData, sizeof(kTestData));
-  buf.SetCapacity(sizeof(kTestData) * 2);
-  EXPECT_EQ(sizeof(kTestData), buf.length());
-  EXPECT_EQ(sizeof(kTestData) * 2, buf.capacity());
-  EXPECT_EQ(0, memcmp(buf.data(), kTestData, sizeof(kTestData)));
-}
-
-TEST(BufferTest, TestSetCapacityThenSetLength) {
-  Buffer buf(kTestData, sizeof(kTestData));
-  buf.SetCapacity(sizeof(kTestData) * 4);
-  memcpy(buf.data() + sizeof(kTestData), kTestData, sizeof(kTestData));
-  buf.SetLength(sizeof(kTestData) * 2);
-  EXPECT_EQ(sizeof(kTestData) * 2, buf.length());
-  EXPECT_EQ(sizeof(kTestData) * 4, buf.capacity());
-  EXPECT_EQ(0, memcmp(buf.data(), kTestData, sizeof(kTestData)));
-  EXPECT_EQ(0, memcmp(buf.data() + sizeof(kTestData),
-                      kTestData, sizeof(kTestData)));
-}
-
-TEST(BufferTest, TestTransfer) {
-  Buffer buf1(kTestData, sizeof(kTestData), 256U), buf2;
-  buf1.TransferTo(&buf2);
-  EXPECT_EQ(0U, buf1.length());
-  EXPECT_EQ(0U, buf1.capacity());
-  EXPECT_EQ(sizeof(kTestData), buf2.length());
-  EXPECT_EQ(256U, buf2.capacity());  // capacity does transfer
-  EXPECT_EQ(0, memcmp(buf2.data(), kTestData, sizeof(kTestData)));
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/bytebuffer.cc b/third_party/libjingle/source/talk/base/bytebuffer.cc
deleted file mode 100644
index 12c8bc0..0000000
--- a/third_party/libjingle/source/talk/base/bytebuffer.cc
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice, 
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products 
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/bytebuffer.h"
-
-#include <algorithm>
-#include <cassert>
-#include <cstring>
-
-#include "talk/base/basictypes.h"
-#include "talk/base/byteorder.h"
-
-namespace talk_base {
-
-static const int DEFAULT_SIZE = 4096;
-
-ByteBuffer::ByteBuffer() {
-  Construct(NULL, DEFAULT_SIZE, ORDER_NETWORK);
-}
-
-ByteBuffer::ByteBuffer(ByteOrder byte_order) {
-  Construct(NULL, DEFAULT_SIZE, byte_order);
-}
-
-ByteBuffer::ByteBuffer(const char* bytes, size_t len) {
-  Construct(bytes, len, ORDER_NETWORK);
-}
-
-ByteBuffer::ByteBuffer(const char* bytes, size_t len, ByteOrder byte_order) {
-  Construct(bytes, len, byte_order);
-}
-
-ByteBuffer::ByteBuffer(const char* bytes) {
-  Construct(bytes, strlen(bytes), ORDER_NETWORK);
-}
-
-void ByteBuffer::Construct(const char* bytes, size_t len,
-                           ByteOrder byte_order) {
-  start_      = 0;
-  size_       = len;
-  byte_order_ = byte_order;
-  bytes_      = new char[size_];
-
-  if (bytes) {
-    end_ = len;
-    memcpy(bytes_, bytes, end_);
-  } else {
-    end_ = 0;
-  }
-}
-
-ByteBuffer::~ByteBuffer() {
-  delete[] bytes_;
-}
-
-bool ByteBuffer::ReadUInt8(uint8* val) {
-  if (!val) return false;
-
-  return ReadBytes(reinterpret_cast<char*>(val), 1);
-}
-
-bool ByteBuffer::ReadUInt16(uint16* val) {
-  if (!val) return false;
-
-  uint16 v;
-  if (!ReadBytes(reinterpret_cast<char*>(&v), 2)) {
-    return false;
-  } else {
-    *val = (byte_order_ == ORDER_NETWORK) ? NetworkToHost16(v) : v;
-    return true;
-  }
-}
-
-bool ByteBuffer::ReadUInt24(uint32* val) {
-  if (!val) return false;
-
-  uint32 v = 0;
-  char* read_into = reinterpret_cast<char*>(&v);
-  if (byte_order_ == ORDER_NETWORK || IsHostBigEndian()) {
-    ++read_into;
-  }
-
-  if (!ReadBytes(read_into, 3)) {
-    return false;
-  } else {
-    *val = (byte_order_ == ORDER_NETWORK) ? NetworkToHost32(v) : v;
-    return true;
-  }
-}
-
-bool ByteBuffer::ReadUInt32(uint32* val) {
-  if (!val) return false;
-
-  uint32 v;
-  if (!ReadBytes(reinterpret_cast<char*>(&v), 4)) {
-    return false;
-  } else {
-    *val = (byte_order_ == ORDER_NETWORK) ? NetworkToHost32(v) : v;
-    return true;
-  }
-}
-
-bool ByteBuffer::ReadUInt64(uint64* val) {
-  if (!val) return false;
-
-  uint64 v;
-  if (!ReadBytes(reinterpret_cast<char*>(&v), 8)) {
-    return false;
-  } else {
-    *val = (byte_order_ == ORDER_NETWORK) ? NetworkToHost64(v) : v;
-    return true;
-  }
-}
-
-bool ByteBuffer::ReadString(std::string* val, size_t len) {
-  if (!val) return false;
-
-  if (len > Length()) {
-    return false;
-  } else {
-    val->append(bytes_ + start_, len);
-    start_ += len;
-    return true;
-  }
-}
-
-bool ByteBuffer::ReadBytes(char* val, size_t len) {
-  if (len > Length()) {
-    return false;
-  } else {
-    memcpy(val, bytes_ + start_, len);
-    start_ += len;
-    return true;
-  }
-}
-
-void ByteBuffer::WriteUInt8(uint8 val) {
-  WriteBytes(reinterpret_cast<const char*>(&val), 1);
-}
-
-void ByteBuffer::WriteUInt16(uint16 val) {
-  uint16 v = (byte_order_ == ORDER_NETWORK) ? HostToNetwork16(val) : val;
-  WriteBytes(reinterpret_cast<const char*>(&v), 2);
-}
-
-void ByteBuffer::WriteUInt24(uint32 val) {
-  uint32 v = (byte_order_ == ORDER_NETWORK) ? HostToNetwork32(val) : val;
-  char* start = reinterpret_cast<char*>(&v);
-  if (byte_order_ == ORDER_NETWORK || IsHostBigEndian()) {
-    ++start;
-  }
-  WriteBytes(start, 3);
-}
-
-void ByteBuffer::WriteUInt32(uint32 val) {
-  uint32 v = (byte_order_ == ORDER_NETWORK) ? HostToNetwork32(val) : val;
-  WriteBytes(reinterpret_cast<const char*>(&v), 4);
-}
-
-void ByteBuffer::WriteUInt64(uint64 val) {
-  uint64 v = (byte_order_ == ORDER_NETWORK) ? HostToNetwork64(val) : val;
-  WriteBytes(reinterpret_cast<const char*>(&v), 8);
-}
-
-void ByteBuffer::WriteString(const std::string& val) {
-  WriteBytes(val.c_str(), val.size());
-}
-
-void ByteBuffer::WriteBytes(const char* val, size_t len) {
-  if (Length() + len > Capacity())
-    Resize(Length() + len);
-
-  memcpy(bytes_ + end_, val, len);
-  end_ += len;
-}
-
-void ByteBuffer::Resize(size_t size) {
-  if (size > size_)
-    size = _max(size, 3 * size_ / 2);
-
-  size_t len = _min(end_ - start_, size);
-  char* new_bytes = new char[size];
-  memcpy(new_bytes, bytes_ + start_, len);
-  delete [] bytes_;
-
-  start_ = 0;
-  end_   = len;
-  size_  = size;
-  bytes_ = new_bytes;
-}
-
-bool ByteBuffer::Consume(size_t size) {
-  if (size > Length())
-    return false;
-
-  start_ += size;
-  return true;
-}
-
-bool ByteBuffer::Shift(size_t size) {
-  if (size > Length())
-    return false;
-
-  end_ = Length() - size;
-  memmove(bytes_, bytes_ + start_ + size, end_);
-  start_ = 0;
-  return true;
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/bytebuffer.h b/third_party/libjingle/source/talk/base/bytebuffer.h
deleted file mode 100644
index 1a494cb..0000000
--- a/third_party/libjingle/source/talk/base/bytebuffer.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice, 
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products 
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_BYTEBUFFER_H_
-#define TALK_BASE_BYTEBUFFER_H_
-
-#include <string>
-
-#include "talk/base/basictypes.h"
-#include "talk/base/constructormagic.h"
-
-namespace talk_base {
-
-class ByteBuffer {
- public:
-
-  enum ByteOrder {
-    ORDER_NETWORK = 0,  // Default, use network byte order (big endian).
-    ORDER_HOST,         // Use the native order of the host.
-  };
-
-  // |byte_order| defines order of bytes in the buffer.
-  ByteBuffer();
-  explicit ByteBuffer(ByteOrder byte_order);
-  ByteBuffer(const char* bytes, size_t len);
-  ByteBuffer(const char* bytes, size_t len, ByteOrder byte_order);
-
-  // Initializes buffer from a zero-terminated string.
-  explicit ByteBuffer(const char* bytes);
-
-  ~ByteBuffer();
-
-  const char* Data() const { return bytes_ + start_; }
-  size_t Length() const { return end_ - start_; }
-  size_t Capacity() const { return size_ - start_; }
-
-  // Read a next value from the buffer. Return false if there isn't
-  // enough data left for the specified type.
-  bool ReadUInt8(uint8* val);
-  bool ReadUInt16(uint16* val);
-  bool ReadUInt24(uint32* val);
-  bool ReadUInt32(uint32* val);
-  bool ReadUInt64(uint64* val);
-  bool ReadBytes(char* val, size_t len);
-
-  // Appends next |len| bytes from the buffer to |val|. Returns false
-  // if there is less than |len| bytes left.
-  bool ReadString(std::string* val, size_t len);
-
-  // Write value to the buffer. Resizes the buffer when it is
-  // neccessary.
-  void WriteUInt8(uint8 val);
-  void WriteUInt16(uint16 val);
-  void WriteUInt24(uint32 val);
-  void WriteUInt32(uint32 val);
-  void WriteUInt64(uint64 val);
-  void WriteString(const std::string& val);
-  void WriteBytes(const char* val, size_t len);
-
-  // Resize the buffer to the specified |size|.
-  void Resize(size_t size);
-
-  // Moves current position |size| bytes forward. Return false if
-  // there is less than |size| bytes left in the buffer.
-  bool Consume(size_t size);
-
-  // Drops |size| bytes from the front of the buffer. Return false if
-  // there is less than |size| bytes left in the buffer.
-  bool Shift(size_t size);
-
- private:
-  void Construct(const char* bytes, size_t size, ByteOrder byte_order);
-
-  char* bytes_;
-  size_t size_;
-  size_t start_;
-  size_t end_;
-  ByteOrder byte_order_;
-
-  // There are sensible ways to define these, but they aren't needed in our code
-  // base.
-  DISALLOW_COPY_AND_ASSIGN(ByteBuffer);
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_BYTEBUFFER_H_
diff --git a/third_party/libjingle/source/talk/base/bytebuffer_unittest.cc b/third_party/libjingle/source/talk/base/bytebuffer_unittest.cc
deleted file mode 100644
index 2970fdc..0000000
--- a/third_party/libjingle/source/talk/base/bytebuffer_unittest.cc
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/bytebuffer.h"
-#include "talk/base/byteorder.h"
-#include "talk/base/common.h"
-#include "talk/base/gunit.h"
-
-namespace talk_base {
-
-TEST(ByteBufferTest, TestByteOrder) {
-  uint16 n16 = 1;
-  uint32 n32 = 1;
-  uint64 n64 = 1;
-
-  EXPECT_EQ(n16, NetworkToHost16(HostToNetwork16(n16)));
-  EXPECT_EQ(n32, NetworkToHost32(HostToNetwork32(n32)));
-  EXPECT_EQ(n64, NetworkToHost64(HostToNetwork64(n64)));
-
-  if (IsHostBigEndian()) {
-    // The host is the network (big) endian.
-    EXPECT_EQ(n16, HostToNetwork16(n16));
-    EXPECT_EQ(n32, HostToNetwork32(n32));
-    EXPECT_EQ(n64, HostToNetwork64(n64));
-
-    // GetBE converts big endian to little endian here.
-    EXPECT_EQ(n16 >> 8, GetBE16(&n16));
-    EXPECT_EQ(n32 >> 24, GetBE32(&n32));
-    EXPECT_EQ(n64 >> 56, GetBE64(&n64));
-  } else {
-    // The host is little endian.
-    EXPECT_NE(n16, HostToNetwork16(n16));
-    EXPECT_NE(n32, HostToNetwork32(n32));
-    EXPECT_NE(n64, HostToNetwork64(n64));
-
-    // GetBE converts little endian to big endian here.
-    EXPECT_EQ(GetBE16(&n16), HostToNetwork16(n16));
-    EXPECT_EQ(GetBE32(&n32), HostToNetwork32(n32));
-    EXPECT_EQ(GetBE64(&n64), HostToNetwork64(n64));
-
-    // GetBE converts little endian to big endian here.
-    EXPECT_EQ(n16 << 8, GetBE16(&n16));
-    EXPECT_EQ(n32 << 24, GetBE32(&n32));
-    EXPECT_EQ(n64 << 56, GetBE64(&n64));
-  }
-}
-
-TEST(ByteBufferTest, TestBufferLength) {
-  ByteBuffer buffer;
-  size_t size = 0;
-  EXPECT_EQ(size, buffer.Length());
-
-  buffer.WriteUInt8(1);
-  ++size;
-  EXPECT_EQ(size, buffer.Length());
-
-  buffer.WriteUInt16(1);
-  size += 2;
-  EXPECT_EQ(size, buffer.Length());
-
-  buffer.WriteUInt24(1);
-  size += 3;
-  EXPECT_EQ(size, buffer.Length());
-
-  buffer.WriteUInt32(1);
-  size += 4;
-  EXPECT_EQ(size, buffer.Length());
-
-  buffer.WriteUInt64(1);
-  size += 8;
-  EXPECT_EQ(size, buffer.Length());
-
-  EXPECT_TRUE(buffer.Consume(0));
-  EXPECT_EQ(size, buffer.Length());
-
-  EXPECT_TRUE(buffer.Consume(4));
-  size -= 4;
-  EXPECT_EQ(size, buffer.Length());
-
-  EXPECT_TRUE(buffer.Shift(4));
-  size -= 4;
-  EXPECT_EQ(size, buffer.Length());
-}
-
-TEST(ByteBufferTest, TestReadWriteBuffer) {
-  ByteBuffer::ByteOrder orders[2] = { ByteBuffer::ORDER_HOST,
-                                      ByteBuffer::ORDER_NETWORK };
-  for (size_t i = 0; i < ARRAY_SIZE(orders); i++) {
-    ByteBuffer buffer(orders[i]);
-    uint8 ru8;
-    EXPECT_FALSE(buffer.ReadUInt8(&ru8));
-
-    // Write and read uint8.
-    uint8 wu8 = 1;
-    buffer.WriteUInt8(wu8);
-    EXPECT_TRUE(buffer.ReadUInt8(&ru8));
-    EXPECT_EQ(wu8, ru8);
-    EXPECT_EQ(0U, buffer.Length());
-
-    // Write and read uint16.
-    uint16 wu16 = (1 << 8) + 1;
-    buffer.WriteUInt16(wu16);
-    uint16 ru16;
-    EXPECT_TRUE(buffer.ReadUInt16(&ru16));
-    EXPECT_EQ(wu16, ru16);
-    EXPECT_EQ(0U, buffer.Length());
-
-    // Write and read uint24.
-    uint32 wu24 = (3 << 16) + (2 << 8) + 1;
-    buffer.WriteUInt24(wu24);
-    uint32 ru24;
-    EXPECT_TRUE(buffer.ReadUInt24(&ru24));
-    EXPECT_EQ(wu24, ru24);
-    EXPECT_EQ(0U, buffer.Length());
-
-    // Write and read uint32.
-    uint32 wu32 = (4 << 24) + (3 << 16) + (2 << 8) + 1;
-    buffer.WriteUInt32(wu32);
-    uint32 ru32;
-    EXPECT_TRUE(buffer.ReadUInt32(&ru32));
-    EXPECT_EQ(wu32, ru32);
-    EXPECT_EQ(0U, buffer.Length());
-
-    // Write and read uint64.
-    uint32 another32 = (8 << 24) + (7 << 16) + (6 << 8) + 5;
-    uint64 wu64 = (static_cast<uint64>(another32) << 32) + wu32;
-    buffer.WriteUInt64(wu64);
-    uint64 ru64;
-    EXPECT_TRUE(buffer.ReadUInt64(&ru64));
-    EXPECT_EQ(wu64, ru64);
-    EXPECT_EQ(0U, buffer.Length());
-
-    // Write and read string.
-    std::string write_string("hello");
-    buffer.WriteString(write_string);
-    std::string read_string;
-    EXPECT_TRUE(buffer.ReadString(&read_string, write_string.size()));
-    EXPECT_EQ(write_string, read_string);
-    EXPECT_EQ(0U, buffer.Length());
-
-    // Write and read in order.
-    buffer.WriteUInt8(wu8);
-    buffer.WriteUInt16(wu16);
-    buffer.WriteUInt24(wu24);
-    buffer.WriteUInt32(wu32);
-    buffer.WriteUInt64(wu64);
-    EXPECT_TRUE(buffer.ReadUInt8(&ru8));
-    EXPECT_EQ(wu8, ru8);
-    EXPECT_TRUE(buffer.ReadUInt16(&ru16));
-    EXPECT_EQ(wu16, ru16);
-    EXPECT_TRUE(buffer.ReadUInt24(&ru24));
-    EXPECT_EQ(wu24, ru24);
-    EXPECT_TRUE(buffer.ReadUInt32(&ru32));
-    EXPECT_EQ(wu32, ru32);
-    EXPECT_TRUE(buffer.ReadUInt64(&ru64));
-    EXPECT_EQ(wu64, ru64);
-    EXPECT_EQ(0U, buffer.Length());
-  }
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/byteorder.h b/third_party/libjingle/source/talk/base/byteorder.h
deleted file mode 100644
index 08094b8..0000000
--- a/third_party/libjingle/source/talk/base/byteorder.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice, 
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products 
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_BYTEORDER_H__
-#define TALK_BASE_BYTEORDER_H__
-
-#ifdef POSIX
-#include <arpa/inet.h>
-#endif
-
-#ifdef WIN32
-#include <winsock2.h>
-#endif
-
-#include "talk/base/basictypes.h"
-
-namespace talk_base {
-
-// Reading and writing of little and big-endian numbers from memory
-// TODO: Add HostEndian #defines (HE)
-// TODO: Consider NetworkEndian as synonym for BigEndian, for clarity in use.
-// TODO: Consider creating optimized versions, such as direct read/writes of
-// integers in host-endian format, when the platform supports it.
-
-inline void Set8(void* memory, size_t offset, uint8 v) {
-  static_cast<uint8*>(memory)[offset] = v;
-}
-inline uint8 Get8(const void* memory, size_t offset) {
-  return static_cast<const uint8*>(memory)[offset];
-}
-
-inline void SetBE16(void* memory, uint16 v) {
-  Set8(memory, 0, static_cast<uint8>(v >>  8));
-  Set8(memory, 1, static_cast<uint8>(v >>  0));
-}
-inline void SetBE32(void* memory, uint32 v) {
-  Set8(memory, 0, static_cast<uint8>(v >> 24));
-  Set8(memory, 1, static_cast<uint8>(v >> 16));
-  Set8(memory, 2, static_cast<uint8>(v >>  8));
-  Set8(memory, 3, static_cast<uint8>(v >>  0));
-}
-inline void SetBE64(void* memory, uint64 v) {
-  Set8(memory, 0, static_cast<uint8>(v >> 56));
-  Set8(memory, 1, static_cast<uint8>(v >> 48));
-  Set8(memory, 2, static_cast<uint8>(v >> 40));
-  Set8(memory, 3, static_cast<uint8>(v >> 32));
-  Set8(memory, 4, static_cast<uint8>(v >> 24));
-  Set8(memory, 5, static_cast<uint8>(v >> 16));
-  Set8(memory, 6, static_cast<uint8>(v >>  8));
-  Set8(memory, 7, static_cast<uint8>(v >>  0));
-}
-inline uint16 GetBE16(const void* memory) {
-  return (static_cast<uint16>(Get8(memory, 0)) << 8)
-       | (static_cast<uint16>(Get8(memory, 1)) << 0);
-}
-inline uint32 GetBE32(const void* memory) {
-  return (static_cast<uint32>(Get8(memory, 0)) << 24)
-       | (static_cast<uint32>(Get8(memory, 1)) << 16)
-       | (static_cast<uint32>(Get8(memory, 2)) <<  8)
-       | (static_cast<uint32>(Get8(memory, 3)) <<  0);
-}
-inline uint64 GetBE64(const void* memory) {
-  return (static_cast<uint64>(Get8(memory, 0)) << 56)
-       | (static_cast<uint64>(Get8(memory, 1)) << 48)
-       | (static_cast<uint64>(Get8(memory, 2)) << 40)
-       | (static_cast<uint64>(Get8(memory, 3)) << 32)
-       | (static_cast<uint64>(Get8(memory, 4)) << 24)
-       | (static_cast<uint64>(Get8(memory, 5)) << 16)
-       | (static_cast<uint64>(Get8(memory, 6)) <<  8)
-       | (static_cast<uint64>(Get8(memory, 7)) <<  0);
-}
-
-inline void SetLE16(void* memory, uint16 v) {
-  Set8(memory, 1, static_cast<uint8>(v >>  8));
-  Set8(memory, 0, static_cast<uint8>(v >>  0));
-}
-inline void SetLE32(void* memory, uint32 v) {
-  Set8(memory, 3, static_cast<uint8>(v >> 24));
-  Set8(memory, 2, static_cast<uint8>(v >> 16));
-  Set8(memory, 1, static_cast<uint8>(v >>  8));
-  Set8(memory, 0, static_cast<uint8>(v >>  0));
-}
-inline void SetLE64(void* memory, uint64 v) {
-  Set8(memory, 7, static_cast<uint8>(v >> 56));
-  Set8(memory, 6, static_cast<uint8>(v >> 48));
-  Set8(memory, 5, static_cast<uint8>(v >> 40));
-  Set8(memory, 4, static_cast<uint8>(v >> 32));
-  Set8(memory, 3, static_cast<uint8>(v >> 24));
-  Set8(memory, 2, static_cast<uint8>(v >> 16));
-  Set8(memory, 1, static_cast<uint8>(v >>  8));
-  Set8(memory, 0, static_cast<uint8>(v >>  0));
-}
-inline uint16 GetLE16(const void* memory) {
-  return (static_cast<uint16>(Get8(memory, 1)) << 8)
-       | (static_cast<uint16>(Get8(memory, 0)) << 0);
-}
-inline uint32 GetLE32(const void* memory) {
-  return (static_cast<uint32>(Get8(memory, 3)) << 24)
-       | (static_cast<uint32>(Get8(memory, 2)) << 16)
-       | (static_cast<uint32>(Get8(memory, 1)) <<  8)
-       | (static_cast<uint32>(Get8(memory, 0)) <<  0);
-}
-inline uint64 GetLE64(const void* memory) {
-  return (static_cast<uint64>(Get8(memory, 7)) << 56)
-       | (static_cast<uint64>(Get8(memory, 6)) << 48)
-       | (static_cast<uint64>(Get8(memory, 5)) << 40)
-       | (static_cast<uint64>(Get8(memory, 4)) << 32)
-       | (static_cast<uint64>(Get8(memory, 3)) << 24)
-       | (static_cast<uint64>(Get8(memory, 2)) << 16)
-       | (static_cast<uint64>(Get8(memory, 1)) <<  8)
-       | (static_cast<uint64>(Get8(memory, 0)) <<  0);
-}
-
-// Check if the current host is big endian.
-inline bool IsHostBigEndian() {
-  static const int number = 1;
-  return (0 == *reinterpret_cast<const char*>(&number));
-}
-
-inline uint16 HostToNetwork16(uint16 n) {
-  return htons(n);
-}
-
-inline uint32 HostToNetwork32(uint32 n) {
-  return htonl(n);
-}
-
-inline uint64 HostToNetwork64(uint64 n) {
-  // If the host is little endian, GetBE64 converts n to big network endian.
-  return IsHostBigEndian() ? n : GetBE64(&n);
-}
-
-inline uint16 NetworkToHost16(uint16 n) {
-  return ntohs(n);
-}
-
-inline uint32 NetworkToHost32(uint32 n) {
-  return ntohl(n);
-}
-
-inline uint64 NetworkToHost64(uint64 n) {
-  // If the host is little endian, GetBE64 converts n to little endian.
-  return IsHostBigEndian() ? n : GetBE64(&n);
-}
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_BYTEORDER_H__
diff --git a/third_party/libjingle/source/talk/base/checks.cc b/third_party/libjingle/source/talk/base/checks.cc
deleted file mode 100644
index 5466783..0000000
--- a/third_party/libjingle/source/talk/base/checks.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * libjingle
- * Copyright 2006, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-#include "talk/base/checks.h"
-#include "talk/base/logging.h"
-
-void Fatal(const char* file, int line, const char* format, ...) {
-  char msg[256];
-
-  va_list arguments;
-  va_start(arguments, format);
-  vsnprintf(msg, sizeof(msg), format, arguments);
-  va_end(arguments);
-
-  LOG(LS_ERROR) << "\n\n#\n# Fatal error in " << file
-                << ", line " << line << "\n#" << msg
-                << "\n#\n";
-  abort();
-}
diff --git a/third_party/libjingle/source/talk/base/checks.h b/third_party/libjingle/source/talk/base/checks.h
deleted file mode 100644
index 83ad372..0000000
--- a/third_party/libjingle/source/talk/base/checks.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * libjingle
- * Copyright 2006, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice, 
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products 
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// This module contains some basic debugging facilities.
-// Originally comes from shared/commandlineflags/checks.h
-
-#ifndef TALK_BASE_CHECKS_H_
-#define TALK_BASE_CHECKS_H_
-
-#include <string.h>
-
-// Prints an error message to stderr and aborts execution.
-void Fatal(const char* file, int line, const char* format, ...);
-
-
-// The UNREACHABLE macro is very useful during development.
-#define UNREACHABLE()                                   \
-  Fatal(__FILE__, __LINE__, "unreachable code")
-
-#endif  // TALK_BASE_CHECKS_H_
diff --git a/third_party/libjingle/source/talk/base/common.cc b/third_party/libjingle/source/talk/base/common.cc
deleted file mode 100644
index 59e73d5..0000000
--- a/third_party/libjingle/source/talk/base/common.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <memory.h>
-
-#if WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif  // WIN32
-
-#if OSX
-#include <CoreServices/CoreServices.h>
-#endif  // OSX
-
-#include <algorithm>
-#include "talk/base/common.h"
-#include "talk/base/logging.h"
-
-//////////////////////////////////////////////////////////////////////
-// Assertions
-//////////////////////////////////////////////////////////////////////
-
-namespace talk_base {
-
-void Break() {
-#if WIN32
-  ::DebugBreak();
-#elif OSX  // !WIN32
-  ::Debugger();
-#else // !OSX && !WIN32
-#if _DEBUG_HAVE_BACKTRACE
-  OutputTrace();
-#endif
-  abort();
-#endif // !OSX && !WIN32
-}
-
-void LogAssert(const char * function, const char * file, int line,
-               const char * expression) {
-  // TODO - if we put hooks in here, we can do a lot fancier logging
-  LOG(LS_ERROR) << file << "(" << line << ")" << ": ASSERT FAILED: "
-                << expression << " @ " << function;
-}
-
-} // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/common.h b/third_party/libjingle/source/talk/base/common.h
deleted file mode 100644
index 63de637..0000000
--- a/third_party/libjingle/source/talk/base/common.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * libjingle
- * Copyright 2004 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_COMMON_H_
-#define TALK_BASE_COMMON_H_
-
-#include "talk/base/constructormagic.h"
-
-#if defined(_MSC_VER)
-// warning C4355: 'this' : used in base member initializer list
-#pragma warning(disable:4355)
-#endif
-
-//////////////////////////////////////////////////////////////////////
-// General Utilities
-//////////////////////////////////////////////////////////////////////
-
-#ifndef UNUSED
-#define UNUSED(x) Unused(static_cast<const void *>(&x))
-#define UNUSED2(x,y) Unused(static_cast<const void *>(&x)); Unused(static_cast<const void *>(&y))
-#define UNUSED3(x,y,z) Unused(static_cast<const void *>(&x)); Unused(static_cast<const void *>(&y)); Unused(static_cast<const void *>(&z))
-#define UNUSED4(x,y,z,a) Unused(static_cast<const void *>(&x)); Unused(static_cast<const void *>(&y)); Unused(static_cast<const void *>(&z)); Unused(static_cast<const void *>(&a))
-#define UNUSED5(x,y,z,a,b) Unused(static_cast<const void *>(&x)); Unused(static_cast<const void *>(&y)); Unused(static_cast<const void *>(&z)); Unused(static_cast<const void *>(&a)); Unused(static_cast<const void *>(&b))
-inline void Unused(const void *) { }
-#endif // UNUSED
-
-#ifndef WIN32
-#define strnicmp(x,y,n) strncasecmp(x,y,n)
-#define stricmp(x,y) strcasecmp(x,y)
-
-// TODO: Remove this. std::max should be used everywhere in the code.
-// NOMINMAX must be defined where we include <windows.h>.
-#define stdmax(x,y) std::max(x,y)
-#else
-#define stdmax(x,y) talk_base::_max(x,y)
-#endif
-
-
-#define ARRAY_SIZE(x) (static_cast<int>((sizeof(x)/sizeof(x[0]))))
-
-/////////////////////////////////////////////////////////////////////////////
-// Assertions
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef ENABLE_DEBUG
-#define ENABLE_DEBUG _DEBUG
-#endif  // !defined(ENABLE_DEBUG)
-
-#if ENABLE_DEBUG
-
-namespace talk_base {
-
-// Break causes the debugger to stop executing, or the program to abort
-void Break();
-
-// LogAssert writes information about an assertion to the log
-void LogAssert(const char * function, const char * file, int line,
-               const char * expression);
-
-inline bool Assert(bool result, const char * function, const char * file,
-                   int line, const char * expression) {
-  if (!result) {
-    LogAssert(function, file, line, expression);
-    Break();
-    return false;
-  }
-  return true;
-}
-
-}  // namespace talk_base
-
-#if defined(_MSC_VER) && _MSC_VER < 1300
-#define __FUNCTION__ ""
-#endif
-
-#ifndef ASSERT
-#define ASSERT(x) (void)talk_base::Assert((x),__FUNCTION__,__FILE__,__LINE__,#x)
-#endif
-
-#ifndef VERIFY
-#define VERIFY(x) talk_base::Assert((x),__FUNCTION__,__FILE__,__LINE__,#x)
-#endif
-
-#else // !ENABLE_DEBUG
-
-namespace talk_base {
-
-inline bool ImplicitCastToBool(bool result) { return result; }
-
-}  // namespace talk_base
-
-#ifndef ASSERT
-#define ASSERT(x) (void)0
-#endif
-
-#ifndef VERIFY
-#define VERIFY(x) talk_base::ImplicitCastToBool(x)
-#endif
-
-#endif // !ENABLE_DEBUG
-
-#define COMPILE_TIME_ASSERT(expr)       char CTA_UNIQUE_NAME[expr]
-#define CTA_UNIQUE_NAME                 CTA_MAKE_NAME(__LINE__)
-#define CTA_MAKE_NAME(line)             CTA_MAKE_NAME2(line)
-#define CTA_MAKE_NAME2(line)            constraint_ ## line
-
-// Forces compiler to inline, even against its better judgement. Use wisely.
-#if defined(__GNUC__)
-#define FORCE_INLINE __attribute__((always_inline))
-#elif defined(WIN32)
-#define FORCE_INLINE __forceinline
-#else
-#define FORCE_INLINE
-#endif
-
-#endif // TALK_BASE_COMMON_H_
diff --git a/third_party/libjingle/source/talk/base/constructormagic.h b/third_party/libjingle/source/talk/base/constructormagic.h
deleted file mode 100644
index 8b1f7ff..0000000
--- a/third_party/libjingle/source/talk/base/constructormagic.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice, 
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products 
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_CONSTRUCTORMAGIC_H_
-#define TALK_BASE_CONSTRUCTORMAGIC_H_
-
-#define DISALLOW_ASSIGN(TypeName) \
-  void operator=(const TypeName&)
-
-// A macro to disallow the evil copy constructor and operator= functions
-// This should be used in the private: declarations for a class
-#define DISALLOW_COPY_AND_ASSIGN(TypeName)    \
-  TypeName(const TypeName&);                    \
-  DISALLOW_ASSIGN(TypeName)
-
-// Alternative, less-accurate legacy name.
-#define DISALLOW_EVIL_CONSTRUCTORS(TypeName) \
-  DISALLOW_COPY_AND_ASSIGN(TypeName)
-
-// A macro to disallow all the implicit constructors, namely the
-// default constructor, copy constructor and operator= functions.
-//
-// This should be used in the private: declarations for a class
-// that wants to prevent anyone from instantiating it. This is
-// especially useful for classes containing only static methods.
-#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
-  TypeName();                                    \
-  DISALLOW_EVIL_CONSTRUCTORS(TypeName)
-
-
-#endif  // TALK_BASE_CONSTRUCTORMAGIC_H_
diff --git a/third_party/libjingle/source/talk/base/cpuid.cc b/third_party/libjingle/source/talk/base/cpuid.cc
deleted file mode 100644
index 7f0326a..0000000
--- a/third_party/libjingle/source/talk/base/cpuid.cc
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * libjingle
- * Copyright 2011 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/cpuid.h"
-
-#ifdef _MSC_VER
-#include <intrin.h>
-#elif defined(__ANDROID__)
-#include <cpu-features.h>
-#elif defined(LINUX)
-#include "talk/base/linux.h"
-#endif
-
-// TODO: Use cpuid.h when gcc 4.4 is used on OSX and Linux.
-#if (defined(__pic__) || defined(__APPLE__)) && defined(__i386__)
-static inline void __cpuid(int cpu_info[4], int info_type) {
-  __asm__ volatile (
-    "mov %%ebx, %%edi\n"
-    "cpuid\n"
-    "xchg %%edi, %%ebx\n"
-    : "=a"(cpu_info[0]), "=D"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3])
-    : "a"(info_type)
-  );
-}
-#elif defined(__i386__) || defined(__x86_64__)
-static inline void __cpuid(int cpu_info[4], int info_type) {
-  __asm__ volatile (
-    "cpuid\n"
-    : "=a"(cpu_info[0]), "=b"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3])
-    : "a"(info_type)
-  );
-}
-#endif
-
-namespace talk_base {
-
-// CPU detect function for SIMD instruction sets.
-bool CpuInfo::cpu_info_initialized_ = false;
-int CpuInfo::cpu_info_ = 0;
-// Global lock for cpu initialization.
-CriticalSection CpuInfo::crit_;
-
-#ifdef CPU_X86
-void cpuid(int cpu_info[4], int info_type) {
-  __cpuid(cpu_info, info_type);
-}
-#endif
-
-void CpuInfo::InitCpuFlags() {
-#ifdef CPU_X86
-  int cpu_info[4];
-  __cpuid(cpu_info, 1);
-  cpu_info_ = (cpu_info[2] & 0x00000200 ? kCpuHasSSSE3 : 0) |
-    (cpu_info[3] & 0x04000000 ? kCpuHasSSE2 : 0);
-#elif defined(__ANDROID__) && defined(__arm__)
-  uint64_t features = android_getCpuFeatures();
-  cpu_info_ = ((features & ANDROID_CPU_ARM_FEATURE_NEON) ? kCpuHasNEON : 0);
-#elif defined(LINUX) && defined(__arm__)
-  cpu_info_ = 0;
-  // Look for NEON support in /proc/cpuinfo
-  ProcCpuInfo proc_info;
-  size_t section_count;
-  if (proc_info.LoadFromSystem() &&
-      proc_info.GetSectionCount(&section_count)) {
-    for (size_t i = 0; i < section_count; ++i) {
-      std::string out_features;
-      if (proc_info.GetSectionStringValue(i, "Features", &out_features)) {
-        if (out_features.find("neon") != std::string::npos) {
-          cpu_info_ |= kCpuHasNEON;
-        }
-        break;
-      }
-    }
-  }
-#elif defined(__ARM_NEON__)
-  // gcc -mfpu=neon defines __ARM_NEON__
-  // if code is specifically built for Neon-only, enable the flag.
-  cpu_info_ |= kCpuHasNEON;
-#else
-  cpu_info_ = 0;
-#endif
-  cpu_info_initialized_ = true;
-}
-
-void CpuInfo::MaskCpuFlagsForTest(int enable_flags) {
-  CritScope cs(&crit_);
-  InitCpuFlags();
-  cpu_info_ &= enable_flags;
-}
-
-bool CpuInfo::TestCpuFlag(int flag) {
-  if (!cpu_info_initialized_) {
-    CritScope cs(&crit_);
-    InitCpuFlags();
-  }
-  return cpu_info_ & flag ? true : false;
-}
-
-// Returns the vendor string from the cpu, e.g. "GenuineIntel", "AuthenticAMD".
-// See "Intel Processor Identification and the CPUID Instruction"
-// (Intel document number: 241618)
-std::string CpuInfo::GetCpuVendor() {
-#ifdef CPU_X86
-  int cpu_info[4];
-  cpuid(cpu_info, 0);
-  cpu_info[0] = cpu_info[1];  // Reorder output
-  cpu_info[1] = cpu_info[3];
-  cpu_info[2] = cpu_info[2];
-  cpu_info[3] = 0;
-  return std::string(reinterpret_cast<char *>(&cpu_info[0]));
-#else
-  return std::string("Undefined");
-#endif
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/cpuid.h b/third_party/libjingle/source/talk/base/cpuid.h
deleted file mode 100644
index 3688668..0000000
--- a/third_party/libjingle/source/talk/base/cpuid.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * libjingle
- * Copyright 2011 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_CPUID_H_
-#define TALK_BASE_CPUID_H_
-
-#include <string>
-
-#include "talk/base/basictypes.h"
-#include "talk/base/criticalsection.h"
-
-namespace talk_base {
-
-#ifdef CPU_X86
-void cpuid(int cpu_info[4], int info_type);
-#endif
-
-class CpuInfo {
- public:
-  // These flags are only valid on x86 processors
-  static const int kCpuHasSSE2 = 1;
-  static const int kCpuHasSSSE3 = 2;
-
-  // SIMD support on ARM processors
-  static const int kCpuHasNEON = 4;
-
-  // Detect CPU has SSE2 etc.
-  static bool TestCpuFlag(int flag);
-
-  // Detect CPU vendor: "GenuineIntel" or "AuthenticAMD"
-  static std::string GetCpuVendor();
-
-  // For testing, allow CPU flags to be disabled.
-  static void MaskCpuFlagsForTest(int enable_flags);
-
- private:
-  // Global lock for the cpu initialization
-  static CriticalSection crit_;
-  static bool cpu_info_initialized_;
-  static int cpu_info_;
-
-  static void InitCpuFlags();
-
-  DISALLOW_IMPLICIT_CONSTRUCTORS(CpuInfo);
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_CPUID_H_
diff --git a/third_party/libjingle/source/talk/base/cpuid_unittest.cc b/third_party/libjingle/source/talk/base/cpuid_unittest.cc
deleted file mode 100644
index f06178f..0000000
--- a/third_party/libjingle/source/talk/base/cpuid_unittest.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * libjingle
- * Copyright 2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <iostream>
-
-#include "talk/base/cpuid.h"
-#include "talk/base/gunit.h"
-#include "talk/base/stringutils.h"
-
-
-// Tests CPUID instruction for Vendor identification.
-TEST(CpuInfoTest, CpuVendorNonEmpty) {
-  EXPECT_FALSE(talk_base::CpuInfo::GetCpuVendor().empty());
-}
-
-#ifdef CPU_X86
-
-// Tests Vendor identification is Intel or AMD.
-// See Also http://en.wikipedia.org/wiki/CPUID
-TEST(CpuInfoTest, CpuVendorIntelAMD) {
-  const std::string vendor = talk_base::CpuInfo::GetCpuVendor();
-  LOG(LS_INFO) << "CpuVendor: " << vendor;
-  EXPECT_TRUE(talk_base::string_match(vendor.c_str(),
-                                      "GenuineIntel") ||
-              talk_base::string_match(vendor.c_str(),
-                                      "AuthenticAMD"));
-}
-
-// Tests CPUID maximum function number.
-// Modern CPU has 11, but we expect at least 3.
-TEST(CpuInfoTest, CpuIdMax) {
-  int cpu_info[4] = { 0 };
-  talk_base::cpuid(cpu_info, 0);
-  LOG(LS_INFO) << "CpuId Max Function: " << cpu_info[0];
-  EXPECT_GE(cpu_info[0], 1);
-}
-
-// Tests CPUID functions 0 and 1 return different values.
-TEST(CpuInfoTest, CpuId) {
-  int cpu_info0[4] = { 0 };
-  int cpu_info1[4] = { 0 };
-  talk_base::cpuid(cpu_info0, 0);
-  talk_base::cpuid(cpu_info1, 1);
-  LOG(LS_INFO) << "CpuId Function 0: " << std::hex
-               << std::setfill('0') << std::setw(8) << cpu_info0[0] << " "
-               << std::setfill('0') << std::setw(8) << cpu_info0[1] << " "
-               << std::setfill('0') << std::setw(8) << cpu_info0[2] << " "
-               << std::setfill('0') << std::setw(8) << cpu_info0[3];
-  LOG(LS_INFO) << "CpuId Function 1: " << std::hex
-               << std::setfill('0') << std::setw(8) << cpu_info1[0] << " "
-               << std::setfill('0') << std::setw(8) << cpu_info1[1] << " "
-               << std::setfill('0') << std::setw(8) << cpu_info1[2] << " "
-               << std::setfill('0') << std::setw(8) << cpu_info1[3];
-  EXPECT_NE(memcmp(cpu_info0, cpu_info1, sizeof(cpu_info0)), 0);
-
-  LOG(LS_INFO) << "SSE2: "
-      << talk_base::CpuInfo::TestCpuFlag(talk_base::CpuInfo::kCpuHasSSE2);
-  LOG(LS_INFO) << "SSSE3: "
-      << talk_base::CpuInfo::TestCpuFlag(talk_base::CpuInfo::kCpuHasSSSE3);
-}
-#endif
-
diff --git a/third_party/libjingle/source/talk/base/cpumonitor.cc b/third_party/libjingle/source/talk/base/cpumonitor.cc
deleted file mode 100644
index 64f6147..0000000
--- a/third_party/libjingle/source/talk/base/cpumonitor.cc
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- * libjingle
- * Copyright 2010 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/cpumonitor.h"
-
-#include <string>
-
-#include "talk/base/common.h"
-#include "talk/base/logging.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/systeminfo.h"
-#include "talk/base/thread.h"
-#include "talk/base/timeutils.h"
-
-#ifdef WIN32
-#include "talk/base/win32.h"
-#include <winternl.h>
-#endif
-
-#ifdef POSIX
-#include <sys/time.h>
-#endif
-
-#if defined(IOS) || defined(OSX)
-#include <mach/mach_host.h>
-#include <mach/mach_init.h>
-#include <mach/host_info.h>
-#include <mach/task.h>
-#endif  // defined(IOS) || defined(OSX)
-
-#if defined(LINUX) || defined(ANDROID)
-#include <sys/resource.h>
-#include <errno.h>
-#include <stdio.h>
-#include "talk/base/fileutils.h"
-#include "talk/base/pathutils.h"
-#endif // defined(LINUX) || defined(ANDROID)
-
-#if defined(IOS) || defined(OSX)
-static uint64 TimeValueTToInt64(const time_value_t &time_value) {
-  return talk_base::kNumMicrosecsPerSec * time_value.seconds +
-      time_value.microseconds;
-}
-#endif  // defined(IOS) || defined(OSX)
-
-// How CpuSampler works
-// When threads switch, the time they spent is accumulated to system counters.
-// The time can be treated as user, kernel or idle.
-// user time is applications.
-// kernel time is the OS, including the thread switching code itself.
-//   typically kernel time indicates IO.
-// idle time is a process that wastes time when nothing is ready to run.
-//
-// User time is broken down by process (application).  One of the applications
-// is the current process.  When you add up all application times, this is
-// system time.  If only your application is running, system time should be the
-// same as process time.
-//
-// All cores contribute to these accumulators.  A dual core process is able to
-// process twice as many cycles as a single core.  The actual code efficiency
-// may be worse, due to contention, but the available cycles is exactly twice
-// as many, and the cpu load will reflect the efficiency.  Hyperthreads behave
-// the same way.  The load will reflect 200%, but the actual amount of work
-// completed will be much less than a true dual core.
-//
-// Total available performance is the sum of all accumulators.
-// If you tracked this for 1 second, it would essentially give you the clock
-// rate - number of cycles per second.
-// Speed step / Turbo Boost is not considered, so infact more processing time
-// may be available.
-
-namespace talk_base {
-
-// Note Tests on Windows show 600 ms is minimum stable interval for Windows 7.
-static const int32 kDefaultInterval = 950;  // Slightly under 1 second.
-
-CpuSampler::CpuSampler()
-    : min_load_interval_(kDefaultInterval)
-#ifdef WIN32
-      , get_system_times_(NULL),
-      nt_query_system_information_(NULL),
-      force_fallback_(false)
-#endif
-    {
-}
-
-CpuSampler::~CpuSampler() {
-}
-
-// Set minimum interval in ms between computing new load values. Default 950.
-void CpuSampler::set_load_interval(int min_load_interval) {
-  min_load_interval_ = min_load_interval;
-}
-
-bool CpuSampler::Init() {
-  sysinfo_.reset(new SystemInfo);
-  cpus_ = sysinfo_->GetMaxCpus();
-  if (cpus_ == 0) {
-    return false;
-  }
-#ifdef WIN32
-  // Note that GetSystemTimes is available in Windows XP SP1 or later.
-  // http://msdn.microsoft.com/en-us/library/ms724400.aspx
-  // NtQuerySystemInformation is used as a fallback.
-  if (!force_fallback_) {
-    get_system_times_ = GetProcAddress(GetModuleHandle(L"kernel32.dll"),
-        "GetSystemTimes");
-  }
-  nt_query_system_information_ = GetProcAddress(GetModuleHandle(L"ntdll.dll"),
-      "NtQuerySystemInformation");
-  if ((get_system_times_ == NULL) && (nt_query_system_information_ == NULL)) {
-    return false;
-  }
-#endif
-#if defined(LINUX) || defined(ANDROID)
-  Pathname sname("/proc/stat");
-  sfile_.reset(Filesystem::OpenFile(sname, "rb"));
-  if (sfile_.get() == NULL) {
-    LOG_ERR(LS_ERROR) << "open proc/stat failed:";
-    return false;
-  }
-  if (!sfile_->DisableBuffering()) {
-    LOG_ERR(LS_ERROR) << "could not disable buffering for proc/stat";
-    return false;
-  }
-#endif // defined(LINUX) || defined(ANDROID)
-  GetProcessLoad();  // Initialize values.
-  GetSystemLoad();
-  // Help next user call return valid data by recomputing load.
-  process_.prev_load_time_ = 0u;
-  system_.prev_load_time_ = 0u;
-  return true;
-}
-
-float CpuSampler::UpdateCpuLoad(uint64 current_total_times,
-                                uint64 current_cpu_times,
-                                uint64 *prev_total_times,
-                                uint64 *prev_cpu_times) {
-  float result = 0.f;
-  if (current_total_times < *prev_total_times ||
-      current_cpu_times < *prev_cpu_times) {
-    LOG(LS_ERROR) << "Inconsistent time values are passed. ignored";
-  } else {
-    const uint64 cpu_diff = current_cpu_times - *prev_cpu_times;
-    const uint64 total_diff = current_total_times - *prev_total_times;
-    result = (total_diff == 0ULL ? 0.f :
-              static_cast<float>(1.0f * cpu_diff / total_diff));
-    if (result > static_cast<float>(cpus_)) {
-      result = static_cast<float>(cpus_);
-    }
-    *prev_total_times = current_total_times;
-    *prev_cpu_times = current_cpu_times;
-  }
-  return result;
-}
-
-float CpuSampler::GetSystemLoad() {
-  uint32 timenow = Time();
-  int elapsed = static_cast<int>(TimeDiff(timenow, system_.prev_load_time_));
-  if (min_load_interval_ != 0 && system_.prev_load_time_ != 0u &&
-      elapsed < min_load_interval_) {
-    return system_.prev_load_;
-  }
-#ifdef WIN32
-  uint64 total_times, cpu_times;
-
-  typedef BOOL (_stdcall *GST_PROC)(LPFILETIME, LPFILETIME, LPFILETIME);
-  typedef NTSTATUS (WINAPI *QSI_PROC)(SYSTEM_INFORMATION_CLASS,
-      PVOID, ULONG, PULONG);
-
-  GST_PROC get_system_times = reinterpret_cast<GST_PROC>(get_system_times_);
-  QSI_PROC nt_query_system_information = reinterpret_cast<QSI_PROC>(
-      nt_query_system_information_);
-
-  if (get_system_times) {
-    FILETIME idle_time, kernel_time, user_time;
-    if (!get_system_times(&idle_time, &kernel_time, &user_time)) {
-      LOG(LS_ERROR) << "::GetSystemTimes() failed: " << ::GetLastError();
-      return 0.f;
-    }
-    // kernel_time includes Kernel idle time, so no need to
-    // include cpu_time as total_times
-    total_times = ToUInt64(kernel_time) + ToUInt64(user_time);
-    cpu_times = total_times - ToUInt64(idle_time);
-
-  } else {
-    if (nt_query_system_information) {
-      ULONG returned_length = 0;
-      scoped_array<SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION> processor_info(
-          new SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION[cpus_]);
-      nt_query_system_information(
-          ::SystemProcessorPerformanceInformation,
-          reinterpret_cast<void*>(processor_info.get()),
-          cpus_ * sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION),
-          &returned_length);
-
-      if (returned_length !=
-          (cpus_ * sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION))) {
-        LOG(LS_ERROR) << "NtQuerySystemInformation has unexpected size";
-        return 0.f;
-      }
-
-      uint64 current_idle = 0;
-      uint64 current_kernel = 0;
-      uint64 current_user = 0;
-      for (int ix = 0; ix < cpus_; ++ix) {
-        current_idle += processor_info[ix].IdleTime.QuadPart;
-        current_kernel += processor_info[ix].UserTime.QuadPart;
-        current_user += processor_info[ix].KernelTime.QuadPart;
-      }
-      total_times = current_kernel + current_user;
-      cpu_times = total_times - current_idle;
-    } else {
-      return 0.f;
-    }
-  }
-#endif  // WIN32
-
-#if defined(IOS) || defined(OSX)
-  host_cpu_load_info_data_t cpu_info;
-  mach_msg_type_number_t info_count = HOST_CPU_LOAD_INFO_COUNT;
-  if (KERN_SUCCESS != host_statistics(mach_host_self(), HOST_CPU_LOAD_INFO,
-                                      reinterpret_cast<host_info_t>(&cpu_info),
-                                      &info_count)) {
-    LOG(LS_ERROR) << "::host_statistics() failed";
-    return 0.f;
-  }
-
-  const uint64 cpu_times = cpu_info.cpu_ticks[CPU_STATE_NICE] +
-      cpu_info.cpu_ticks[CPU_STATE_SYSTEM] +
-      cpu_info.cpu_ticks[CPU_STATE_USER];
-  const uint64 total_times = cpu_times + cpu_info.cpu_ticks[CPU_STATE_IDLE];
-#endif  // defined(IOS) || defined(OSX)
-
-#if defined(LINUX) || defined(ANDROID)
-  if (sfile_.get() == NULL) {
-    LOG(LS_ERROR) << "Invalid handle for proc/stat";
-    return 0.f;
-  }
-  std::string statbuf;
-  sfile_->SetPosition(0);
-  if (!sfile_->ReadLine(&statbuf)) {
-    LOG_ERR(LS_ERROR) << "Could not read proc/stat file";
-    return 0.f;
-  }
-
-  unsigned long long user;
-  unsigned long long nice;
-  unsigned long long system;
-  unsigned long long idle;
-  if (sscanf(statbuf.c_str(), "cpu %Lu %Lu %Lu %Lu",
-             &user, &nice,
-             &system, &idle) != 4) {
-    LOG_ERR(LS_ERROR) << "Could not parse cpu info";
-    return 0.f;
-  }
-  const uint64 cpu_times = nice + system + user;
-  const uint64 total_times = cpu_times + idle;
-#endif  // defined(LINUX) || defined(ANDROID)
-  system_.prev_load_time_ = timenow;
-  system_.prev_load_ = UpdateCpuLoad(total_times,
-                                     cpu_times * cpus_,
-                                     &system_.prev_total_times_,
-                                     &system_.prev_cpu_times_);
-  return system_.prev_load_;
-}
-
-float CpuSampler::GetProcessLoad() {
-  uint32 timenow = Time();
-  int elapsed = static_cast<int>(TimeDiff(timenow, process_.prev_load_time_));
-  if (min_load_interval_ != 0 && process_.prev_load_time_ != 0u &&
-      elapsed < min_load_interval_) {
-    return process_.prev_load_;
-  }
-#ifdef WIN32
-  FILETIME current_file_time;
-  ::GetSystemTimeAsFileTime(&current_file_time);
-
-  FILETIME create_time, exit_time, kernel_time, user_time;
-  if (!::GetProcessTimes(::GetCurrentProcess(),
-                         &create_time, &exit_time, &kernel_time, &user_time)) {
-    LOG(LS_ERROR) << "::GetProcessTimes() failed: " << ::GetLastError();
-    return 0.f;
-  }
-
-  const uint64 total_times =
-      ToUInt64(current_file_time) - ToUInt64(create_time);
-  const uint64 cpu_times =
-      (ToUInt64(kernel_time) + ToUInt64(user_time));
-#endif  // WIN32
-
-#ifdef POSIX
-  // Common to both OSX and Linux.
-  struct timeval tv;
-  gettimeofday(&tv, NULL);
-  const uint64 total_times = tv.tv_sec * kNumMicrosecsPerSec + tv.tv_usec;
-#endif
-
-#if defined(IOS) || defined(OSX)
-  // Get live thread usage.
-  task_thread_times_info task_times_info;
-  mach_msg_type_number_t info_count = TASK_THREAD_TIMES_INFO_COUNT;
-
-  if (KERN_SUCCESS != task_info(mach_task_self(), TASK_THREAD_TIMES_INFO,
-                                reinterpret_cast<task_info_t>(&task_times_info),
-                                &info_count)) {
-    LOG(LS_ERROR) << "::task_info(TASK_THREAD_TIMES_INFO) failed";
-    return 0.f;
-  }
-
-  // Get terminated thread usage.
-  task_basic_info task_term_info;
-  info_count = TASK_BASIC_INFO_COUNT;
-  if (KERN_SUCCESS != task_info(mach_task_self(), TASK_BASIC_INFO,
-                                reinterpret_cast<task_info_t>(&task_term_info),
-                                &info_count)) {
-    LOG(LS_ERROR) << "::task_info(TASK_BASIC_INFO) failed";
-    return 0.f;
-  }
-
-  const uint64 cpu_times = (TimeValueTToInt64(task_times_info.user_time) +
-      TimeValueTToInt64(task_times_info.system_time) +
-      TimeValueTToInt64(task_term_info.user_time) +
-      TimeValueTToInt64(task_term_info.system_time));
-#endif  // defined(IOS) || defined(OSX)
-
-#if defined(LINUX) || defined(ANDROID)
-  rusage usage;
-  if (getrusage(RUSAGE_SELF, &usage) < 0) {
-    LOG_ERR(LS_ERROR) << "getrusage failed";
-    return 0.f;
-  }
-
-  const uint64 cpu_times =
-      (usage.ru_utime.tv_sec + usage.ru_stime.tv_sec) * kNumMicrosecsPerSec +
-      usage.ru_utime.tv_usec + usage.ru_stime.tv_usec;
-#endif  // defined(LINUX) || defined(ANDROID)
-  process_.prev_load_time_ = timenow;
-  process_.prev_load_ = UpdateCpuLoad(total_times,
-                                     cpu_times,
-                                     &process_.prev_total_times_,
-                                     &process_.prev_cpu_times_);
-  return process_.prev_load_;
-}
-
-int CpuSampler::GetMaxCpus() const {
-  return cpus_;
-}
-
-int CpuSampler::GetCurrentCpus() {
-  return sysinfo_->GetCurCpus();
-}
-
-///////////////////////////////////////////////////////////////////
-// Implementation of class CpuMonitor.
-CpuMonitor::CpuMonitor(Thread* thread)
-    : monitor_thread_(thread ? thread : Thread::Current()) {
-  monitor_thread_->SignalQueueDestroyed.connect(
-      this, &CpuMonitor::OnMessageQueueDestroyed);
-}
-
-CpuMonitor::~CpuMonitor() {
-  Stop();
-}
-
-bool CpuMonitor::Start(int period_ms) {
-  if (!sampler_.Init()) return false;
-
-  period_ms_ = period_ms;
-  if (monitor_thread_) {
-    monitor_thread_->PostDelayed(period_ms_, this);
-  }
-  return true;
-}
-
-void CpuMonitor::Stop() {
-  if (monitor_thread_) {
-    monitor_thread_->Clear(this);
-  }
-}
-
-void CpuMonitor::OnMessage(Message* msg) {
-  int max_cpus = sampler_.GetMaxCpus();
-  int current_cpus = sampler_.GetCurrentCpus();
-  float process_load = sampler_.GetProcessLoad();
-  float system_load = sampler_.GetSystemLoad();
-  SignalUpdate(current_cpus, max_cpus, process_load, system_load);
-
-  if (monitor_thread_) {
-    monitor_thread_->PostDelayed(period_ms_, this);
-  }
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/cpumonitor.h b/third_party/libjingle/source/talk/base/cpumonitor.h
deleted file mode 100644
index f633f50..0000000
--- a/third_party/libjingle/source/talk/base/cpumonitor.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * libjingle
- * Copyright 2010 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_CPUMONITOR_H_
-#define TALK_BASE_CPUMONITOR_H_
-
-#include "talk/base/basictypes.h"
-#include "talk/base/messagehandler.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/sigslot.h"
-#if defined(LINUX) || defined(ANDROID)
-#include "talk/base/stream.h"
-#endif // defined(LINUX) || defined(ANDROID)
-
-namespace talk_base {
-class Thread;
-class SystemInfo;
-
-struct CpuStats {
-  CpuStats()
-      : prev_total_times_(0),
-        prev_cpu_times_(0),
-        prev_load_(0.f),
-        prev_load_time_(0u) {
-  }
-
-  uint64 prev_total_times_;
-  uint64 prev_cpu_times_;
-  float prev_load_;  // Previous load value.
-  uint32 prev_load_time_;  // Time previous load value was taken.
-};
-
-// CpuSampler samples the process and system load.
-class CpuSampler {
- public:
-  CpuSampler();
-  ~CpuSampler();
-
-  // Initialize CpuSampler.  Returns true if successful.
-  bool Init();
-
-  // Set minimum interval in ms between computing new load values.
-  // Default 950 ms.  Set to 0 to disable interval.
-  void set_load_interval(int min_load_interval);
-
-  // Return CPU load of current process as a float from 0 to 1.
-  float GetProcessLoad();
-
-  // Return CPU load of current process as a float from 0 to 1.
-  float GetSystemLoad();
-
-  // Return number of cpus. Includes hyperthreads.
-  int GetMaxCpus() const;
-
-  // Return current number of cpus available to this process.
-  int GetCurrentCpus();
-
-  // For testing. Allows forcing of fallback to using NTDLL functions.
-  void set_force_fallback(bool fallback) {
-#ifdef WIN32
-    force_fallback_ = fallback;
-#endif
-  }
-
- private:
-  float UpdateCpuLoad(uint64 current_total_times,
-                      uint64 current_cpu_times,
-                      uint64 *prev_total_times,
-                      uint64 *prev_cpu_times);
-  CpuStats process_;
-  CpuStats system_;
-  int cpus_;
-  int min_load_interval_;  // Minimum time between computing new load.
-  scoped_ptr<SystemInfo> sysinfo_;
-#ifdef WIN32
-  void* get_system_times_;
-  void* nt_query_system_information_;
-  bool force_fallback_;
-#endif
-#if defined(LINUX) || defined(ANDROID)
-  // File for reading /proc/stat
-  scoped_ptr<FileStream> sfile_;
-#endif // defined(LINUX) || defined(ANDROID)
-};
-
-// CpuMonitor samples and signals the CPU load periodically.
-class CpuMonitor
-    : public talk_base::MessageHandler, public sigslot::has_slots<> {
- public:
-  explicit CpuMonitor(Thread* thread);
-  virtual ~CpuMonitor();
-
-  bool Start(int period_ms);
-  void Stop();
-  // Signal parameters are current cpus, max cpus, process load and system load.
-  sigslot::signal4<int, int, float, float> SignalUpdate;
-
- protected:
-  // Override virtual method of parent MessageHandler.
-  virtual void OnMessage(talk_base::Message* msg);
-  // Clear the monitor thread and stop sending it messages if the thread goes
-  // away before our lifetime.
-  void OnMessageQueueDestroyed() { monitor_thread_ = NULL; }
-
- private:
-  Thread* monitor_thread_;
-  CpuSampler sampler_;
-  int period_ms_;
-
-  DISALLOW_COPY_AND_ASSIGN(CpuMonitor);
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_CPUMONITOR_H_
diff --git a/third_party/libjingle/source/talk/base/cpumonitor_unittest.cc b/third_party/libjingle/source/talk/base/cpumonitor_unittest.cc
deleted file mode 100644
index e83c969..0000000
--- a/third_party/libjingle/source/talk/base/cpumonitor_unittest.cc
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * libjingle
- * Copyright 2010 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <iomanip>
-#include <iostream>
-#include <vector>
-
-#ifdef WIN32
-#include "talk/base/win32.h"
-#endif
-
-#include "talk/base/cpumonitor.h"
-#include "talk/base/flags.h"
-#include "talk/base/gunit.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/thread.h"
-#include "talk/base/timeutils.h"
-#include "talk/base/timing.h"
-
-namespace talk_base {
-
-static const int kMaxCpus = 1024;
-static const int kSettleTime = 100;  // Amount of time to between tests.
-static const int kIdleTime = 500;  // Amount of time to be idle in ms.
-static const int kBusyTime = 1000;  // Amount of time to be busy in ms.
-
-class BusyThread : public talk_base::Thread {
- public:
-  BusyThread(double load, double duration, double interval) :
-    load_(load), duration_(duration), interval_(interval) {
-  }
-  void Run() {
-    Timing time;
-    double busy_time = interval_ * load_ / 100.0;
-    for (;;) {
-      time.BusyWait(busy_time);
-      time.IdleWait(interval_ - busy_time);
-      if (duration_) {
-        duration_ -= interval_;
-        if (duration_ <= 0) {
-          break;
-        }
-      }
-    }
-  }
- private:
-  double load_;
-  double duration_;
-  double interval_;
-};
-
-class CpuLoadListener : public sigslot::has_slots<> {
- public:
-  CpuLoadListener()
-      : current_cpus_(0),
-        cpus_(0),
-        process_load_(.0f),
-        system_load_(.0f),
-        count_(0) {
-  }
-
-  void OnCpuLoad(int current_cpus, int cpus, float proc_load, float sys_load) {
-    current_cpus_ = current_cpus;
-    cpus_ = cpus;
-    process_load_ = proc_load;
-    system_load_ = sys_load;
-    ++count_;
-  }
-
-  int current_cpus() const { return current_cpus_; }
-  int cpus() const { return cpus_; }
-  float process_load() const { return process_load_; }
-  float system_load() const { return system_load_; }
-  int count() const { return count_; }
-
- private:
-  int current_cpus_;
-  int cpus_;
-  float process_load_;
-  float system_load_;
-  int count_;
-};
-
-// Set affinity (which cpu to run on), but respecting FLAG_affinity:
-// -1 means no affinity - run on whatever cpu is available.
-// 0 .. N means run on specific cpu.  The tool will create N threads and call
-//   SetThreadAffinity on 0 to N - 1 as cpu.  FLAG_affinity sets the first cpu
-//   so the range becomes affinity to affinity + N - 1
-// Note that this function affects Windows scheduling, effectively giving
-//   the thread with affinity for a specified CPU more priority on that CPU.
-bool SetThreadAffinity(BusyThread* t, int cpu, int affinity) {
-#ifdef WIN32
-  if (affinity >= 0) {
-    return ::SetThreadAffinityMask(t->GetHandle(),
-        1 << (cpu + affinity)) != FALSE;
-  }
-#endif
-  return true;
-}
-
-bool SetThreadPriority(BusyThread* t, int prio) {
-  if (!prio) {
-    return true;
-  }
-  bool ok = t->SetPriority(static_cast<talk_base::ThreadPriority>(prio));
-  if (!ok) {
-    std::cout << "Error setting thread priority." << std::endl;
-  }
-  return ok;
-}
-
-int CpuLoad(double cpuload, double duration, int numthreads,
-            int priority, double interval, int affinity) {
-  int ret = 0;
-  std::vector<BusyThread*> threads;
-  for (int i = 0; i < numthreads; ++i) {
-    threads.push_back(new BusyThread(cpuload, duration, interval));
-    // NOTE(fbarchard): Priority must be done before Start.
-    if (!SetThreadPriority(threads[i], priority) ||
-       !threads[i]->Start() ||
-       !SetThreadAffinity(threads[i], i, affinity)) {
-      ret = 1;
-      break;
-    }
-  }
-  // Wait on each thread
-  if (ret == 0) {
-    for (int i = 0; i < numthreads; ++i) {
-      threads[i]->Stop();
-    }
-  }
-
-  for (int i = 0; i < numthreads; ++i) {
-    delete threads[i];
-  }
-  return ret;
-}
-
-// Make 2 CPUs busy
-static void CpuTwoBusyLoop(int busytime) {
-  CpuLoad(100.0, busytime / 1000.0, 2, 1, 0.050, -1);
-}
-
-// Make 1 CPUs busy
-static void CpuBusyLoop(int busytime) {
-  CpuLoad(100.0, busytime / 1000.0, 1, 1, 0.050, -1);
-}
-
-// Make 1 use half CPU time.
-static void CpuHalfBusyLoop(int busytime) {
-  CpuLoad(50.0, busytime / 1000.0, 1, 1, 0.050, -1);
-}
-
-void TestCpuSampler(bool test_proc, bool test_sys, bool force_fallback) {
-  CpuSampler sampler;
-  sampler.set_force_fallback(force_fallback);
-  EXPECT_TRUE(sampler.Init());
-  sampler.set_load_interval(100);
-  int cpus = sampler.GetMaxCpus();
-
-  // Test1: CpuSampler under idle situation.
-  Thread::SleepMs(kSettleTime);
-  sampler.GetProcessLoad();
-  sampler.GetSystemLoad();
-
-  Thread::SleepMs(kIdleTime);
-
-  float proc_idle = 0.f, sys_idle = 0.f;
-  if (test_proc) {
-    proc_idle = sampler.GetProcessLoad();
-  }
-  if (test_sys) {
-      sys_idle = sampler.GetSystemLoad();
-  }
-  if (test_proc) {
-    LOG(LS_INFO) << "ProcessLoad Idle:      "
-                 << setiosflags(std::ios_base::fixed)
-                 << std::setprecision(2) << std::setw(6) << proc_idle;
-    EXPECT_GE(proc_idle, 0.f);
-    EXPECT_LE(proc_idle, static_cast<float>(cpus));
-  }
-  if (test_sys) {
-    LOG(LS_INFO) << "SystemLoad Idle:       "
-                 << setiosflags(std::ios_base::fixed)
-                 << std::setprecision(2) << std::setw(6) << sys_idle;
-    EXPECT_GE(sys_idle, 0.f);
-    EXPECT_LE(sys_idle, static_cast<float>(cpus));
-  }
-
-  // Test2: CpuSampler with main process at 50% busy.
-  Thread::SleepMs(kSettleTime);
-  sampler.GetProcessLoad();
-  sampler.GetSystemLoad();
-
-  CpuHalfBusyLoop(kBusyTime);
-
-  float proc_halfbusy = 0.f, sys_halfbusy = 0.f;
-  if (test_proc) {
-    proc_halfbusy = sampler.GetProcessLoad();
-  }
-  if (test_sys) {
-    sys_halfbusy = sampler.GetSystemLoad();
-  }
-  if (test_proc) {
-    LOG(LS_INFO) << "ProcessLoad Halfbusy:  "
-                 << setiosflags(std::ios_base::fixed)
-                 << std::setprecision(2) << std::setw(6) << proc_halfbusy;
-    EXPECT_GE(proc_halfbusy, 0.f);
-    EXPECT_LE(proc_halfbusy, static_cast<float>(cpus));
-  }
-  if (test_sys) {
-    LOG(LS_INFO) << "SystemLoad Halfbusy:   "
-                 << setiosflags(std::ios_base::fixed)
-                 << std::setprecision(2) << std::setw(6) << sys_halfbusy;
-    EXPECT_GE(sys_halfbusy, 0.f);
-    EXPECT_LE(sys_halfbusy, static_cast<float>(cpus));
-  }
-
-  // Test3: CpuSampler with main process busy.
-  Thread::SleepMs(kSettleTime);
-  sampler.GetProcessLoad();
-  sampler.GetSystemLoad();
-
-  CpuBusyLoop(kBusyTime);
-
-  float proc_busy = 0.f, sys_busy = 0.f;
-  if (test_proc) {
-    proc_busy = sampler.GetProcessLoad();
-  }
-  if (test_sys) {
-    sys_busy = sampler.GetSystemLoad();
-  }
-  if (test_proc) {
-    LOG(LS_INFO) << "ProcessLoad Busy:      "
-                 << setiosflags(std::ios_base::fixed)
-                 << std::setprecision(2) << std::setw(6) << proc_busy;
-    EXPECT_GE(proc_busy, 0.f);
-    EXPECT_LE(proc_busy, static_cast<float>(cpus));
-  }
-  if (test_sys) {
-    LOG(LS_INFO) << "SystemLoad Busy:       "
-                 << setiosflags(std::ios_base::fixed)
-                 << std::setprecision(2) << std::setw(6) << sys_busy;
-    EXPECT_GE(sys_busy, 0.f);
-    EXPECT_LE(sys_busy, static_cast<float>(cpus));
-  }
-
-  // Test4: CpuSampler with 2 cpus process busy.
-  if (cpus >= 2) {
-    Thread::SleepMs(kSettleTime);
-    sampler.GetProcessLoad();
-    sampler.GetSystemLoad();
-
-    CpuTwoBusyLoop(kBusyTime);
-
-    float proc_twobusy = 0.f, sys_twobusy = 0.f;
-    if (test_proc) {
-      proc_twobusy = sampler.GetProcessLoad();
-    }
-    if (test_sys) {
-      sys_twobusy = sampler.GetSystemLoad();
-    }
-    if (test_proc) {
-      LOG(LS_INFO) << "ProcessLoad 2 CPU Busy:"
-                   << setiosflags(std::ios_base::fixed)
-                   << std::setprecision(2) << std::setw(6) << proc_twobusy;
-      EXPECT_GE(proc_twobusy, 0.f);
-      EXPECT_LE(proc_twobusy, static_cast<float>(cpus));
-    }
-    if (test_sys) {
-      LOG(LS_INFO) << "SystemLoad 2 CPU Busy: "
-                   << setiosflags(std::ios_base::fixed)
-                   << std::setprecision(2) << std::setw(6) << sys_twobusy;
-      EXPECT_GE(sys_twobusy, 0.f);
-      EXPECT_LE(sys_twobusy, static_cast<float>(cpus));
-    }
-  }
-
-  // Test5: CpuSampler with idle process after being busy.
-  Thread::SleepMs(kSettleTime);
-  sampler.GetProcessLoad();
-  sampler.GetSystemLoad();
-
-  Thread::SleepMs(kIdleTime);
-
-  if (test_proc) {
-    proc_idle = sampler.GetProcessLoad();
-  }
-  if (test_sys) {
-    sys_idle = sampler.GetSystemLoad();
-  }
-  if (test_proc) {
-    LOG(LS_INFO) << "ProcessLoad Idle:      "
-                 << setiosflags(std::ios_base::fixed)
-                 << std::setprecision(2) << std::setw(6) << proc_idle;
-    EXPECT_GE(proc_idle, 0.f);
-    EXPECT_LE(proc_idle, proc_busy);
-  }
-  if (test_sys) {
-    LOG(LS_INFO) << "SystemLoad Idle:       "
-                 << setiosflags(std::ios_base::fixed)
-                 << std::setprecision(2) << std::setw(6) << sys_idle;
-    EXPECT_GE(sys_idle, 0.f);
-    EXPECT_LE(sys_idle, static_cast<float>(cpus));
-  }
-}
-
-TEST(CpuMonitorTest, TestCpus) {
-  CpuSampler sampler;
-  EXPECT_TRUE(sampler.Init());
-  int current_cpus = sampler.GetCurrentCpus();
-  int cpus = sampler.GetMaxCpus();
-  LOG(LS_INFO) << "Current Cpus:     " << std::setw(9) << current_cpus;
-  LOG(LS_INFO) << "Maximum Cpus:     " << std::setw(9) << cpus;
-  EXPECT_GT(cpus, 0);
-  EXPECT_LE(cpus, kMaxCpus);
-  EXPECT_GT(current_cpus, 0);
-  EXPECT_LE(current_cpus, cpus);
-}
-
-#ifdef WIN32
-// Tests overall system CpuSampler using legacy OS fallback code if applicable.
-TEST(CpuMonitorTest, TestGetSystemLoadForceFallback) {
-  TestCpuSampler(false, true, true);
-}
-#endif
-
-// Tests both process and system functions in use at same time.
-TEST(CpuMonitorTest, TestGetBothLoad) {
-  TestCpuSampler(true, true, false);
-}
-
-// Tests a query less than the interval produces the same value.
-TEST(CpuMonitorTest, TestInterval) {
-  CpuSampler sampler;
-  EXPECT_TRUE(sampler.Init());
-
-  // Test1: Interval of 500 ms
-  sampler.set_load_interval(500);
-
-  sampler.GetProcessLoad();
-  sampler.GetSystemLoad();
-
-  float proc_orig = sampler.GetProcessLoad();
-  float sys_orig = sampler.GetSystemLoad();
-
-  CpuBusyLoop(200);
-
-  float proc_halftime = sampler.GetProcessLoad();
-  float sys_halftime = sampler.GetSystemLoad();
-
-  EXPECT_EQ(proc_orig, proc_halftime);
-  EXPECT_EQ(sys_orig, sys_halftime);
-}
-
-TEST(CpuMonitorTest, TestCpuMonitor) {
-  CpuMonitor monitor(Thread::Current());
-  CpuLoadListener listener;
-  monitor.SignalUpdate.connect(&listener, &CpuLoadListener::OnCpuLoad);
-  EXPECT_TRUE(monitor.Start(10));
-  Thread::Current()->ProcessMessages(50);
-  EXPECT_GT(listener.count(), 2);  // We have checked cpu load more than twice.
-  EXPECT_GT(listener.current_cpus(), 0);
-  EXPECT_GT(listener.cpus(), 0);
-  EXPECT_GE(listener.process_load(), .0f);
-  EXPECT_GE(listener.system_load(), .0f);
-
-  monitor.Stop();
-  // Wait 20 ms to ake sure all signals are delivered.
-  Thread::Current()->ProcessMessages(20);
-  int old_count = listener.count();
-  Thread::Current()->ProcessMessages(20);
-  // Verfy no more siganls.
-  EXPECT_EQ(old_count, listener.count());
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/criticalsection.h b/third_party/libjingle/source/talk/base/criticalsection.h
deleted file mode 100644
index 5a09a93..0000000
--- a/third_party/libjingle/source/talk/base/criticalsection.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice, 
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products 
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_CRITICALSECTION_H__
-#define TALK_BASE_CRITICALSECTION_H__
-
-#ifdef WIN32
-#include "talk/base/win32.h"
-#endif
-
-#ifdef POSIX
-#include <pthread.h>
-#endif
-
-#ifdef _DEBUG
-#define CS_TRACK_OWNER 1
-#endif  // _DEBUG
-
-#if CS_TRACK_OWNER
-#define TRACK_OWNER(x) x
-#else  // !CS_TRACK_OWNER
-#define TRACK_OWNER(x)
-#endif  // !CS_TRACK_OWNER
-
-namespace talk_base {
-
-#ifdef WIN32
-class CriticalSection {
-public:
-  CriticalSection() {
-    InitializeCriticalSection(&crit_);
-    // Windows docs say 0 is not a valid thread id
-    TRACK_OWNER(thread_ = 0);
-  }
-  ~CriticalSection() {
-    DeleteCriticalSection(&crit_);
-  }
-  void Enter() {
-    EnterCriticalSection(&crit_);
-    TRACK_OWNER(thread_ = GetCurrentThreadId());
-  }
-  bool TryEnter() {
-    if (TryEnterCriticalSection(&crit_) != FALSE) {
-      TRACK_OWNER(thread_ = GetCurrentThreadId());
-      return true;
-    }
-    return false;
-  }
-  void Leave() {
-    TRACK_OWNER(thread_ = 0);
-    LeaveCriticalSection(&crit_);
-  }
-
-#if CS_TRACK_OWNER
-  bool CurrentThreadIsOwner() const { return thread_ == GetCurrentThreadId(); }
-#endif  // CS_TRACK_OWNER
-
-private:
-  CRITICAL_SECTION crit_;
-  TRACK_OWNER(DWORD thread_);  // The section's owning thread id
-};
-#endif // WIN32
-
-#ifdef POSIX
-class CriticalSection {
-public:
-  CriticalSection() {
-    pthread_mutexattr_t mutex_attribute;
-    pthread_mutexattr_init(&mutex_attribute);
-    pthread_mutexattr_settype(&mutex_attribute, PTHREAD_MUTEX_RECURSIVE);
-    pthread_mutex_init(&mutex_, &mutex_attribute);
-    pthread_mutexattr_destroy(&mutex_attribute);
-    TRACK_OWNER(thread_ = 0);
-  }
-  ~CriticalSection() {
-    pthread_mutex_destroy(&mutex_);
-  }
-  void Enter() {
-    pthread_mutex_lock(&mutex_);
-    TRACK_OWNER(thread_ = pthread_self());
-  }
-  bool TryEnter() {
-    if (pthread_mutex_trylock(&mutex_) == 0) {
-      TRACK_OWNER(thread_ = pthread_self());
-      return true;
-    }
-    return false;
-  }
-  void Leave() {
-    TRACK_OWNER(thread_ = 0);
-    pthread_mutex_unlock(&mutex_);
-  }
-
-#if CS_TRACK_OWNER
-  bool CurrentThreadIsOwner() const { return pthread_equal(thread_, pthread_self()); }
-#endif  // CS_TRACK_OWNER
-
-private:
-  pthread_mutex_t mutex_;
-  TRACK_OWNER(pthread_t thread_);
-};
-#endif // POSIX
-
-// CritScope, for serializing exection through a scope
-
-class CritScope {
-public:
-  CritScope(CriticalSection *pcrit) {
-    pcrit_ = pcrit;
-    pcrit_->Enter();
-  }
-  ~CritScope() {
-    pcrit_->Leave();
-  }
-private:
-  CriticalSection *pcrit_;
-};
-
-// TODO: Replace with platform-specific "atomic" ops.
-// Something like: google3/base/atomicops.h TODO: And, move
-// it to atomicops.h, which can't be done easily because of complex
-// compile rules.
-class AtomicOps {
- public:
-#ifdef WIN32
-  // Assumes sizeof(int) == sizeof(LONG), which it is on Win32 and Win64.
-  static int Increment(int* i) {
-    return ::InterlockedIncrement(reinterpret_cast<LONG*>(i));
-  }
-  static int Decrement(int* i) {
-    return ::InterlockedDecrement(reinterpret_cast<LONG*>(i));
-  }
-#else
-  static int Increment(int* i) {
-    // Could be faster, and less readable:
-    // static CriticalSection* crit = StaticCrit();
-    // CritScope scope(crit);
-    CritScope scope(StaticCrit());
-    return ++(*i);
-  }
-
-  static int Decrement(int* i) {
-    // Could be faster, and less readable:
-    // static CriticalSection* crit = StaticCrit();
-    // CritScope scope(crit);
-    CritScope scope(StaticCrit());
-    return --(*i);
-  }
-
- private:
-  static CriticalSection* StaticCrit() {
-    static CriticalSection* crit = new CriticalSection();
-    return crit;
-  }
-#endif
-};
-
-} // namespace talk_base
-
-#endif // TALK_BASE_CRITICALSECTION_H__
diff --git a/third_party/libjingle/source/talk/base/cryptstring.h b/third_party/libjingle/source/talk/base/cryptstring.h
deleted file mode 100644
index eb39be2..0000000
--- a/third_party/libjingle/source/talk/base/cryptstring.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice, 
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products 
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _TALK_BASE_CRYPTSTRING_H_
-#define _TALK_BASE_CRYPTSTRING_H_
-
-#include <cstring>
-#include <string>
-#include <vector>
-#include "talk/base/linked_ptr.h"
-#include "talk/base/scoped_ptr.h"
-
-namespace talk_base {
-
-class CryptStringImpl {
-public:
-  virtual ~CryptStringImpl() {}
-  virtual size_t GetLength() const = 0;
-  virtual void CopyTo(char * dest, bool nullterminate) const = 0;
-  virtual std::string UrlEncode() const = 0;
-  virtual CryptStringImpl * Copy() const = 0;
-  virtual void CopyRawTo(std::vector<unsigned char> * dest) const = 0;
-};
-
-class EmptyCryptStringImpl : public CryptStringImpl {
-public:
-  virtual ~EmptyCryptStringImpl() {}
-  virtual size_t GetLength() const { return 0; }
-  virtual void CopyTo(char * dest, bool nullterminate) const {
-    if (nullterminate) {
-      *dest = '\0';
-    }
-  }
-  virtual std::string UrlEncode() const { return ""; }
-  virtual CryptStringImpl * Copy() const { return new EmptyCryptStringImpl(); }
-  virtual void CopyRawTo(std::vector<unsigned char> * dest) const {
-    dest->clear();
-  }
-};
-
-class CryptString {
-public:
-  CryptString() : impl_(new EmptyCryptStringImpl()) {}
-  size_t GetLength() const { return impl_->GetLength(); }
-  void CopyTo(char * dest, bool nullterminate) const { impl_->CopyTo(dest, nullterminate); }
-  CryptString(const CryptString & other) : impl_(other.impl_->Copy()) {}
-  explicit CryptString(const CryptStringImpl & impl) : impl_(impl.Copy()) {}
-  CryptString & operator=(const CryptString & other) {
-    if (this != &other) {
-      impl_.reset(other.impl_->Copy());
-    }
-    return *this;
-  }
-  void Clear() { impl_.reset(new EmptyCryptStringImpl()); }
-  std::string UrlEncode() const { return impl_->UrlEncode(); }
-  void CopyRawTo(std::vector<unsigned char> * dest) const {
-    return impl_->CopyRawTo(dest);
-  }
-  
-private:
-  scoped_ptr<const CryptStringImpl> impl_;
-};
-
-
-// Used for constructing strings where a password is involved and we
-// need to ensure that we zero memory afterwards
-class FormatCryptString {
-public:
-  FormatCryptString() {
-    storage_ = new char[32];
-    capacity_ = 32;
-    length_ = 0;
-    storage_[0] = 0;
-  }
-  
-  void Append(const std::string & text) {
-    Append(text.data(), text.length());
-  }
-
-  void Append(const char * data, size_t length) {
-    EnsureStorage(length_ + length + 1);
-    memcpy(storage_ + length_, data, length);
-    length_ += length;
-    storage_[length_] = '\0';
-  }
-  
-  void Append(const CryptString * password) {
-    size_t len = password->GetLength();
-    EnsureStorage(length_ + len + 1);
-    password->CopyTo(storage_ + length_, true);
-    length_ += len;
-  }
-
-  size_t GetLength() {
-    return length_;
-  }
-
-  const char * GetData() {
-    return storage_;
-  }
-
-
-  // Ensures storage of at least n bytes
-  void EnsureStorage(size_t n) {
-    if (capacity_ >= n) {
-      return;
-    }
-
-    size_t old_capacity = capacity_;
-    char * old_storage = storage_;
-
-    for (;;) {
-      capacity_ *= 2;
-      if (capacity_ >= n)
-        break;
-    }
-
-    storage_ = new char[capacity_];
-
-    if (old_capacity) {
-      memcpy(storage_, old_storage, length_);
-    
-      // zero memory in a way that an optimizer won't optimize it out
-      old_storage[0] = 0;
-      for (size_t i = 1; i < old_capacity; i++) {
-        old_storage[i] = old_storage[i - 1];
-      }
-      delete[] old_storage;
-    }
-  }  
-
-  ~FormatCryptString() {
-    if (capacity_) {
-      storage_[0] = 0;
-      for (size_t i = 1; i < capacity_; i++) {
-        storage_[i] = storage_[i - 1];
-      }
-    }
-    delete[] storage_;
-  }
-private:
-  char * storage_;
-  size_t capacity_;
-  size_t length_;
-};
-
-class InsecureCryptStringImpl : public CryptStringImpl {
- public:
-  std::string& password() { return password_; }
-  const std::string& password() const { return password_; }
-
-  virtual ~InsecureCryptStringImpl() {}
-  virtual size_t GetLength() const { return password_.size(); }
-  virtual void CopyTo(char * dest, bool nullterminate) const {
-    memcpy(dest, password_.data(), password_.size());
-    if (nullterminate) dest[password_.size()] = 0;
-  }
-  virtual std::string UrlEncode() const { return password_; }
-  virtual CryptStringImpl * Copy() const {
-    InsecureCryptStringImpl * copy = new InsecureCryptStringImpl;
-    copy->password() = password_;
-    return copy;
-  }
-  virtual void CopyRawTo(std::vector<unsigned char> * dest) const {
-    dest->resize(password_.size());
-    memcpy(&dest->front(), password_.data(), password_.size());
-  }
- private:
-  std::string password_;
-};
-
-}
-
-#endif  // _TALK_BASE_CRYPTSTRING_H_
diff --git a/third_party/libjingle/source/talk/base/diskcache.cc b/third_party/libjingle/source/talk/base/diskcache.cc
deleted file mode 100644
index afaf9d2..0000000
--- a/third_party/libjingle/source/talk/base/diskcache.cc
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <time.h>
-
-#ifdef WIN32
-#include "talk/base/win32.h"
-#endif
-
-#include "talk/base/common.h"
-#include "talk/base/diskcache.h"
-#include "talk/base/fileutils.h"
-#include "talk/base/pathutils.h"
-#include "talk/base/stream.h"
-#include "talk/base/stringencode.h"
-#include "talk/base/stringutils.h"
-
-#ifdef _DEBUG
-#define TRANSPARENT_CACHE_NAMES 1
-#else  // !_DEBUG
-#define TRANSPARENT_CACHE_NAMES 0
-#endif  // !_DEBUG
-
-namespace talk_base {
-
-class DiskCache;
-
-///////////////////////////////////////////////////////////////////////////////
-// DiskCacheAdapter
-///////////////////////////////////////////////////////////////////////////////
-
-class DiskCacheAdapter : public StreamAdapterInterface {
-public:
-  DiskCacheAdapter(const DiskCache* cache, const std::string& id, size_t index,
-                   StreamInterface* stream)
-  : StreamAdapterInterface(stream), cache_(cache), id_(id), index_(index)
-  { }
-  virtual ~DiskCacheAdapter() {
-    Close();
-    cache_->ReleaseResource(id_, index_);
-  }
-
-private:
-  const DiskCache* cache_;
-  std::string id_;
-  size_t index_;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// DiskCache
-///////////////////////////////////////////////////////////////////////////////
-
-DiskCache::DiskCache() : max_cache_(0), total_size_(0), total_accessors_(0) {
-}
-
-DiskCache::~DiskCache() {
-  ASSERT(0 == total_accessors_);
-}
-
-bool DiskCache::Initialize(const std::string& folder, size_t size) {
-  if (!folder_.empty() || !Filesystem::CreateFolder(folder))
-    return false;
-
-  folder_ = folder;
-  max_cache_ = size;
-  ASSERT(0 == total_size_);
-
-  if (!InitializeEntries())
-    return false;
-
-  return CheckLimit();
-}
-
-bool DiskCache::Purge() {
-  if (folder_.empty())
-    return false;
-
-  if (total_accessors_ > 0) {
-    LOG_F(LS_WARNING) << "Cache files open";
-    return false;
-  }
-
-  if (!PurgeFiles())
-    return false;
-
-  map_.clear();
-  return true;
-}
-
-bool DiskCache::LockResource(const std::string& id) {
-  Entry* entry = GetOrCreateEntry(id, true);
-  if (LS_LOCKED == entry->lock_state)
-    return false;
-  if ((LS_UNLOCKED == entry->lock_state) && (entry->accessors > 0))
-    return false;
-  if ((total_size_ > max_cache_) && !CheckLimit()) {
-    LOG_F(LS_WARNING) << "Cache overfull";
-    return false;
-  }
-  entry->lock_state = LS_LOCKED;
-  return true;
-}
-
-StreamInterface* DiskCache::WriteResource(const std::string& id, size_t index) {
-  Entry* entry = GetOrCreateEntry(id, false);
-  if (LS_LOCKED != entry->lock_state)
-    return NULL;
-
-  size_t previous_size = 0;
-  std::string filename(IdToFilename(id, index));
-  FileStream::GetSize(filename, &previous_size);
-  ASSERT(previous_size <= entry->size);
-  if (previous_size > entry->size) {
-    previous_size = entry->size;
-  }
-
-  scoped_ptr<FileStream> file(new FileStream);
-  if (!file->Open(filename, "wb", NULL)) {
-    LOG_F(LS_ERROR) << "Couldn't create cache file";
-    return NULL;
-  }
-
-  entry->streams = stdmax(entry->streams, index + 1);
-  entry->size -= previous_size;
-  total_size_ -= previous_size;
-
-  entry->accessors += 1;
-  total_accessors_ += 1;
-  return new DiskCacheAdapter(this, id, index, file.release());
-}
-
-bool DiskCache::UnlockResource(const std::string& id) {
-  Entry* entry = GetOrCreateEntry(id, false);
-  if (LS_LOCKED != entry->lock_state)
-    return false;
-
-  if (entry->accessors > 0) {
-    entry->lock_state = LS_UNLOCKING;
-  } else {
-    entry->lock_state = LS_UNLOCKED;
-    entry->last_modified = time(0);
-    CheckLimit();
-  }
-  return true;
-}
-
-StreamInterface* DiskCache::ReadResource(const std::string& id,
-                                         size_t index) const {
-  const Entry* entry = GetEntry(id);
-  if (LS_UNLOCKED != entry->lock_state)
-    return NULL;
-  if (index >= entry->streams)
-    return NULL;
-
-  scoped_ptr<FileStream> file(new FileStream);
-  if (!file->Open(IdToFilename(id, index), "rb", NULL))
-    return NULL;
-
-  entry->accessors += 1;
-  total_accessors_ += 1;
-  return new DiskCacheAdapter(this, id, index, file.release());
-}
-
-bool DiskCache::HasResource(const std::string& id) const {
-  const Entry* entry = GetEntry(id);
-  return (NULL != entry) && (entry->streams > 0);
-}
-
-bool DiskCache::HasResourceStream(const std::string& id, size_t index) const {
-  const Entry* entry = GetEntry(id);
-  if ((NULL == entry) || (index >= entry->streams))
-    return false;
-
-  std::string filename = IdToFilename(id, index);
-
-  return FileExists(filename);
-}
-
-bool DiskCache::DeleteResource(const std::string& id) {
-  Entry* entry = GetOrCreateEntry(id, false);
-  if (!entry)
-    return true;
-
-  if ((LS_UNLOCKED != entry->lock_state) || (entry->accessors > 0))
-    return false;
-
-  bool success = true;
-  for (size_t index = 0; index < entry->streams; ++index) {
-    std::string filename = IdToFilename(id, index);
-
-    if (!FileExists(filename))
-      continue;
-
-    if (!DeleteFile(filename)) {
-      LOG_F(LS_ERROR) << "Couldn't remove cache file: " << filename;
-      success = false;
-    }
-  }
-
-  total_size_ -= entry->size;
-  map_.erase(id);
-  return success;
-}
-
-bool DiskCache::CheckLimit() {
-#ifdef _DEBUG
-  // Temporary check to make sure everything is working correctly.
-  size_t cache_size = 0;
-  for (EntryMap::iterator it = map_.begin(); it != map_.end(); ++it) {
-    cache_size += it->second.size;
-  }
-  ASSERT(cache_size == total_size_);
-#endif  // _DEBUG
-
-  // TODO: Replace this with a non-brain-dead algorithm for clearing out the
-  // oldest resources... something that isn't O(n^2)
-  while (total_size_ > max_cache_) {
-    EntryMap::iterator oldest = map_.end();
-    for (EntryMap::iterator it = map_.begin(); it != map_.end(); ++it) {
-      if ((LS_UNLOCKED != it->second.lock_state) || (it->second.accessors > 0))
-        continue;
-      oldest = it;
-      break;
-    }
-    if (oldest == map_.end()) {
-      LOG_F(LS_WARNING) << "All resources are locked!";
-      return false;
-    }
-    for (EntryMap::iterator it = oldest++; it != map_.end(); ++it) {
-      if (it->second.last_modified < oldest->second.last_modified) {
-        oldest = it;
-      }
-    }
-    if (!DeleteResource(oldest->first)) {
-      LOG_F(LS_ERROR) << "Couldn't delete from cache!";
-      return false;
-    }
-  }
-  return true;
-}
-
-std::string DiskCache::IdToFilename(const std::string& id, size_t index) const {
-#ifdef TRANSPARENT_CACHE_NAMES
-  // This escapes colons and other filesystem characters, so the user can't open
-  // special devices (like "COM1:"), or access other directories.
-  size_t buffer_size = id.length()*3 + 1;
-  char* buffer = new char[buffer_size];
-  encode(buffer, buffer_size, id.data(), id.length(),
-         unsafe_filename_characters(), '%');
-  // TODO: ASSERT(strlen(buffer) < FileSystem::MaxBasenameLength());
-#else  // !TRANSPARENT_CACHE_NAMES
-  // We might want to just use a hash of the filename at some point, both for
-  // obfuscation, and to avoid both filename length and escaping issues.
-  ASSERT(false);
-#endif  // !TRANSPARENT_CACHE_NAMES
-
-  char extension[32];
-  sprintfn(extension, ARRAY_SIZE(extension), ".%u", index);
-
-  Pathname pathname;
-  pathname.SetFolder(folder_);
-  pathname.SetBasename(buffer);
-  pathname.SetExtension(extension);
-
-#ifdef TRANSPARENT_CACHE_NAMES
-  delete [] buffer;
-#endif  // TRANSPARENT_CACHE_NAMES
-
-  return pathname.pathname();
-}
-
-bool DiskCache::FilenameToId(const std::string& filename, std::string* id,
-                             size_t* index) const {
-  Pathname pathname(filename);
-  unsigned tempdex;
-  if (1 != sscanf(pathname.extension().c_str(), ".%u", &tempdex))
-    return false;
-
-  *index = static_cast<size_t>(tempdex);
-
-  size_t buffer_size = pathname.basename().length() + 1;
-  char* buffer = new char[buffer_size];
-  decode(buffer, buffer_size, pathname.basename().data(),
-         pathname.basename().length(), '%');
-  id->assign(buffer);
-  delete [] buffer;
-  return true;
-}
-
-DiskCache::Entry* DiskCache::GetOrCreateEntry(const std::string& id,
-                                              bool create) {
-  EntryMap::iterator it = map_.find(id);
-  if (it != map_.end())
-    return &it->second;
-  if (!create)
-    return NULL;
-  Entry e;
-  e.lock_state = LS_UNLOCKED;
-  e.accessors = 0;
-  e.size = 0;
-  e.streams = 0;
-  e.last_modified = time(0);
-  it = map_.insert(EntryMap::value_type(id, e)).first;
-  return &it->second;
-}
-
-void DiskCache::ReleaseResource(const std::string& id, size_t index) const {
-  const Entry* entry = GetEntry(id);
-  if (!entry) {
-    LOG_F(LS_WARNING) << "Missing cache entry";
-    ASSERT(false);
-    return;
-  }
-
-  entry->accessors -= 1;
-  total_accessors_ -= 1;
-
-  if (LS_UNLOCKED != entry->lock_state) {
-    // This is safe, because locked resources only issue WriteResource, which
-    // is non-const.  Think about a better way to handle it.
-    DiskCache* this2 = const_cast<DiskCache*>(this);
-    Entry* entry2 = this2->GetOrCreateEntry(id, false);
-
-    size_t new_size = 0;
-    std::string filename(IdToFilename(id, index));
-    FileStream::GetSize(filename, &new_size);
-    entry2->size += new_size;
-    this2->total_size_ += new_size;
-
-    if ((LS_UNLOCKING == entry->lock_state) && (0 == entry->accessors)) {
-      entry2->last_modified = time(0);
-      entry2->lock_state = LS_UNLOCKED;
-      this2->CheckLimit();
-    }
-  }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-} // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/diskcache.h b/third_party/libjingle/source/talk/base/diskcache.h
deleted file mode 100644
index c5a1dfc..0000000
--- a/third_party/libjingle/source/talk/base/diskcache.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2005, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_DISKCACHE_H__
-#define TALK_BASE_DISKCACHE_H__
-
-#include <map>
-#include <string>
-
-#ifdef WIN32
-#undef UnlockResource
-#endif  // WIN32
-
-namespace talk_base {
-
-class StreamInterface;
-
-///////////////////////////////////////////////////////////////////////////////
-// DiskCache - An LRU cache of streams, stored on disk.
-//
-// Streams are identified by a unique resource id.  Multiple streams can be
-// associated with each resource id, distinguished by an index.  When old
-// resources are flushed from the cache, all streams associated with those
-// resources are removed together.
-// DiskCache is designed to persist across executions of the program.  It is
-// safe for use from an arbitrary number of users on a single thread, but not
-// from multiple threads or other processes.
-///////////////////////////////////////////////////////////////////////////////
-
-class DiskCache {
-public:
-  DiskCache();
-  virtual ~DiskCache();
-
-  bool Initialize(const std::string& folder, size_t size);
-  bool Purge();
-
-  bool LockResource(const std::string& id);
-  StreamInterface* WriteResource(const std::string& id, size_t index);
-  bool UnlockResource(const std::string& id);
-
-  StreamInterface* ReadResource(const std::string& id, size_t index) const;
-
-  bool HasResource(const std::string& id) const;
-  bool HasResourceStream(const std::string& id, size_t index) const;
-  bool DeleteResource(const std::string& id);
-
- protected:
-  virtual bool InitializeEntries() = 0;
-  virtual bool PurgeFiles() = 0;
-
-  virtual bool FileExists(const std::string& filename) const = 0;
-  virtual bool DeleteFile(const std::string& filename) const = 0;
-
-  enum LockState { LS_UNLOCKED, LS_LOCKED, LS_UNLOCKING };
-  struct Entry {
-    LockState lock_state;
-    mutable size_t accessors;
-    size_t size;
-    size_t streams;
-    time_t last_modified;
-  };
-  typedef std::map<std::string, Entry> EntryMap;
-  friend class DiskCacheAdapter;
-
-  bool CheckLimit();
-
-  std::string IdToFilename(const std::string& id, size_t index) const;
-  bool FilenameToId(const std::string& filename, std::string* id,
-                    size_t* index) const;
-
-  const Entry* GetEntry(const std::string& id) const {
-    return const_cast<DiskCache*>(this)->GetOrCreateEntry(id, false);
-  }
-  Entry* GetOrCreateEntry(const std::string& id, bool create);
-
-  void ReleaseResource(const std::string& id, size_t index) const;
-
-  std::string folder_;
-  size_t max_cache_, total_size_;
-  EntryMap map_;
-  mutable size_t total_accessors_;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// CacheLock - Automatically manage locking and unlocking, with optional
-// rollback semantics
-///////////////////////////////////////////////////////////////////////////////
-
-class CacheLock {
-public:
-  CacheLock(DiskCache* cache, const std::string& id, bool rollback = false)
-  : cache_(cache), id_(id), rollback_(rollback)
-  {
-    locked_ = cache_->LockResource(id_);
-  }
-  ~CacheLock() {
-    if (locked_) {
-      cache_->UnlockResource(id_);
-      if (rollback_) {
-        cache_->DeleteResource(id_);
-      }
-    }
-  }
-  bool IsLocked() const { return locked_; }
-  void Commit() { rollback_ = false; }
-
-private:
-  DiskCache* cache_;
-  std::string id_;
-  bool rollback_, locked_;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-
-}  // namespace talk_base
-
-#endif // TALK_BASE_DISKCACHE_H__
diff --git a/third_party/libjingle/source/talk/base/event.cc b/third_party/libjingle/source/talk/base/event.cc
deleted file mode 100644
index f2fd04d..0000000
--- a/third_party/libjingle/source/talk/base/event.cc
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2008, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/event.h"
-
-#if defined(WIN32)
-#include <windows.h>
-#elif defined(POSIX)
-#include <pthread.h>
-#include <sys/time.h>
-#include <time.h>
-#else
-#error "Must define either WIN32 or POSIX."
-#endif
-
-namespace talk_base {
-
-#if defined(WIN32)
-
-Event::Event(bool manual_reset, bool initially_signaled)
-    : is_manual_reset_(manual_reset),
-      is_initially_signaled_(initially_signaled),
-      event_handle_(NULL) {
-}
-
-bool Event::EnsureInitialized() {
-  if (event_handle_ == NULL) {
-    event_handle_ = ::CreateEvent(NULL,                 // Security attributes.
-                                  is_manual_reset_,
-                                  is_initially_signaled_,
-                                  NULL);                // Name.
-  }
-
-  return (event_handle_ != NULL);
-}
-
-Event::~Event() {
-  if (event_handle_ != NULL) {
-    CloseHandle(event_handle_);
-    event_handle_ = NULL;
-  }
-}
-
-bool Event::Set() {
-  if (!EnsureInitialized())
-    return false;
-
-  SetEvent(event_handle_);
-  return true;
-}
-
-bool Event::Reset() {
-  if (!EnsureInitialized())
-    return false;
-
-  ResetEvent(event_handle_);
-  return true;
-}
-
-bool Event::Wait(int cms) {
-  DWORD ms = (cms == kForever)? INFINITE : cms;
-
-  if (!EnsureInitialized())
-    return false;
-  else
-    return (WaitForSingleObject(event_handle_, ms) == WAIT_OBJECT_0);
-}
-
-#elif defined(POSIX)
-
-Event::Event(bool manual_reset, bool initially_signaled)
-    : is_manual_reset_(manual_reset),
-      event_status_(initially_signaled),
-      event_mutex_initialized_(false),
-      event_cond_initialized_(false) {
-}
-
-bool Event::EnsureInitialized() {
-  if (!event_mutex_initialized_) {
-    if (pthread_mutex_init(&event_mutex_, NULL) == 0)
-      event_mutex_initialized_ = true;
-  }
-
-  if (!event_cond_initialized_) {
-    if (pthread_cond_init(&event_cond_, NULL) == 0)
-      event_cond_initialized_ = true;
-  }
-
-  return (event_mutex_initialized_ && event_cond_initialized_);
-}
-
-Event::~Event() {
-  if (event_mutex_initialized_) {
-    pthread_mutex_destroy(&event_mutex_);
-    event_mutex_initialized_ = false;
-  }
-
-  if (event_cond_initialized_) {
-    pthread_cond_destroy(&event_cond_);
-    event_cond_initialized_ = false;
-  }
-}
-
-bool Event::Set() {
-  if (!EnsureInitialized())
-    return false;
-
-  pthread_mutex_lock(&event_mutex_);
-  event_status_ = true;
-  pthread_cond_broadcast(&event_cond_);
-  pthread_mutex_unlock(&event_mutex_);
-  return true;
-}
-
-bool Event::Reset() {
-  if (!EnsureInitialized())
-    return false;
-
-  pthread_mutex_lock(&event_mutex_);
-  event_status_ = false;
-  pthread_mutex_unlock(&event_mutex_);
-  return true;
-}
-
-bool Event::Wait(int cms) {
-  if (!EnsureInitialized())
-    return false;
-
-  pthread_mutex_lock(&event_mutex_);
-  int error = 0;
-
-  if (cms != kForever) {
-    // Converting from seconds and microseconds (1e-6) plus
-    // milliseconds (1e-3) to seconds and nanoseconds (1e-9).
-
-    struct timeval tv;
-    gettimeofday(&tv, NULL);
-
-    struct timespec ts;
-    ts.tv_sec = tv.tv_sec + (cms / 1000);
-    ts.tv_nsec = tv.tv_usec * 1000 + (cms % 1000) * 1000000;
-
-    // Handle overflow.
-    if (ts.tv_nsec >= 1000000000) {
-      ts.tv_sec++;
-      ts.tv_nsec -= 1000000000;
-    }
-
-    while (!event_status_ && error == 0)
-      error = pthread_cond_timedwait(&event_cond_, &event_mutex_, &ts);
-  } else {
-    while (!event_status_ && error == 0)
-      error = pthread_cond_wait(&event_cond_, &event_mutex_);
-  }
-
-  // NOTE(liulk): Exactly one thread will auto-reset this event. All
-  // the other threads will think it's unsignaled.  This seems to be
-  // consistent with auto-reset events in WIN32.
-  if (error == 0 && !is_manual_reset_)
-    event_status_ = false;
-
-  pthread_mutex_unlock(&event_mutex_);
-
-  return (error == 0);
-}
-
-#endif
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/event.h b/third_party/libjingle/source/talk/base/event.h
deleted file mode 100644
index 757164c..0000000
--- a/third_party/libjingle/source/talk/base/event.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2008, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_EVENT_H__
-#define TALK_BASE_EVENT_H__
-
-#if defined(WIN32)
-#include "talk/base/win32.h"  // NOLINT: consider this a system header.
-#elif defined(POSIX)
-#include <pthread.h>
-#else
-#error "Must define either WIN32 or POSIX."
-#endif
-
-#include "talk/base/basictypes.h"
-
-namespace talk_base {
-
-class Event {
- public:
-  Event(bool manual_reset, bool initially_signaled);
-  ~Event();
-
-  bool Set();
-  bool Reset();
-  bool Wait(int cms);
-
- private:
-  bool EnsureInitialized();
-
-  bool is_manual_reset_;
-
-#if defined(WIN32)
-  bool is_initially_signaled_;
-  HANDLE event_handle_;
-#elif defined(POSIX)
-  bool event_status_;
-  bool event_mutex_initialized_;
-  pthread_mutex_t event_mutex_;
-  bool event_cond_initialized_;
-  pthread_cond_t event_cond_;
-#endif
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_EVENT_H__
diff --git a/third_party/libjingle/source/talk/base/event_unittest.cc b/third_party/libjingle/source/talk/base/event_unittest.cc
deleted file mode 100644
index 5a3c1c6..0000000
--- a/third_party/libjingle/source/talk/base/event_unittest.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/event.h"
-#include "talk/base/gunit.h"
-
-namespace talk_base {
-
-TEST(EventTest, InitiallySignaled) {
-  Event event(false, true);
-  ASSERT_TRUE(event.Wait(0));
-}
-
-TEST(EventTest, ManualReset) {
-  Event event(true, false);
-  ASSERT_FALSE(event.Wait(0));
-
-  event.Set();
-  ASSERT_TRUE(event.Wait(0));
-  ASSERT_TRUE(event.Wait(0));
-
-  event.Reset();
-  ASSERT_FALSE(event.Wait(0));
-}
-
-TEST(EventTest, AutoReset) {
-  Event event(false, false);
-  ASSERT_FALSE(event.Wait(0));
-
-  event.Set();
-  ASSERT_TRUE(event.Wait(0));
-  ASSERT_FALSE(event.Wait(0));
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/fakenetwork.h b/third_party/libjingle/source/talk/base/fakenetwork.h
deleted file mode 100644
index c5ae4b6..0000000
--- a/third_party/libjingle/source/talk/base/fakenetwork.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * libjingle
- * Copyright 2009 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_FAKENETWORK_H_
-#define TALK_BASE_FAKENETWORK_H_
-
-#include <string>
-#include <vector>
-
-#include "talk/base/network.h"
-#include "talk/base/messagehandler.h"
-#include "talk/base/socketaddress.h"
-#include "talk/base/stringencode.h"
-#include "talk/base/thread.h"
-
-namespace talk_base {
-
-// Fake network manager that allows us to manually specify the IPs to use.
-class FakeNetworkManager : public NetworkManagerBase,
-                           public MessageHandler {
- public:
-  FakeNetworkManager()
-      : thread_(Thread::Current()),
-        next_index_(0),
-        started_(false) {
-  }
-
-  void AddInterface(const SocketAddress& iface) {
-    // ensure a unique name for the interface
-    SocketAddress address("test" + talk_base::ToString(next_index_++), 0);
-    address.SetResolvedIP(iface.ipaddr());
-    ifaces_.push_back(address);
-    DoUpdateNetworks();
-  }
-
-  void RemoveInterface(const SocketAddress& iface) {
-    for (std::vector<SocketAddress>::iterator it = ifaces_.begin();
-         it != ifaces_.end(); ++it) {
-      if (it->EqualIPs(iface)) {
-        ifaces_.erase(it);
-        break;
-      }
-    }
-    DoUpdateNetworks();
-  }
-
-  virtual void StartUpdating() {
-    started_ = true;
-    thread_->Post(this);
-  }
-
-  virtual void StopUpdating() {
-    started_ = false;
-  }
-
-  // MessageHandler interface.
-  virtual void OnMessage(Message* msg) {
-    DoUpdateNetworks();
-  }
-
- private:
-  void DoUpdateNetworks() {
-    if (!started_)
-      return;
-    std::vector<Network*> networks;
-    for (std::vector<SocketAddress>::iterator it = ifaces_.begin();
-         it != ifaces_.end(); ++it) {
-      networks.push_back(new Network(it->hostname(), it->hostname(),
-                                     it->ipaddr()));
-    }
-    MergeNetworkList(networks, true);
-  }
-
-  Thread* thread_;
-  std::vector<SocketAddress> ifaces_;
-  int next_index_;
-  bool started_;
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_FAKENETWORK_H_
diff --git a/third_party/libjingle/source/talk/base/faketaskrunner.h b/third_party/libjingle/source/talk/base/faketaskrunner.h
deleted file mode 100644
index 6b5b035..0000000
--- a/third_party/libjingle/source/talk/base/faketaskrunner.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * libjingle
- * Copyright 2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// A fake TaskRunner for use in unit tests.
-
-#ifndef TALK_BASE_FAKETASKRUNNER_H_
-#define TALK_BASE_FAKETASKRUNNER_H_
-
-#include "talk/base/taskparent.h"
-#include "talk/base/taskrunner.h"
-
-namespace talk_base {
-
-class FakeTaskRunner : public TaskRunner {
- public:
-  FakeTaskRunner() : current_time_(0) {}
-  virtual ~FakeTaskRunner() {}
-
-  virtual void WakeTasks() { RunTasks(); }
-
-  virtual int64 CurrentTime() {
-    // Implement if needed.
-    return current_time_++;
-  }
-
-  int64 current_time_;
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_FAKETASKRUNNER_H_
diff --git a/third_party/libjingle/source/talk/base/filelock.cc b/third_party/libjingle/source/talk/base/filelock.cc
deleted file mode 100644
index 2bc7045..0000000
--- a/third_party/libjingle/source/talk/base/filelock.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * libjingle
- * Copyright 2009, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "talk/base/filelock.h"
-
-#include "talk/base/fileutils.h"
-#include "talk/base/logging.h"
-#include "talk/base/pathutils.h"
-#include "talk/base/stream.h"
-
-namespace talk_base {
-
-FileLock::FileLock(const std::string& path, FileStream* file)
-    : path_(path), file_(file) {
-}
-
-FileLock::~FileLock() {
-  MaybeUnlock();
-}
-
-void FileLock::Unlock() {
-  LOG_F(LS_INFO);
-  MaybeUnlock();
-}
-
-void FileLock::MaybeUnlock() {
-  if (file_.get() != NULL) {
-    LOG(LS_INFO) << "Unlocking:" << path_;
-    file_->Close();
-    Filesystem::DeleteFile(path_);
-    file_.reset();
-  }
-}
-
-FileLock* FileLock::TryLock(const std::string& path) {
-  FileStream* stream = new FileStream();
-  bool ok = false;
-#ifdef WIN32
-  // Open and lock in a single operation.
-  ok = stream->OpenShare(path, "a", _SH_DENYRW, NULL);
-#else // Linux and OSX
-  ok = stream->Open(path, "a", NULL) && stream->TryLock();
-#endif
-  if (ok) {
-    return new FileLock(path, stream);
-  } else {
-    // Something failed, either we didn't succeed to open the
-    // file or we failed to lock it. Anyway remove the heap
-    // allocated object and then return NULL to indicate failure.
-    delete stream;
-    return NULL;
-  }
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/filelock.h b/third_party/libjingle/source/talk/base/filelock.h
deleted file mode 100644
index a4936f5..0000000
--- a/third_party/libjingle/source/talk/base/filelock.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * libjingle
- * Copyright 2009, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_FILELOCK_H_
-#define TALK_BASE_FILELOCK_H_
-
-#include <string>
-
-#include "talk/base/constructormagic.h"
-#include "talk/base/scoped_ptr.h"
-
-namespace talk_base {
-
-class FileStream;
-
-// Implements a very simple cross process lock based on a file.
-// When Lock(...) is called we try to open/create the file in read/write
-// mode without any sharing. (Or locking it with flock(...) on Unix)
-// If the process crash the OS will make sure that the file descriptor
-// is released and another process can accuire the lock.
-// This doesn't work on ancient OSX/Linux versions if used on NFS.
-// (Nfs-client before: ~2.6 and Linux Kernel < 2.6.)
-class FileLock {
- public:
-  virtual ~FileLock();
-
-  // Attempts to lock the file. The caller owns the returned
-  // lock object. Returns NULL if the file already was locked.
-  static FileLock* TryLock(const std::string& path);
-  void Unlock();
-
- protected:
-  FileLock(const std::string& path, FileStream* file);
-
- private:
-  void MaybeUnlock();
-
-  std::string path_;
-  scoped_ptr<FileStream> file_;
-
-  DISALLOW_EVIL_CONSTRUCTORS(FileLock);
-};
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_FILELOCK_H_
diff --git a/third_party/libjingle/source/talk/base/filelock_unittest.cc b/third_party/libjingle/source/talk/base/filelock_unittest.cc
deleted file mode 100644
index e585f91..0000000
--- a/third_party/libjingle/source/talk/base/filelock_unittest.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * libjingle
- * Copyright 2009, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string>
-
-#include "talk/base/event.h"
-#include "talk/base/filelock.h"
-#include "talk/base/fileutils.h"
-#include "talk/base/gunit.h"
-#include "talk/base/pathutils.h"
-#include "talk/base/scoped_ptr.h"
-#include "talk/base/thread.h"
-
-namespace talk_base {
-
-const static std::string kLockFile = "TestLockFile";
-const static int kTimeoutMS = 5000;
-
-class FileLockTest : public testing::Test, public Runnable {
- public:
-  FileLockTest() : done_(false, false), thread_lock_failed_(false) {
-  }
-
-  virtual void Run(Thread* t) {
-    scoped_ptr<FileLock> lock(FileLock::TryLock(temp_file_.pathname()));
-    // The lock is already owned by the main thread of
-    // this test, therefore the TryLock(...) call should fail.
-    thread_lock_failed_ = lock.get() == NULL;
-    done_.Set();
-  }
-
- protected:
-  virtual void SetUp() {
-    thread_lock_failed_ = false;
-    Filesystem::GetAppTempFolder(&temp_dir_);
-    temp_file_ = Pathname(temp_dir_.pathname(), kLockFile);
-  }
-
-  void LockOnThread() {
-    locker_.Start(this);
-    done_.Wait(kTimeoutMS);
-  }
-
-  Event done_;
-  Thread locker_;
-  bool thread_lock_failed_;
-  Pathname temp_dir_;
-  Pathname temp_file_;
-};
-
-TEST_F(FileLockTest, TestLockFileDeleted) {
-  scoped_ptr<FileLock> lock(FileLock::TryLock(temp_file_.pathname()));
-  EXPECT_TRUE(lock.get() != NULL);
-  EXPECT_FALSE(Filesystem::IsAbsent(temp_file_.pathname()));
-  lock->Unlock();
-  EXPECT_TRUE(Filesystem::IsAbsent(temp_file_.pathname()));
-}
-
-TEST_F(FileLockTest, TestLock) {
-  scoped_ptr<FileLock> lock(FileLock::TryLock(temp_file_.pathname()));
-  EXPECT_TRUE(lock.get() != NULL);
-}
-
-TEST_F(FileLockTest, TestLockX2) {
-  scoped_ptr<FileLock> lock1(FileLock::TryLock(temp_file_.pathname()));
-  EXPECT_TRUE(lock1.get() != NULL);
-
-  scoped_ptr<FileLock> lock2(FileLock::TryLock(temp_file_.pathname()));
-  EXPECT_TRUE(lock2.get() == NULL);
-}
-
-TEST_F(FileLockTest, TestThreadedLock) {
-  scoped_ptr<FileLock> lock(FileLock::TryLock(temp_file_.pathname()));
-  EXPECT_TRUE(lock.get() != NULL);
-
-  LockOnThread();
-  EXPECT_TRUE(thread_lock_failed_);
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/fileutils.cc b/third_party/libjingle/source/talk/base/fileutils.cc
deleted file mode 100644
index 7b0d348..0000000
--- a/third_party/libjingle/source/talk/base/fileutils.cc
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2006, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <cassert>
-
-#ifdef WIN32
-#include "talk/base/win32.h"
-#endif
-
-#include "talk/base/pathutils.h"
-#include "talk/base/fileutils.h"
-#include "talk/base/stringutils.h"
-#include "talk/base/stream.h"
-
-#include "talk/base/unixfilesystem.h"
-#include "talk/base/win32filesystem.h"
-
-#ifndef WIN32
-#define MAX_PATH 260
-#endif
-
-namespace talk_base {
-
-//////////////////////////
-// Directory Iterator   //
-//////////////////////////
-
-// A DirectoryIterator is created with a given directory. It originally points
-// to the first file in the directory, and can be advanecd with Next(). This
-// allows you to get information about each file.
-
-  // Constructor
-DirectoryIterator::DirectoryIterator()
-#ifdef _WIN32
-    : handle_(INVALID_HANDLE_VALUE) {
-#else
-    : dir_(NULL), dirent_(NULL) {
-#endif
-}
-
-  // Destructor
-DirectoryIterator::~DirectoryIterator() {
-#ifdef WIN32
-  if (handle_ != INVALID_HANDLE_VALUE)
-    ::FindClose(handle_);
-#else
-  if (dir_)
-    closedir(dir_);
-#endif
-}
-
-  // Starts traversing a directory.
-  // dir is the directory to traverse
-  // returns true if the directory exists and is valid
-bool DirectoryIterator::Iterate(const Pathname &dir) {
-  directory_ = dir.pathname();
-#ifdef WIN32
-  if (handle_ != INVALID_HANDLE_VALUE)
-    ::FindClose(handle_);
-  std::string d = dir.pathname() + '*';
-  handle_ = ::FindFirstFile(ToUtf16(d).c_str(), &data_);
-  if (handle_ == INVALID_HANDLE_VALUE)
-    return false;
-#else
-  if (dir_ != NULL)
-    closedir(dir_);
-  dir_ = ::opendir(directory_.c_str());
-  if (dir_ == NULL)
-    return false;
-  dirent_ = readdir(dir_);
-  if (dirent_ == NULL)
-    return false;
-
-  if (::stat(std::string(directory_ + Name()).c_str(), &stat_) != 0)
-    return false;
-#endif
-  return true;
-}
-
-  // Advances to the next file
-  // returns true if there were more files in the directory.
-bool DirectoryIterator::Next() {
-#ifdef WIN32
-  return ::FindNextFile(handle_, &data_) == TRUE;
-#else
-  dirent_ = ::readdir(dir_);
-  if (dirent_ == NULL)
-    return false;
-
-  return ::stat(std::string(directory_ + Name()).c_str(), &stat_) == 0;
-#endif
-}
-
-  // returns true if the file currently pointed to is a directory
-bool DirectoryIterator::IsDirectory() const {
-#ifdef WIN32
-  return (data_.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != FALSE;
-#else
-  return S_ISDIR(stat_.st_mode);
-#endif
-}
-
-  // returns the name of the file currently pointed to
-std::string DirectoryIterator::Name() const {
-#ifdef WIN32
-  return ToUtf8(data_.cFileName);
-#else
-  assert(dirent_ != NULL);
-  return dirent_->d_name;
-#endif
-}
-
-  // returns the size of the file currently pointed to
-size_t DirectoryIterator::FileSize() const {
-#ifndef WIN32
-  return stat_.st_size;
-#else
-  return data_.nFileSizeLow;
-#endif
-}
-
-  // returns the last modified time of this file
-time_t DirectoryIterator::FileModifyTime() const {
-#ifdef WIN32
-  time_t val;
-  FileTimeToUnixTime(data_.ftLastWriteTime, &val);
-  return val;
-#else
-  return stat_.st_mtime;
-#endif
-}
-
-FilesystemInterface* Filesystem::default_filesystem_ = NULL;
-
-FilesystemInterface *Filesystem::EnsureDefaultFilesystem() {
-  if (!default_filesystem_) {
-#ifdef WIN32
-    default_filesystem_ = new Win32Filesystem();
-#else
-    default_filesystem_ = new UnixFilesystem();
-#endif
-  }
-  return default_filesystem_;
-}
-
-bool FilesystemInterface::CopyFolder(const Pathname &old_path,
-                                     const Pathname &new_path) {
-  bool success = true;
-  VERIFY(IsFolder(old_path));
-  Pathname new_dir;
-  new_dir.SetFolder(new_path.pathname());
-  Pathname old_dir;
-  old_dir.SetFolder(old_path.pathname());
-  if (!CreateFolder(new_dir))
-    return false;
-  DirectoryIterator *di = IterateDirectory();
-  if (!di)
-    return false;
-  if (di->Iterate(old_dir.pathname())) {
-    do {
-      if (di->Name() == "." || di->Name() == "..")
-        continue;
-      Pathname source;
-      Pathname dest;
-      source.SetFolder(old_dir.pathname());
-      dest.SetFolder(new_path.pathname());
-      source.SetFilename(di->Name());
-      dest.SetFilename(di->Name());
-      if (!CopyFileOrFolder(source, dest))
-        success = false;
-    } while (di->Next());
-  }
-  delete di;
-  return success;
-}
-
-bool FilesystemInterface::DeleteFolderContents(const Pathname &folder) {
-  bool success = true;
-  VERIFY(IsFolder(folder));
-  DirectoryIterator *di = IterateDirectory();
-  if (!di)
-    return false;
-  if (di->Iterate(folder)) {
-    do {
-      if (di->Name() == "." || di->Name() == "..")
-        continue;
-      Pathname subdir;
-      subdir.SetFolder(folder.pathname());
-      if (di->IsDirectory()) {
-        subdir.AppendFolder(di->Name());
-        if (!DeleteFolderAndContents(subdir)) {
-          success = false;
-        }
-      } else {
-        subdir.SetFilename(di->Name());
-        if (!DeleteFile(subdir)) {
-          success = false;
-        }
-      }
-    } while (di->Next());
-  }
-  delete di;
-  return success;
-}
-
-bool FilesystemInterface::CleanAppTempFolder() {
-  Pathname path;
-  if (!GetAppTempFolder(&path))
-    return false;
-  if (IsAbsent(path))
-    return true;
-  if (!IsTemporaryPath(path)) {
-    ASSERT(false);
-    return false;
-  }
-  return DeleteFolderContents(path);
-}
-
-Pathname Filesystem::GetCurrentDirectory() {
-  return EnsureDefaultFilesystem()->GetCurrentDirectory();
-}
-
-bool CreateUniqueFile(Pathname& path, bool create_empty) {
-  LOG(LS_INFO) << "Path " << path.pathname() << std::endl;
-  // If no folder is supplied, use the temporary folder
-  if (path.folder().empty()) {
-    Pathname temporary_path;
-    if (!Filesystem::GetTemporaryFolder(temporary_path, true, NULL)) {
-      printf("Get temp failed\n");
-      return false;
-    }
-    path.SetFolder(temporary_path.pathname());
-  }
-
-  // If no filename is supplied, use a temporary name
-  if (path.filename().empty()) {
-    std::string folder(path.folder());
-    std::string filename = Filesystem::TempFilename(folder, "gt");
-    path.SetPathname(filename);
-    if (!create_empty) {
-      Filesystem::DeleteFile(path.pathname());
-    }
-    return true;
-  }
-
-  // Otherwise, create a unique name based on the given filename
-  // foo.txt -> foo-N.txt
-  const std::string basename = path.basename();
-  const size_t MAX_VERSION = 100;
-  size_t version = 0;
-  while (version < MAX_VERSION) {
-    std::string pathname = path.pathname();
-
-    if (!Filesystem::IsFile(pathname)) {
-      if (create_empty) {
-        FileStream* fs = Filesystem::OpenFile(pathname, "w");
-        delete fs;
-      }
-      return true;
-    }
-    version += 1;
-    char version_base[MAX_PATH];
-    sprintfn(version_base, ARRAY_SIZE(version_base), "%s-%u",
-             basename.c_str(), version);
-    path.SetBasename(version_base);
-  }
-  return true;
-}
-
-}  // namespace talk_base
diff --git a/third_party/libjingle/source/talk/base/fileutils.h b/third_party/libjingle/source/talk/base/fileutils.h
deleted file mode 100644
index 186c963..0000000
--- a/third_party/libjingle/source/talk/base/fileutils.h
+++ /dev/null
@@ -1,457 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2006, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_FILEUTILS_H_
-#define TALK_BASE_FILEUTILS_H_
-
-#include <string>
-
-#ifdef WIN32
-#include "talk/base/win32.h"
-#else
-#include <sys/types.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#endif
-
-#include "talk/base/basictypes.h"
-#include "talk/base/common.h"
-#include "talk/base/scoped_ptr.h"
-
-namespace talk_base {
-
-class FileStream;
-class Pathname;
-
-//////////////////////////
-// Directory Iterator   //
-//////////////////////////
-
-// A DirectoryIterator is created with a given directory. It originally points
-// to the first file in the directory, and can be advanecd with Next(). This
-// allows you to get information about each file.
-
-class DirectoryIterator {
-  friend class Filesystem;
- public:
-  // Constructor
-  DirectoryIterator();
-  // Destructor
-  virtual ~DirectoryIterator();
-
-  // Starts traversing a directory
-  // dir is the directory to traverse
-  // returns true if the directory exists and is valid
-  // The iterator will point to the first entry in the directory
-  virtual bool Iterate(const Pathname &path);
-
-  // Advances to the next file
-  // returns true if there were more files in the directory.
-  virtual bool Next();
-
-  // returns true if the file currently pointed to is a directory
-  virtual bool IsDirectory() const;
-
-  // returns the name of the file currently pointed to
-  virtual std::string Name() const;
-
-  // returns the size of the file currently pointed to
-  virtual size_t FileSize() const;
-
-  // returns the last modified time of the file currently pointed to
-  virtual time_t FileModifyTime() const;
-
-  // checks whether current file is a special directory file "." or ".."
-  bool IsDots() const {
-    std::string filename(Name());
-    return (filename.compare(".") == 0) || (filename.compare("..") == 0);
-  }
-
- private:
-  std::string directory_;
-#ifdef WIN32
-  WIN32_FIND_DATA data_;
-  HANDLE handle_;
-#else
-  DIR *dir_;
-  struct dirent *dirent_;
-  struct stat stat_;
-#endif
-};
-
-enum FileTimeType { FTT_CREATED, FTT_MODIFIED, FTT_ACCESSED };
-
-class FilesystemInterface {
- public:
-  virtual ~FilesystemInterface() {}
-
-  // Returns a DirectoryIterator for a given pathname.
-  // TODO: Do fancy abstracted stuff
-  virtual DirectoryIterator *IterateDirectory() {
-    return new DirectoryIterator();
-  }
-
-  // Opens a file. Returns an open StreamInterface if function succeeds.
-  // Otherwise, returns NULL.
-  // TODO: Add an error param to indicate failure reason, similar to
-  // FileStream::Open
-  virtual FileStream *OpenFile(const Pathname &filename,
-                               const std::string &mode) = 0;
-
-  // Atomically creates an empty file accessible only to the current user if one
-  // does not already exist at the given path, otherwise fails. This is the only
-  // secure way to create a file in a shared temp directory (e.g., C:\Temp on
-  // Windows or /tmp on Linux).
-  // Note that if it is essential that a file be successfully created then the
-  // app must generate random names and retry on failure, or else it will be
-  // vulnerable to a trivial DoS.
-  virtual bool CreatePrivateFile(const Pathname &filename) = 0;
-
-  // This will attempt to delete the path located at filename.
-  // It ASSERTS and returns false if the path points to a folder or a
-  // non-existent file.
-  virtual bool DeleteFile(const Pathname &filename) = 0;
-
-  // This will attempt to delete the empty folder located at 'folder'
-  // It ASSERTS and returns false if the path points to a file or a non-existent
-  // folder. It fails normally if the folder is not empty or can otherwise
-  // not be deleted.
-  virtual bool DeleteEmptyFolder(const Pathname &folder) = 0;
-
-  // This will call IterateDirectory, to get a directory iterator, and then
-  // call DeleteFolderAndContents and DeleteFile on every path contained in this
-  // folder. If the folder is empty, this returns true.
-  virtual bool DeleteFolderContents(const Pathname &folder);
-
-  // This deletes the contents of a folder, recursively, and then deletes
-  // the folder itself.
-  virtual bool DeleteFolderAndContents(const Pathname &folder) {
-    return DeleteFolderContents(folder) && DeleteEmptyFolder(folder);
-  }
-
-  // This will delete whatever is located at path, be it a file or a folder.
-  // If it is a folder, it will delete it recursively by calling
-  // DeleteFolderAndContents
-  bool DeleteFileOrFolder(const Pathname &path) {
-    if (IsFolder(path))
-      return DeleteFolderAndContents(path);
-    else
-      return DeleteFile(path);
-  }
-
-  // Creates a directory. This will call itself recursively to create /foo/bar
-  // even if /foo does not exist. Returns true if the function succeeds.
-  virtual bool CreateFolder(const Pathname &pathname) = 0;
-
-  // This moves a file from old_path to new_path, where "old_path" is a
-  // plain file. This ASSERTs and returns false if old_path points to a
-  // directory, and returns true if the function succeeds.
-  // If the new path is on a different volume than the old path, this function
-  // will attempt to copy and, if that succeeds, delete the old path.
-  virtual bool MoveFolder(const Pathname &old_path,
-                          const Pathname &new_path) = 0;
-
-  // This moves a directory from old_path to new_path, where "old_path" is a
-  // directory. This ASSERTs and returns false if old_path points to a plain
-  // file, and returns true if the function succeeds.
-  // If the new path is on a different volume, this function will attempt to
-  // copy and if that succeeds, delete the old path.
-  virtual bool MoveFile(const Pathname &old_path, const Pathname &new_path) = 0;
-
-  // This attempts to move whatever is located at old_path to new_path,
-  // be it a file or folder.
-  bool MoveFileOrFolder(const Pathname &old_path, const Pathname &new_path) {
-    if (IsFile(old_path)) {
-      return MoveFile(old_path, new_path);
-    } else {
-      return MoveFolder(old_path, new_path);
-    }
-  }
-
-  // This copies a file from old_path to new_path. This method ASSERTs and
-  // returns false if old_path is a folder, and returns true if the copy
-  // succeeds.
-  virtual bool CopyFile(const Pathname &old_path, const Pathname &new_path) = 0;
-
-  // This copies a folder from old_path to new_path.
-  bool CopyFolder(const Pathname &old_path, const Pathname &new_path);
-
-  bool CopyFileOrFolder(const Pathname &old_path, const Pathname &new_path) {
-    if (IsFile(old_path))
-      return CopyFile(old_path, new_path);
-    else
-      return CopyFolder(old_path, new_path);
-  }
-
-  // Returns true if pathname refers to a directory
-  virtual bool IsFolder(const Pathname& pathname) = 0;
-
-  // Returns true if pathname refers to a file
-  virtual bool IsFile(const Pathname& pathname) = 0;
-
-  // Returns true if pathname refers to no filesystem object, every parent
-  // directory either exists, or is also absent.
-  virtual bool IsAbsent(const Pathname& pathname) = 0;
-
-  // Returns true if pathname represents a temporary location on the system.
-  virtual bool IsTemporaryPath(const Pathname& pathname) = 0;
-
-  // A folder appropriate for storing temporary files (Contents are
-  // automatically deleted when the program exits)
-  virtual bool GetTemporaryFolder(Pathname &path, bool create,
-                                  const std::string *append) = 0;
-
-  virtual std::string TempFilename(const Pathname &dir,
-                                   const std::string &prefix) = 0;
-
-  // Determines the size of the file indicated by path.
-  virtual bool GetFileSize(const Pathname& path, size_t* size) = 0;
-
-  // Determines a timestamp associated with the file indicated by path.
-  virtual bool GetFileTime(const Pathname& path, FileTimeType which,
-                           time_t* time) = 0;
-
-  // Returns the path to the running application.
-  // Note: This is not guaranteed to work on all platforms.  Be aware of the
-  // limitations before using it, and robustly handle failure.
-  virtual bool GetAppPathname(Pathname* path) = 0;
-
-  // Get a folder that is unique to the current application, which is suitable
-  // for sharing data between executions of the app.  If the per_user arg is
-  // true, the folder is also specific to the current user.
-  virtual bool GetAppDataFolder(Pathname* path, bool per_user) = 0;
-
-  // Get a temporary folder that is unique to the current user and application.
-  // TODO: Re-evaluate the goals of this function.  We probably just need any
-  // directory that won't collide with another existing directory, and which
-  // will be cleaned up when the program exits.
-  virtual bool GetAppTempFolder(Pathname* path) = 0;
-
-  // Delete the contents of the folder returned by GetAppTempFolder
-  bool CleanAppTempFolder();
-
-  virtual bool GetDiskFreeSpace(const Pathname& path, int64 *freebytes) = 0;
-
-  // Returns the absolute path of the current directory.
-  virtual Pathname GetCurrentDirectory() = 0;
-
-  // Note: These might go into some shared config section later, but they're
-  // used by some methods in this interface, so we're leaving them here for now.
-  void SetOrganizationName(const std::string& organization) {
-    organization_name_ = organization;
-  }
-  void GetOrganizationName(std::string* organization) {
-    ASSERT(NULL != organization);
-    *organization = organization_name_;
-  }
-  void SetApplicationName(const std::string& application) {
-    application_name_ = application;
-  }
-  void GetApplicationName(std::string* application) {
-    ASSERT(NULL != application);
-    *application = application_name_;
-  }
-
- protected:
-  std::string organization_name_;
-  std::string application_name_;
-};
-
-class Filesystem {
- public:
-  static FilesystemInterface *default_filesystem() {
-    ASSERT(default_filesystem_ != NULL);
-    return default_filesystem_;
-  }
-
-  static void set_default_filesystem(FilesystemInterface *filesystem) {
-    default_filesystem_ = filesystem;
-  }
-
-  static FilesystemInterface *swap_default_filesystem(
-      FilesystemInterface *filesystem) {
-    FilesystemInterface *cur = default_filesystem_;
-    default_filesystem_ = filesystem;
-    return cur;
-  }
-
-  static DirectoryIterator *IterateDirectory() {
-    return EnsureDefaultFilesystem()->IterateDirectory();
-  }
-
-  static bool CreateFolder(const Pathname &pathname) {
-    return EnsureDefaultFilesystem()->CreateFolder(pathname);
-  }
-
-  static FileStream *OpenFile(const Pathname &filename,
-                              const std::string &mode) {
-    return EnsureDefaultFilesystem()->OpenFile(filename, mode);
-  }
-
-  static bool CreatePrivateFile(const Pathname &filename) {
-    return EnsureDefaultFilesystem()->CreatePrivateFile(filename);
-  }
-
-  static bool DeleteFile(const Pathname &filename) {
-    return EnsureDefaultFilesystem()->DeleteFile(filename);
-  }
-
-  static bool DeleteEmptyFolder(const Pathname &folder) {
-    return EnsureDefaultFilesystem()->DeleteEmptyFolder(folder);
-  }
-
-  static bool DeleteFolderContents(const Pathname &folder) {
-    return EnsureDefaultFilesystem()->DeleteFolderContents(folder);
-  }
-
-  static bool DeleteFolderAndContents(const Pathname &folder) {
-    return EnsureDefaultFilesystem()->DeleteFolderAndContents(folder);
-  }
-
-  static bool MoveFolder(const Pathname &old_path, const Pathname &new_path) {
-    return EnsureDefaultFilesystem()->MoveFolder(old_path, new_path);
-  }
-
-  static bool MoveFile(const Pathname &old_path, const Pathname &new_path) {
-    return EnsureDefaultFilesystem()->MoveFile(old_path, new_path);
-  }
-
-  static bool CopyFolder(const Pathname &old_path, const Pathname &new_path) {
-    return EnsureDefaultFilesystem()->CopyFolder(old_path, new_path);
-  }
-
-  static bool CopyFile(const Pathname &old_path, const Pathname &new_path) {
-    return EnsureDefaultFilesystem()->CopyFile(old_path, new_path);
-  }
-
-  static bool IsFolder(const Pathname& pathname) {
-    return EnsureDefaultFilesystem()->IsFolder(pathname);
-  }
-
-  static bool IsFile(const Pathname &pathname) {
-    return EnsureDefaultFilesystem()->IsFile(pathname);
-  }
-
-  static bool IsAbsent(const Pathname &pathname) {
-    return EnsureDefaultFilesystem()->IsAbsent(pathname);
-  }
-
-  static bool IsTemporaryPath(const Pathname& pathname) {
-    return EnsureDefaultFilesystem()->IsTemporaryPath(pathname);
-  }
-
-  static bool GetTemporaryFolder(Pathname &path, bool create,
-                                 const std::string *append) {
-    return EnsureDefaultFilesystem()->GetTemporaryFolder(path, create, append);
-  }
-
-  static std::string TempFilename(const Pathname &dir,
-                                  const std::string &prefix) {
-    return EnsureDefaultFilesystem()->TempFilename(dir, prefix);
-  }
-
-  static bool GetFileSize(const Pathname& path, size_t* size) {
-    return EnsureDefaultFilesystem()->GetFileSize(path, size);
-  }
-
-  static bool GetFileTime(const Pathname& path, FileTimeType which,
-                          time_t* time) {
-    return EnsureDefaultFilesystem()->GetFileTime(path, which, time);
-  }
-
-  static bool GetAppPathname(Pathname* path) {
-    return EnsureDefaultFilesystem()->GetAppPathname(path);
-  }
-
-  static bool GetAppDataFolder(Pathname* path, bool per_user) {
-    return EnsureDefaultFilesystem()->GetAppDataFolder(path, per_user);
-  }
-
-  static bool GetAppTempFolder(Pathname* path) {
-    return EnsureDefaultFilesystem()->GetAppTempFolder(path);
-  }
-
-  static bool CleanAppTempFolder() {
-    return EnsureDefaultFilesystem()->CleanAppTempFolder();
-  }
-
-  static bool GetDiskFreeSpace(const Pathname& path, int64 *freebytes) {
-    return EnsureDefaultFilesystem()->GetDiskFreeSpace(path, freebytes);
-  }
-
-  // Definition has to be in the .cc file due to returning forward-declared
-  // Pathname by value.
-  static Pathname GetCurrentDirectory();
-
-  static void SetOrganizationName(const std::string& organization) {
-    EnsureDefaultFilesystem()->SetOrganizationName(organization);
-  }
-
-  static void GetOrganizationName(std::string* organization) {
-    EnsureDefaultFilesystem()->GetOrganizationName(organization);
-  }
-
-  static void SetApplicationName(const std::string& application) {
-    EnsureDefaultFilesystem()->SetApplicationName(application);
-  }
-
-  static void GetApplicationName(std::string* application) {
-    EnsureDefaultFilesystem()->GetApplicationName(application);
-  }
-
- private:
-  static FilesystemInterface* default_filesystem_;
-
-  static FilesystemInterface *EnsureDefaultFilesystem();
-  DISALLOW_IMPLICIT_CONSTRUCTORS(Filesystem);
-};
-
-class FilesystemScope{
- public:
-  explicit FilesystemScope(FilesystemInterface *new_fs) {
-    old_fs_ = Filesystem::swap_default_filesystem(new_fs);
-  }
-  ~FilesystemScope() {
-    Filesystem::set_default_filesystem(old_fs_);
-  }
- private:
-  FilesystemInterface* old_fs_;
-  DISALLOW_IMPLICIT_CONSTRUCTORS(FilesystemScope);
-};
-
-// Generates a unique filename based on the input path.  If no path component
-// is specified, it uses the temporary directory.  If a filename is provided,
-// up to 100 variations of form basename-N.extension are tried.  When
-// create_empty is true, an empty file of this name is created (which
-// decreases the chance of a temporary filename collision with another
-// process).
-bool CreateUniqueFile(Pathname& path, bool create_empty);
-
-}  // namespace talk_base
-
-#endif  // TALK_BASE_FILEUTILS_H_
diff --git a/third_party/libjingle/source/talk/base/fileutils_mock.h b/third_party/libjingle/source/talk/base/fileutils_mock.h
deleted file mode 100644
index 2ccb6a3..0000000
--- a/third_party/libjingle/source/talk/base/fileutils_mock.h
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * libjingle
- * Copyright 2004--2011, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TALK_BASE_FILEUTILS_MOCK_H_
-#define TALK_BASE_FILEUTILS_MOCK_H_
-
-#include <string>
-#include <utility>
-#include <vector>
-
-#include "talk/base/fileutils.h"
-#include "talk/base/pathutils.h"
-#include "talk/base/stream.h"
-#include "testing/base/public/gmock.h"
-
-namespace talk_base {
-
-class FakeFileStream : public FileStream {
-  public:
-    explicit FakeFileStream(const std::string & contents) :
-      string_stream_(contents)
-    {}
-
-    virtual StreamResult Read(void* buffer, size_t buffer_len,
-                              size_t* read, int* error) {
-      return string_stream_.Read(buffer, buffer_len, read, error);
-    }
-
-    virtual void Close() {
-      return string_stream_.Close();
-    }
-    virtual bool GetSize(size_t* size) const {
-      return string_stream_.GetSize(size);
-    }
-
-  private:
-    StringStream string_stream_;
-};
-
-class FakeDirectoryIterator : public DirectoryIterator {
-  public:
-    typedef std::pair<std::string, std::string> File;
-
-    /*
-     * files should be sorted by directory
-     * put '/' at the end of file if you want it to be a directory
-     *
-     * Sample list:
-     *  /var/dir/file1
-     *  /var/dir/file2
-     *  /var/dir/subdir1/
-     *  /var/dir/subdir2/
-     *  /var/dir2/file2
-     *  /var/dir3/
-     *
-     *  you can call Iterate for any path: /var, /var/dir, /var/dir2
-     *  unrelated files will be ignored
-     */
-    explicit FakeDirectoryIterator(const std::vector<File>& all_files) :
-      all_files_(all_files) {}
-
-    virtual bool Iterate(const Pathname& path) {
-      path_iterator_ = all_files_.begin();
-      path_ = path.pathname();
-
-      // make sure path ends end with '/'
-      if (path_.rfind(Pathname::DefaultFolderDelimiter()) != path_.size() - 1)
-        path_ += Pathname::DefaultFolderDelimiter();
-
-      return  FakeDirectoryIterator::Search(std::string(""));
-    }
-
-    virtual bool Next() {
-      std::string current_name = Name();
-      path_iterator_++;
-      return FakeDirectoryIterator::Search(current_name);
-    }
-
-    bool Search(const std::string& current_name) {
-      for (; path_iterator_ != all_files_.end(); path_iterator_++) {
-        if (path_iterator_->first.find(path_) == 0
-            && Name().compare(current_name) != 0) {
-          return true;
-        }
-      }
-
-      return false;
-    }
-
-    virtual bool IsDirectory() const {
-      std::string sub_path = path_iterator_->first;
-
-      return std::string::npos !=
-        sub_path.find(Pathname::DefaultFolderDelimiter(), path_.size());
-    }
-
-    virtual std::string Name() const {
-      std::string sub_path = path_iterator_->first;
-
-      // path     - top level path  (ex. /var/lib)
-      // sub_path - subpath under top level path (ex. /var/lib/dir/dir/file )
-      // find shortest non-trivial common path. (ex. /var/lib/dir)
-      size_t start  = path_.size();
-      size_t end    = sub_path.find(Pathname::DefaultFolderDelimiter(), start);
-
-      if (end != std::string::npos) {
-        return sub_path.substr(start, end - start);
-      } else {
-        return sub_path.substr(start);
-      }
-    }
-
-  private:
-    const std::vector<File> all_files_;
-
-    std::string path_;
-    std::vector<File>::const_iterator path_iterator_;
-};
-
-class FakeFileSystem : public FilesystemInterface {
-  public:
-    typedef std::pair<std::string, std::string> File;
-
-    explicit FakeFileSystem(const std::vector<File>& all_files) :
-     all_files_(all_files) {}
-
-    virtual DirectoryIterator *IterateDirectory() {
-     return new FakeDirectoryIterator(all_files_);
-    }
-
-    virtual FileStream * OpenFile(
-       const Pathname &filename,
-       const std::string &mode) {
-     std::vector<File>::const_iterator i_files = all_files_.begin();
-     std::string path = filename.pathname();
-
-     for (; i_files != all_files_.end(); i_files++) {
-       if (i_files->first.compare(path) == 0) {
-         return new FakeFileStream(i_files->second);
-       }
-     }
-
-     return NULL;
-    }
-
-    bool CreatePrivateFile(const Pathname &filename) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool DeleteFile(const Pathname &filename) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool DeleteEmptyFolder(const Pathname &folder) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool DeleteFolderContents(const Pathname &folder) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool DeleteFolderAndContents(const Pathname &folder) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool CreateFolder(const Pathname &pathname) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool MoveFolder(const Pathname &old_path, const Pathname &new_path) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool MoveFile(const Pathname &old_path, const Pathname &new_path) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool CopyFile(const Pathname &old_path, const Pathname &new_path) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool IsFolder(const Pathname &pathname) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool IsFile(const Pathname &pathname) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool IsAbsent(const Pathname &pathname) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool IsTemporaryPath(const Pathname &pathname) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool GetTemporaryFolder(Pathname &path, bool create,
-                            const std::string *append) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    std::string TempFilename(const Pathname &dir, const std::string &prefix) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return std::string();
-    }
-    bool GetFileSize(const Pathname &path, size_t *size) {
-      EXPECT_TRUE_M(false, "Unsupported operation");
-      return false;
-    }
-    bool GetFileTime(const Pathname &path, FileTimeType which,
-                     time_t* time) {
-      EXPECT_TRUE_M(false, "U