Revved to chromium 0e1d34edba6a5d8f7fe43c5b675880a36f4b3861 refs/remotes/origin/HEAD
filter gyp out of build/landmines.py
filter pepper out of mojo/examples/BUILD.gn
filter html_viewer out of mojo/services/BUILD.gn
filter js out of mojo/BUILD.gn and mojo/tools/data/unittests
filter js/bindings out of mojo/public/BUILD.gn
applied patch gpu_media.patch
applied patch cc_strip_video.patch
applied patch ui_test_support.patch
applied patch remove_ipc_deps.patch
applied patch ui_compositor.patch
applied patch net_sql.patch
diff --git a/net/tools/balsa/balsa_frame.h b/net/tools/balsa/balsa_frame.h
index 73c3dd9..5198dd1 100644
--- a/net/tools/balsa/balsa_frame.h
+++ b/net/tools/balsa/balsa_frame.h
@@ -201,36 +201,35 @@
private:
class DoNothingBalsaVisitor : public BalsaVisitorInterface {
- virtual void ProcessBodyInput(const char *input, size_t size) override {}
- virtual void ProcessBodyData(const char *input, size_t size) override {}
- virtual void ProcessHeaderInput(const char *input, size_t size) override {}
- virtual void ProcessTrailerInput(const char *input, size_t size) override {}
- virtual void ProcessHeaders(const BalsaHeaders& headers) override {}
- virtual void ProcessRequestFirstLine(const char* line_input,
- size_t line_length,
- const char* method_input,
- size_t method_length,
- const char* request_uri_input,
- size_t request_uri_length,
- const char* version_input,
- size_t version_length) override {}
- virtual void ProcessResponseFirstLine(const char *line_input,
- size_t line_length,
- const char *version_input,
- size_t version_length,
- const char *status_input,
- size_t status_length,
- const char *reason_input,
- size_t reason_length) override {}
- virtual void ProcessChunkLength(size_t chunk_length) override {}
- virtual void ProcessChunkExtensions(const char *input,
- size_t size) override {}
- virtual void HeaderDone() override {}
- virtual void MessageDone() override {}
- virtual void HandleHeaderError(BalsaFrame* framer) override {}
- virtual void HandleHeaderWarning(BalsaFrame* framer) override {}
- virtual void HandleChunkingError(BalsaFrame* framer) override {}
- virtual void HandleBodyError(BalsaFrame* framer) override {}
+ void ProcessBodyInput(const char* input, size_t size) override {}
+ void ProcessBodyData(const char* input, size_t size) override {}
+ void ProcessHeaderInput(const char* input, size_t size) override {}
+ void ProcessTrailerInput(const char* input, size_t size) override {}
+ void ProcessHeaders(const BalsaHeaders& headers) override {}
+ void ProcessRequestFirstLine(const char* line_input,
+ size_t line_length,
+ const char* method_input,
+ size_t method_length,
+ const char* request_uri_input,
+ size_t request_uri_length,
+ const char* version_input,
+ size_t version_length) override {}
+ void ProcessResponseFirstLine(const char* line_input,
+ size_t line_length,
+ const char* version_input,
+ size_t version_length,
+ const char* status_input,
+ size_t status_length,
+ const char* reason_input,
+ size_t reason_length) override {}
+ void ProcessChunkLength(size_t chunk_length) override {}
+ void ProcessChunkExtensions(const char* input, size_t size) override {}
+ void HeaderDone() override {}
+ void MessageDone() override {}
+ void HandleHeaderError(BalsaFrame* framer) override {}
+ void HandleHeaderWarning(BalsaFrame* framer) override {}
+ void HandleChunkingError(BalsaFrame* framer) override {}
+ void HandleBodyError(BalsaFrame* framer) override {}
};
bool last_char_was_slash_r_;
diff --git a/net/tools/balsa/simple_buffer.h b/net/tools/balsa/simple_buffer.h
index d58894e..d914ec5 100644
--- a/net/tools/balsa/simple_buffer.h
+++ b/net/tools/balsa/simple_buffer.h
@@ -16,7 +16,7 @@
public:
SimpleBuffer();
explicit SimpleBuffer(int size);
- virtual ~SimpleBuffer();
+ ~SimpleBuffer() override;
std::string str() const;
@@ -32,32 +32,32 @@
// The following functions all override pure virtual functions
// in BufferInterface. See buffer_interface.h for a description
// of what they do.
- virtual int ReadableBytes() const override;
- virtual int BufferSize() const override;
- virtual int BytesFree() const override;
+ int ReadableBytes() const override;
+ int BufferSize() const override;
+ int BytesFree() const override;
- virtual bool Empty() const override;
- virtual bool Full() const override;
+ bool Empty() const override;
+ bool Full() const override;
- virtual int Write(const char* bytes, int size) override;
+ int Write(const char* bytes, int size) override;
- virtual void GetWritablePtr(char **ptr, int* size) const override;
+ void GetWritablePtr(char** ptr, int* size) const override;
- virtual void GetReadablePtr(char **ptr, int* size) const override;
+ void GetReadablePtr(char** ptr, int* size) const override;
- virtual int Read(char* bytes, int size) override;
+ int Read(char* bytes, int size) override;
- virtual void Clear() override;
+ void Clear() override;
// This can be an expensive operation: costing a new/delete, and copying of
// all existing data. Even if the existing buffer does not need to be
// resized, unread data may still need to be non-destructively copied to
// consolidate fragmented free space.
- virtual bool Reserve(int size) override;
+ bool Reserve(int size) override;
- virtual void AdvanceReadablePtr(int amount_to_advance) override;
+ void AdvanceReadablePtr(int amount_to_advance) override;
- virtual void AdvanceWritablePtr(int amount_to_advance) override;
+ void AdvanceWritablePtr(int amount_to_advance) override;
void Swap(SimpleBuffer* other) {
char* tmp = storage_;
diff --git a/net/tools/dump_cache/cache_dumper.h b/net/tools/dump_cache/cache_dumper.h
index 46c3eec..9b071d7 100644
--- a/net/tools/dump_cache/cache_dumper.h
+++ b/net/tools/dump_cache/cache_dumper.h
@@ -47,13 +47,18 @@
public:
explicit CacheDumper(disk_cache::Backend* cache);
- virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
- virtual int WriteEntry(disk_cache::Entry* entry, int stream, int offset,
- net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual void CloseEntry(disk_cache::Entry* entry, base::Time last_used,
- base::Time last_modified) override;
+ int CreateEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
+ int WriteEntry(disk_cache::Entry* entry,
+ int stream,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ void CloseEntry(disk_cache::Entry* entry,
+ base::Time last_used,
+ base::Time last_modified) override;
private:
disk_cache::Backend* cache_;
@@ -64,13 +69,18 @@
public:
explicit DiskDumper(const base::FilePath& path);
- virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
- const net::CompletionCallback& callback) override;
- virtual int WriteEntry(disk_cache::Entry* entry, int stream, int offset,
- net::IOBuffer* buf, int buf_len,
- const net::CompletionCallback& callback) override;
- virtual void CloseEntry(disk_cache::Entry* entry, base::Time last_used,
- base::Time last_modified) override;
+ int CreateEntry(const std::string& key,
+ disk_cache::Entry** entry,
+ const net::CompletionCallback& callback) override;
+ int WriteEntry(disk_cache::Entry* entry,
+ int stream,
+ int offset,
+ net::IOBuffer* buf,
+ int buf_len,
+ const net::CompletionCallback& callback) override;
+ void CloseEntry(disk_cache::Entry* entry,
+ base::Time last_used,
+ base::Time last_modified) override;
private:
base::FilePath path_;
diff --git a/net/tools/gdig/file_net_log.h b/net/tools/gdig/file_net_log.h
index 005ea31..62ba221 100644
--- a/net/tools/gdig/file_net_log.h
+++ b/net/tools/gdig/file_net_log.h
@@ -20,10 +20,10 @@
class FileNetLogObserver : public NetLog::ThreadSafeObserver {
public:
explicit FileNetLogObserver(FILE* destination);
- virtual ~FileNetLogObserver();
+ ~FileNetLogObserver() override;
// NetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(const net::NetLog::Entry& entry) override;
+ void OnAddEntry(const net::NetLog::Entry& entry) override;
private:
FILE* const destination_;
diff --git a/net/tools/get_server_time/get_server_time.cc b/net/tools/get_server_time/get_server_time.cc
index 8ad907d..800bb34 100644
--- a/net/tools/get_server_time/get_server_time.cc
+++ b/net/tools/get_server_time/get_server_time.cc
@@ -72,21 +72,22 @@
public:
QuitDelegate() {}
- virtual ~QuitDelegate() {}
+ ~QuitDelegate() override {}
// net::URLFetcherDelegate implementation.
- virtual void OnURLFetchComplete(const net::URLFetcher* source) override {
+ void OnURLFetchComplete(const net::URLFetcher* source) override {
base::MessageLoop::current()->Quit();
}
- virtual void OnURLFetchDownloadProgress(
- const net::URLFetcher* source,
- int64 current, int64 total) override {
+ void OnURLFetchDownloadProgress(const net::URLFetcher* source,
+ int64 current,
+ int64 total) override {
NOTREACHED();
}
- virtual void OnURLFetchUploadProgress(const net::URLFetcher* source,
- int64 current, int64 total) override {
+ void OnURLFetchUploadProgress(const net::URLFetcher* source,
+ int64 current,
+ int64 total) override {
NOTREACHED();
}
@@ -100,13 +101,13 @@
public:
PrintingLogObserver() {}
- virtual ~PrintingLogObserver() {
+ ~PrintingLogObserver() override {
// This is guaranteed to be safe as this program is single threaded.
net_log()->RemoveThreadSafeObserver(this);
}
// NetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(const net::NetLog::Entry& entry) override {
+ void OnAddEntry(const net::NetLog::Entry& entry) override {
// The log level of the entry is unknown, so just assume it maps
// to VLOG(1).
if (!VLOG_IS_ON(1))
diff --git a/net/tools/net_watcher/net_watcher.cc b/net/tools/net_watcher/net_watcher.cc
index e9b3496..b6cf393 100644
--- a/net/tools/net_watcher/net_watcher.cc
+++ b/net/tools/net_watcher/net_watcher.cc
@@ -88,34 +88,30 @@
public:
NetWatcher() {}
- virtual ~NetWatcher() {}
+ ~NetWatcher() override {}
// net::NetworkChangeNotifier::IPAddressObserver implementation.
- virtual void OnIPAddressChanged() override {
- LOG(INFO) << "OnIPAddressChanged()";
- }
+ void OnIPAddressChanged() override { LOG(INFO) << "OnIPAddressChanged()"; }
// net::NetworkChangeNotifier::ConnectionTypeObserver implementation.
- virtual void OnConnectionTypeChanged(
+ void OnConnectionTypeChanged(
net::NetworkChangeNotifier::ConnectionType type) override {
LOG(INFO) << "OnConnectionTypeChanged("
<< ConnectionTypeToString(type) << ")";
}
// net::NetworkChangeNotifier::DNSObserver implementation.
- virtual void OnDNSChanged() override {
- LOG(INFO) << "OnDNSChanged()";
- }
+ void OnDNSChanged() override { LOG(INFO) << "OnDNSChanged()"; }
// net::NetworkChangeNotifier::NetworkChangeObserver implementation.
- virtual void OnNetworkChanged(
+ void OnNetworkChanged(
net::NetworkChangeNotifier::ConnectionType type) override {
LOG(INFO) << "OnNetworkChanged("
<< ConnectionTypeToString(type) << ")";
}
// net::ProxyConfigService::Observer implementation.
- virtual void OnProxyConfigChanged(
+ void OnProxyConfigChanged(
const net::ProxyConfig& config,
net::ProxyConfigService::ConfigAvailability availability) override {
LOG(INFO) << "OnProxyConfigChanged("
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index f29af96..edcd0ce 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -762,9 +762,6 @@
// an infinite loop in the EpollServer, as the alarm fires and is immediately
// rescheduled.
ASSERT_TRUE(Initialize());
- if (negotiated_version_ < QUIC_VERSION_19) {
- return;
- }
client_->client()->WaitForCryptoHandshakeConfirmed();
// Ensure both stream and connection level are flow control blocked by setting
@@ -857,22 +854,27 @@
}
TEST_P(EndToEndTest, NegotiateMaxOpenStreams) {
+ ValueRestore<bool> old_flag(&FLAGS_quic_allow_more_open_streams, true);
+
// Negotiate 1 max open stream.
client_config_.SetMaxStreamsPerConnection(1, 1);
ASSERT_TRUE(Initialize());
client_->client()->WaitForCryptoHandshakeConfirmed();
// Make the client misbehave after negotiation.
- QuicSessionPeer::SetMaxOpenStreams(client_->client()->session(), 10);
+ const int kServerMaxStreams = kMaxStreamsMinimumIncrement + 1;
+ QuicSessionPeer::SetMaxOpenStreams(client_->client()->session(),
+ kServerMaxStreams + 1);
- HTTPMessage request(HttpConstants::HTTP_1_1,
- HttpConstants::POST, "/foo");
+ HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo");
request.AddHeader("content-length", "3");
request.set_has_complete_message(false);
- // Open two simultaneous streams.
- client_->SendMessage(request);
- client_->SendMessage(request);
+ // The server supports a small number of additional streams beyond the
+ // negotiated limit. Open enough streams to go beyond that limit.
+ for (int i = 0; i < kServerMaxStreams + 1; ++i) {
+ client_->SendMessage(request);
+ }
client_->WaitForResponse();
EXPECT_FALSE(client_->connected());
@@ -1245,7 +1247,7 @@
set_server_initial_session_flow_control_receive_window(kServerSessionIFCW);
ASSERT_TRUE(Initialize());
- if (negotiated_version_ <= QUIC_VERSION_19) {
+ if (negotiated_version_ == QUIC_VERSION_19) {
return;
}
diff --git a/net/tools/quic/quic_client_session_test.cc b/net/tools/quic/quic_client_session_test.cc
index 8a78878..61f8c01 100644
--- a/net/tools/quic/quic_client_session_test.cc
+++ b/net/tools/quic/quic_client_session_test.cc
@@ -111,10 +111,8 @@
EXPECT_EQ(FEC_PROTECT_OPTIONAL, stream->fec_policy());
}
-TEST_P(ToolsQuicClientSessionTest, EmptyPacketReceived) {
- // This test covers broken behavior that empty packets cause QUIC connection
- // broken.
-
+// Regression test for b/17206611.
+TEST_P(ToolsQuicClientSessionTest, InvalidPacketReceived) {
// Create Packet with 0 length.
QuicEncryptedPacket invalid_packet(nullptr, 0, false);
IPEndPoint server_address(TestPeerIPAddress(), kTestPort);
@@ -126,16 +124,12 @@
Invoke(reinterpret_cast<MockConnection*>(session_->connection()),
&MockConnection::ReallyProcessUdpPacket));
- // Expect call to close connection with error QUIC_INVALID_PACKET_HEADER.
- // TODO(b/17206611): Correct behavior: packet should get dropped and
- // connection should remain open.
- EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(
- QUIC_INVALID_PACKET_HEADER, _)).Times(1);
+ // Validate that empty packets don't close the connection.
+ EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(_, _)).Times(0);
session_->connection()->ProcessUdpPacket(client_address, server_address,
invalid_packet);
- // Create a packet that causes DecryptPacket failed. The packet will get
- // dropped without closing connection. This is a correct behavior.
+ // Verifiy that small, invalid packets don't close the connection.
char buf[2] = {0x00, 0x01};
QuicEncryptedPacket valid_packet(buf, 2, false);
// Close connection shouldn't be called.
diff --git a/net/tools/quic/quic_server_session.cc b/net/tools/quic/quic_server_session.cc
index 842c6ef..5b073c8 100644
--- a/net/tools/quic/quic_server_session.cc
+++ b/net/tools/quic/quic_server_session.cc
@@ -123,7 +123,7 @@
cached_network_params.set_max_bandwidth_timestamp_seconds(
max_bandwidth_timestamp);
cached_network_params.set_min_rtt_ms(
- sent_packet_manager.GetRttStats()->min_rtt().ToMilliseconds());
+ sent_packet_manager.GetRttStats()->MinRtt().ToMilliseconds());
cached_network_params.set_previous_connection_state(
bandwidth_recorder.EstimateRecordedDuringSlowStart()
? CachedNetworkParameters::SLOW_START
diff --git a/net/tools/quic/quic_server_session_test.cc b/net/tools/quic/quic_server_session_test.cc
index 72c65a8..0c25f81 100644
--- a/net/tools/quic/quic_server_session_test.cc
+++ b/net/tools/quic/quic_server_session_test.cc
@@ -357,7 +357,7 @@
expected_network_params.set_min_rtt_ms(session_->connection()
->sent_packet_manager()
.GetRttStats()
- ->min_rtt()
+ ->MinRtt()
.ToMilliseconds());
expected_network_params.set_previous_connection_state(
CachedNetworkParameters::CONGESTION_AVOIDANCE);