summaryrefslogtreecommitdiff
path: root/chromium/jingle
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-03-18 13:16:26 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-03-20 15:55:39 +0100
commit3f0f86b0caed75241fa71c95a5d73bc0164348c5 (patch)
tree92b9fb00f2e9e90b0be2262093876d4f43b6cd13 /chromium/jingle
parente90d7c4b152c56919d963987e2503f9909a666d2 (diff)
downloadqtwebengine-chromium-3f0f86b0caed75241fa71c95a5d73bc0164348c5.tar.gz
Update to new stable branch 1750
This also includes an updated ninja and chromium dependencies needed on Windows. Change-Id: Icd597d80ed3fa4425933c9f1334c3c2e31291c42 Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'chromium/jingle')
-rw-r--r--chromium/jingle/glue/channel_socket_adapter.cc1
-rw-r--r--chromium/jingle/glue/channel_socket_adapter.h2
-rw-r--r--chromium/jingle/glue/channel_socket_adapter_unittest.cc3
-rw-r--r--chromium/jingle/glue/chrome_async_socket.cc6
-rw-r--r--chromium/jingle/glue/chrome_async_socket.h3
-rw-r--r--chromium/jingle/glue/fake_socket_factory.cc4
-rw-r--r--chromium/jingle/glue/proxy_resolving_client_socket.h5
-rw-r--r--chromium/jingle/glue/pseudotcp_adapter_unittest.cc5
-rw-r--r--chromium/jingle/glue/task_pump.cc7
-rw-r--r--chromium/jingle/glue/task_pump.h3
-rw-r--r--chromium/jingle/glue/thread_wrapper.cc4
-rw-r--r--chromium/jingle/glue/thread_wrapper.h2
-rw-r--r--chromium/jingle/notifier/communicator/login.cc3
-rw-r--r--chromium/jingle/notifier/listener/non_blocking_push_client.cc7
-rw-r--r--chromium/jingle/notifier/listener/non_blocking_push_client.h5
-rw-r--r--chromium/jingle/notifier/listener/notification_defines.cc10
-rw-r--r--chromium/jingle/notifier/listener/push_notifications_send_update_task.cc12
-rw-r--r--chromium/jingle/notifier/listener/push_notifications_send_update_task_unittest.cc2
18 files changed, 42 insertions, 42 deletions
diff --git a/chromium/jingle/glue/channel_socket_adapter.cc b/chromium/jingle/glue/channel_socket_adapter.cc
index 27f0080213f..c9cfff1ca14 100644
--- a/chromium/jingle/glue/channel_socket_adapter.cc
+++ b/chromium/jingle/glue/channel_socket_adapter.cc
@@ -140,6 +140,7 @@ void TransportChannelSocketAdapter::OnNewPacket(
cricket::TransportChannel* channel,
const char* data,
size_t data_size,
+ const talk_base::PacketTime& packet_time,
int flags) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_);
DCHECK_EQ(channel, channel_);
diff --git a/chromium/jingle/glue/channel_socket_adapter.h b/chromium/jingle/glue/channel_socket_adapter.h
index baf4d4c64bd..35414a18d95 100644
--- a/chromium/jingle/glue/channel_socket_adapter.h
+++ b/chromium/jingle/glue/channel_socket_adapter.h
@@ -8,6 +8,7 @@
#include "base/callback_forward.h"
#include "base/compiler_specific.h"
#include "net/socket/socket.h"
+#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
#include "third_party/libjingle/source/talk/base/socketaddress.h"
#include "third_party/libjingle/source/talk/base/sigslot.h"
@@ -54,6 +55,7 @@ class TransportChannelSocketAdapter : public net::Socket,
void OnNewPacket(cricket::TransportChannel* channel,
const char* data,
size_t data_size,
+ const talk_base::PacketTime& packet_time,
int flags);
void OnWritableState(cricket::TransportChannel* channel);
void OnChannelDestroyed(cricket::TransportChannel* channel);
diff --git a/chromium/jingle/glue/channel_socket_adapter_unittest.cc b/chromium/jingle/glue/channel_socket_adapter_unittest.cc
index 6a89a43ce7b..7fcb5d1d6f2 100644
--- a/chromium/jingle/glue/channel_socket_adapter_unittest.cc
+++ b/chromium/jingle/glue/channel_socket_adapter_unittest.cc
@@ -88,7 +88,8 @@ TEST_F(TransportChannelSocketAdapterTest, Read) {
int result = target_->Read(buffer.get(), kBufferSize, callback_);
ASSERT_EQ(net::ERR_IO_PENDING, result);
- channel_.SignalReadPacket(&channel_, kTestData, kTestDataSize, 0);
+ channel_.SignalReadPacket(&channel_, kTestData, kTestDataSize,
+ talk_base::CreatePacketTime(0), 0);
EXPECT_EQ(kTestDataSize, callback_result_);
}
diff --git a/chromium/jingle/glue/chrome_async_socket.cc b/chromium/jingle/glue/chrome_async_socket.cc
index c14fb99b11e..2c9812c27a7 100644
--- a/chromium/jingle/glue/chrome_async_socket.cc
+++ b/chromium/jingle/glue/chrome_async_socket.cc
@@ -30,8 +30,7 @@ ChromeAsyncSocket::ChromeAsyncSocket(
ResolvingClientSocketFactory* resolving_client_socket_factory,
size_t read_buf_size,
size_t write_buf_size)
- : weak_ptr_factory_(this),
- resolving_client_socket_factory_(resolving_client_socket_factory),
+ : resolving_client_socket_factory_(resolving_client_socket_factory),
state_(STATE_CLOSED),
error_(ERROR_NONE),
net_error_(net::OK),
@@ -41,7 +40,8 @@ ChromeAsyncSocket::ChromeAsyncSocket(
read_end_(0U),
write_state_(IDLE),
write_buf_(new net::IOBufferWithSize(write_buf_size)),
- write_end_(0U) {
+ write_end_(0U),
+ weak_ptr_factory_(this) {
DCHECK(resolving_client_socket_factory_.get());
DCHECK_GT(read_buf_size, 0U);
DCHECK_GT(write_buf_size, 0U);
diff --git a/chromium/jingle/glue/chrome_async_socket.h b/chromium/jingle/glue/chrome_async_socket.h
index 1037d24c00b..7253ded07da 100644
--- a/chromium/jingle/glue/chrome_async_socket.h
+++ b/chromium/jingle/glue/chrome_async_socket.h
@@ -180,7 +180,6 @@ class ChromeAsyncSocket : public buzz::AsyncSocket {
// Close functions.
void DoClose();
- base::WeakPtrFactory<ChromeAsyncSocket> weak_ptr_factory_;
scoped_ptr<ResolvingClientSocketFactory> resolving_client_socket_factory_;
// buzz::AsyncSocket state.
@@ -205,6 +204,8 @@ class ChromeAsyncSocket : public buzz::AsyncSocket {
scoped_refptr<net::IOBufferWithSize> write_buf_;
size_t write_end_;
+ base::WeakPtrFactory<ChromeAsyncSocket> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeAsyncSocket);
};
diff --git a/chromium/jingle/glue/fake_socket_factory.cc b/chromium/jingle/glue/fake_socket_factory.cc
index 823367f6340..38472c6f41a 100644
--- a/chromium/jingle/glue/fake_socket_factory.cc
+++ b/chromium/jingle/glue/fake_socket_factory.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "jingle/glue/utils.h"
+#include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
#include "third_party/libjingle/source/talk/base/asyncsocket.h"
namespace jingle_glue {
@@ -113,7 +114,8 @@ void FakeUDPPacketSocket::DeliverPacket(const net::IPEndPoint& from,
return;
}
- SignalReadPacket(this, &data[0], data.size(), address);
+ SignalReadPacket(this, &data[0], data.size(), address,
+ talk_base::CreatePacketTime(0));
}
FakeSocketManager::FakeSocketManager()
diff --git a/chromium/jingle/glue/proxy_resolving_client_socket.h b/chromium/jingle/glue/proxy_resolving_client_socket.h
index b920591da5f..99824d09e59 100644
--- a/chromium/jingle/glue/proxy_resolving_client_socket.h
+++ b/chromium/jingle/glue/proxy_resolving_client_socket.h
@@ -95,10 +95,13 @@ class ProxyResolvingClientSocket : public net::StreamSocket {
const GURL proxy_url_;
bool tried_direct_connect_fallback_;
net::BoundNetLog bound_net_log_;
- base::WeakPtrFactory<ProxyResolvingClientSocket> weak_factory_;
// The callback passed to Connect().
net::CompletionCallback user_connect_callback_;
+
+ base::WeakPtrFactory<ProxyResolvingClientSocket> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(ProxyResolvingClientSocket);
};
} // namespace jingle_glue
diff --git a/chromium/jingle/glue/pseudotcp_adapter_unittest.cc b/chromium/jingle/glue/pseudotcp_adapter_unittest.cc
index 08e59fc3c79..7d1870ca4fa 100644
--- a/chromium/jingle/glue/pseudotcp_adapter_unittest.cc
+++ b/chromium/jingle/glue/pseudotcp_adapter_unittest.cc
@@ -28,11 +28,6 @@ namespace jingle_glue {
namespace {
-// The range is chosen arbitrarily. It must be big enough so that we
-// always have at least two UDP ports available.
-const int kMinPort = 32000;
-const int kMaxPort = 33000;
-
const int kMessageSize = 1024;
const int kMessages = 100;
const int kTestDataSize = kMessages * kMessageSize;
diff --git a/chromium/jingle/glue/task_pump.cc b/chromium/jingle/glue/task_pump.cc
index be5f25b4b67..3c0ddaafeda 100644
--- a/chromium/jingle/glue/task_pump.cc
+++ b/chromium/jingle/glue/task_pump.cc
@@ -9,9 +9,10 @@
namespace jingle_glue {
TaskPump::TaskPump()
- : weak_factory_(this),
- posted_wake_(false),
- stopped_(false) {}
+ : posted_wake_(false),
+ stopped_(false),
+ weak_factory_(this) {
+}
TaskPump::~TaskPump() {
DCHECK(CalledOnValidThread());
diff --git a/chromium/jingle/glue/task_pump.h b/chromium/jingle/glue/task_pump.h
index 17ce68916da..a90cab6abb6 100644
--- a/chromium/jingle/glue/task_pump.h
+++ b/chromium/jingle/glue/task_pump.h
@@ -30,10 +30,11 @@ class TaskPump : public talk_base::TaskRunner, public base::NonThreadSafe {
private:
void CheckAndRunTasks();
- base::WeakPtrFactory<TaskPump> weak_factory_;
bool posted_wake_;
bool stopped_;
+ base::WeakPtrFactory<TaskPump> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(TaskPump);
};
diff --git a/chromium/jingle/glue/thread_wrapper.cc b/chromium/jingle/glue/thread_wrapper.cc
index ab5120dea0d..e2109fe6ae9 100644
--- a/chromium/jingle/glue/thread_wrapper.cc
+++ b/chromium/jingle/glue/thread_wrapper.cc
@@ -52,10 +52,10 @@ JingleThreadWrapper::JingleThreadWrapper(
send_allowed_(false),
last_task_id_(0),
pending_send_event_(true, false),
- weak_ptr_factory_(this),
- weak_ptr_(weak_ptr_factory_.GetWeakPtr()) {
+ weak_ptr_factory_(this) {
DCHECK(task_runner->BelongsToCurrentThread());
DCHECK(!talk_base::Thread::Current());
+ weak_ptr_ = weak_ptr_factory_.GetWeakPtr();
talk_base::MessageQueueManager::Add(this);
WrapCurrent();
}
diff --git a/chromium/jingle/glue/thread_wrapper.h b/chromium/jingle/glue/thread_wrapper.h
index 29693081da9..97e8588a817 100644
--- a/chromium/jingle/glue/thread_wrapper.h
+++ b/chromium/jingle/glue/thread_wrapper.h
@@ -116,8 +116,8 @@ class JingleThreadWrapper : public base::MessageLoop::DestructionObserver,
std::list<PendingSend*> pending_send_messages_;
base::WaitableEvent pending_send_event_;
- base::WeakPtrFactory<JingleThreadWrapper> weak_ptr_factory_;
base::WeakPtr<JingleThreadWrapper> weak_ptr_;
+ base::WeakPtrFactory<JingleThreadWrapper> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(JingleThreadWrapper);
};
diff --git a/chromium/jingle/notifier/communicator/login.cc b/chromium/jingle/notifier/communicator/login.cc
index 6c508627874..1a877e1cd49 100644
--- a/chromium/jingle/notifier/communicator/login.cc
+++ b/chromium/jingle/notifier/communicator/login.cc
@@ -24,9 +24,6 @@
namespace notifier {
-// Redirect valid for 5 minutes.
-static const int kRedirectTimeoutMinutes = 5;
-
Login::Delegate::~Delegate() {}
Login::Login(Delegate* delegate,
diff --git a/chromium/jingle/notifier/listener/non_blocking_push_client.cc b/chromium/jingle/notifier/listener/non_blocking_push_client.cc
index 277cf4955ee..ba89a2c3cfb 100644
--- a/chromium/jingle/notifier/listener/non_blocking_push_client.cc
+++ b/chromium/jingle/notifier/listener/non_blocking_push_client.cc
@@ -156,10 +156,9 @@ NonBlockingPushClient::NonBlockingPushClient(
const scoped_refptr<base::SingleThreadTaskRunner>& delegate_task_runner,
const CreateBlockingPushClientCallback&
create_blocking_push_client_callback)
- : weak_ptr_factory_(this),
- delegate_task_runner_(delegate_task_runner),
- core_(new Core(delegate_task_runner_,
- weak_ptr_factory_.GetWeakPtr())) {
+ : delegate_task_runner_(delegate_task_runner),
+ weak_ptr_factory_(this) {
+ core_ = new Core(delegate_task_runner_, weak_ptr_factory_.GetWeakPtr());
delegate_task_runner_->PostTask(
FROM_HERE,
base::Bind(&NonBlockingPushClient::Core::CreateOnDelegateThread,
diff --git a/chromium/jingle/notifier/listener/non_blocking_push_client.h b/chromium/jingle/notifier/listener/non_blocking_push_client.h
index f5c6bc48e09..b49ae03b5d8 100644
--- a/chromium/jingle/notifier/listener/non_blocking_push_client.h
+++ b/chromium/jingle/notifier/listener/non_blocking_push_client.h
@@ -60,12 +60,13 @@ class NonBlockingPushClient : public PushClient {
void OnPingResponse();
base::ThreadChecker thread_checker_;
- base::WeakPtrFactory<NonBlockingPushClient> weak_ptr_factory_;
const scoped_refptr<base::SingleThreadTaskRunner> delegate_task_runner_;
- const scoped_refptr<Core> core_;
+ scoped_refptr<Core> core_;
ObserverList<PushClientObserver> observers_;
+ base::WeakPtrFactory<NonBlockingPushClient> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(NonBlockingPushClient);
};
diff --git a/chromium/jingle/notifier/listener/notification_defines.cc b/chromium/jingle/notifier/listener/notification_defines.cc
index f4f3e408a5b..f7c8f8fd3ad 100644
--- a/chromium/jingle/notifier/listener/notification_defines.cc
+++ b/chromium/jingle/notifier/listener/notification_defines.cc
@@ -65,10 +65,12 @@ bool Notification::Equals(const Notification& other) const {
}
std::string Notification::ToString() const {
- // |channel| or |data| could hold binary data, so use GetDoubleQuotedJson()
- // to escape them.
- const std::string& printable_channel = base::GetDoubleQuotedJson(channel);
- const std::string& printable_data = base::GetDoubleQuotedJson(data);
+ // |channel| or |data| could hold binary data, so convert all non-ASCII
+ // characters to escape sequences.
+ const std::string& printable_channel =
+ base::EscapeBytesAsInvalidJSONString(channel, true /* put_in_quotes */);
+ const std::string& printable_data =
+ base::EscapeBytesAsInvalidJSONString(data, true /* put_in_quotes */);
return
"{ channel: " + printable_channel + ", data: " + printable_data + " }";
}
diff --git a/chromium/jingle/notifier/listener/push_notifications_send_update_task.cc b/chromium/jingle/notifier/listener/push_notifications_send_update_task.cc
index 4e0c12782ad..9b5abb6fd3d 100644
--- a/chromium/jingle/notifier/listener/push_notifications_send_update_task.cc
+++ b/chromium/jingle/notifier/listener/push_notifications_send_update_task.cc
@@ -71,20 +71,14 @@ buzz::XmlElement* PushNotificationsSendUpdateTask::MakeUpdateMessage(
recipient_element->AddAttr(buzz::QN_TO, recipient.to);
if (!recipient.user_specific_data.empty()) {
std::string base64_data;
- if (!base::Base64Encode(recipient.user_specific_data, &base64_data)) {
- DLOG(WARNING) << "Could not encode data "
- << recipient.user_specific_data;
- } else {
- recipient_element->SetBodyText(base64_data);
- }
+ base::Base64Encode(recipient.user_specific_data, &base64_data);
+ recipient_element->SetBodyText(base64_data);
}
}
buzz::XmlElement* data = new buzz::XmlElement(kQnData, true);
std::string base64_data;
- if (!base::Base64Encode(notification.data, &base64_data)) {
- DLOG(WARNING) << "Could not encode data " << notification.data;
- }
+ base::Base64Encode(notification.data, &base64_data);
data->SetBodyText(base64_data);
push->AddElement(data);
diff --git a/chromium/jingle/notifier/listener/push_notifications_send_update_task_unittest.cc b/chromium/jingle/notifier/listener/push_notifications_send_update_task_unittest.cc
index c57bd93c2da..0395352879d 100644
--- a/chromium/jingle/notifier/listener/push_notifications_send_update_task_unittest.cc
+++ b/chromium/jingle/notifier/listener/push_notifications_send_update_task_unittest.cc
@@ -36,7 +36,7 @@ TEST_F(PushNotificationsSendUpdateTaskTest, MakeUpdateMessage) {
notification.data = "test_data";
std::string base64_data;
- EXPECT_TRUE(base::Base64Encode(notification.data, &base64_data));
+ base::Base64Encode(notification.data, &base64_data);
scoped_ptr<buzz::XmlElement> message(
PushNotificationsSendUpdateTask::MakeUpdateMessage(