chromium/src/net.git
11 hours agoRemove ConstructSpdyHeader master
ttuttle@chromium.org [Tue, 21 May 2013 02:24:34 +0000 (02:24 +0000)]
Remove ConstructSpdyHeader

Remove ConstructSpdyHeader from spdy_test_util_spdy[23], since it's not used anywhere.  (I was going to merge it into spdy_test_util_common.)

BUG=226192

Review URL: https://chromiumcodereview.appspot.com/15347002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@201198 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 hours agonet: Expose NetworkChangeObserver::DisableForTest.
jered@chromium.org [Tue, 21 May 2013 01:07:07 +0000 (01:07 +0000)]
net: Expose NetworkChangeObserver::DisableForTest.

Instant relies on net::NetworkChangeObserver so our tests need to
disable it in some cases. Rather than introduce a friend declaration for
code in chrome/browser/ui/search into net/base, expose the helper we
need.

BUG=

Review URL: https://chromiumcodereview.appspot.com/15120011

git-svn-id: http://src.chromium.org/svn/trunk/src/net@201187 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

15 hours agoFix NSSCertDatabase Singleton access DCHECK
stevenjb@chromium.org [Mon, 20 May 2013 22:37:07 +0000 (22:37 +0000)]
Fix NSSCertDatabase Singleton access DCHECK

NSSCertDatabase::ListCerts is being called from a worker thread
in CertLoader. Since NSSCertDatabase is a Singleton, this triggers a
DCHECK when a Debug build is run on a device (see issue).

Simple fix (without re-factoring) is to make NSSCertDatabase a LeakySingleton to avoid the DCHECK.

BUG=241292

Review URL: https://chromiumcodereview.appspot.com/15134007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@201152 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

21 hours agoGTTF: Convert WebContentsImplBrowserTest to use EmbeddedTestServer.
phajdan.jr@chromium.org [Mon, 20 May 2013 16:45:38 +0000 (16:45 +0000)]
GTTF: Convert WebContentsImplBrowserTest to use EmbeddedTestServer.

This eliminates a whole class of problems with SpawnedTestServer
failing to start.

BUG=96594, 230200
R=avi@chromium.org, satorux@chromium.org

Review URL: https://codereview.chromium.org/14914010

git-svn-id: http://src.chromium.org/svn/trunk/src/net@201099 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

23 hours agoChange the WebSocket OpCode constants to an enum
ricea@chromium.org [Mon, 20 May 2013 14:40:06 +0000 (14:40 +0000)]
Change the WebSocket OpCode constants to an enum

In order to permit them to be used in switch statements, changed the
kOpCode* constants to an enum.

Simplified IsKnownDataOpCode() and IsKnownControlOpCode() since the
compiler can now see the values and so produce optimised output with no
need for bit fiddling.

Also applied style fixes suggested by clang-format and cpplint.py.

BUG=
TEST=net_unittests chromedriver_unittests

Review URL: https://chromiumcodereview.appspot.com/15298012

git-svn-id: http://src.chromium.org/svn/trunk/src/net@201086 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

34 hours agoMerge ConstructSpdyReplyString into SpdyTestUtil
ttuttle@chromium.org [Mon, 20 May 2013 03:50:56 +0000 (03:50 +0000)]
Merge ConstructSpdyReplyString into SpdyTestUtil

BUG=226192

Review URL: https://chromiumcodereview.appspot.com/15332002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@201008 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

34 hours agoFix bug in InitParseWithoutQuestion
noamsml@chromium.org [Mon, 20 May 2013 03:50:38 +0000 (03:50 +0000)]
Fix bug in InitParseWithoutQuestion

Fix crash in cases where the buffer is smaller than the size of the DNS header.

BUG=241891
TEST=DnsResponseTest.InitParseWithoutQueryPacketTooShort

Review URL: https://chromiumcodereview.appspot.com/15326002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@201007 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agonet: Fix GetLoadState of a stream request when it's waiting
mmenke@chromium.org [Sat, 18 May 2013 09:30:05 +0000 (09:30 +0000)]
net:  Fix GetLoadState of a stream request when it's waiting
on a connection to be established.  The state of the
connection was not being queried, due to a old regression.

BUG=118136

Review URL: https://chromiumcodereview.appspot.com/15322002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200985 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agoInitialize modification/used times from clock in SimpleCache
gavinp@chromium.org [Fri, 17 May 2013 19:58:40 +0000 (19:58 +0000)]
Initialize modification/used times from clock in SimpleCache

This is a followup to https://codereview.chromium.org/15085016/ ,
in which Egor pointed out some troubling eviction implications of
moving the mutation.

By always making sure the used/modified times have a value, we don't
 cause as-yet-uncreated entries to have null (i.e. really old) time, making
them prime candidates for eviction.

R=pasko@chromium.org,felipeg
BUG=229223

Review URL: https://chromiumcodereview.appspot.com/15139003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200872 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agoChannelID-less Connections in Chrome should be more granular.
mef@chromium.org [Fri, 17 May 2013 18:01:40 +0000 (18:01 +0000)]
ChannelID-less Connections in Chrome should be more granular.

Added enum PrivacyMode (Enabled/Disabled) to mark connections which should not use ChannelID even if it is globally enabled.
PrivacyMode is enabled if user blocks sending or saving cookies to/from particular server, taking in account third party cookie settings as well. See crbug.com/223191 for design doc.

Segmented client socket pools according to privacy mode setting used for particular connection (added 'pm/' prefix to pool key. Introduced SpdySessionKey structure and added PrivacyMode to the key of SpdySessionPool.

Added propagation of Privacy Mode setting from Web Sockets. Added check of Privacy Mode to predictor and pre-connect logic.

BUG=223191
TEST=unit_tests gtest_filter=ChromeNetworkDelegatePrivacyModeTest*

Review URL: https://chromiumcodereview.appspot.com/13008028

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200852 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoGrab bag of clang fixes for Windows code
rnk@chromium.org [Fri, 17 May 2013 14:01:17 +0000 (14:01 +0000)]
Grab bag of clang fixes for Windows code

These should hopefully be uncontroversial, so I'm sending them to Darin
because he has global OWNERS approval on src/*.  Let me know if you want
to split this up and farm it out to individual components.

R=darin@chromium.org
CC=thakis@chromium.org
BUG=82385

Fix some -Wdeprecated-writable-strings warnings for wide string
literals.
  net/dns/dns_config_service_win_unittest.cc
  net/http/http_auth_sspi_win.cc
  net/http/http_auth_sspi_win.h
  ui/shell_dialogs/select_file_dialog_win_unittest.cc

Use reinterpret_cast<> to convert from void * to a function pointer.
  chrome/browser/policy/policy_loader_win.cc
  content/browser/gamepad/gamepad_platform_data_fetcher_win.cc

Remove "public" from a typedef.  It's not clear that that really means.
  chrome/browser/enumerate_modules_model_unittest_win.cc

Escape an unescaped backslash in a wide string iteral to prevent it from
being interpreted as a unicode literal ("\uXXX").
  chrome/browser/storage_monitor/test_portable_device_watcher_win.cc

Use base::UTF8ToUTF16() over ATL::CA2W() and avoid an unnecessary
c_str().  Clang can't convert from CA2WEX<> to string16.
  chrome/browser/ui/views/external_tab_container_win.cc

Fix a -Wenum-compare warning when asserting that two enum values are
equal.
  sandbox/win/src/policy_params.h

Don't define va_copy for clang.  It provides one in <stdarg.h>.
  third_party/leveldatabase/port/port_chromium.h

Review URL: https://chromiumcodereview.appspot.com/15200005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200814 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoAdding unit test for two new functions in mime_util.h/cc.
grunell@chromium.org [Fri, 17 May 2013 11:38:06 +0000 (11:38 +0000)]
Adding unit test for two new functions in mime_util.h/cc.

New functions were added in
https://chromiumcodereview.appspot.com/15076008/

BUG=229829

Review URL: https://chromiumcodereview.appspot.com/14934008

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200789 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoRemove deprecated WebSocketFrameHeader constructor
ricea@chromium.org [Fri, 17 May 2013 09:37:45 +0000 (09:37 +0000)]
Remove deprecated WebSocketFrameHeader constructor

net::WebSocketFrameHeader had a no-argument constructor to maintain
compatability with Chromedriver. Chromedriver has stopped using this
constructor, so remove it.

BUG=none
TEST=ninja net_unittests chromedriver_unittests

Review URL: https://chromiumcodereview.appspot.com/15111005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200777 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoDisallow wildcards from matching top-level registry controlled domains during cert...
rsleevi@chromium.org [Fri, 17 May 2013 09:26:34 +0000 (09:26 +0000)]
Disallow wildcards from matching top-level registry controlled domains during cert validation.

This only disallows wildcards for "ICANN" TLDs/registry controlled domains, and
excludes domains in the "private" registry (such as appspot.com or
s3.amazonaws.com)

BUG=100442
TEST=net_unittests:X509CertificateNameVerifyTest.*, as well as visiting sites
such as https://www.appspot.com continues to work without issue.

Review URL: https://chromiumcodereview.appspot.com/14741019

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200771 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoUse loop to iterate over cookies to save in the SaveNextCookie method.
tyoshino@chromium.org [Fri, 17 May 2013 08:11:56 +0000 (08:11 +0000)]
Use loop to iterate over cookies to save in the SaveNextCookie method.

Though it's tail recursion, it's possible that it's not optimized and stack overflow happens when lots of Set-Cookies is received.

BUG=128156

Review URL: https://chromiumcodereview.appspot.com/14824007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200752 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoQUIC - Moved call to SetDefaults to callers of QuicClientSession.
rtenneti@chromium.org [Fri, 17 May 2013 07:58:54 +0000 (07:58 +0000)]
QUIC - Moved call to SetDefaults to callers of QuicClientSession.

Merged internal changes: 46739143

R=wtc@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14795017

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200746 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoWarn if a well-known/"public" CA issues a certificate for a non-TLD
rsleevi@chromium.org [Fri, 17 May 2013 02:09:08 +0000 (02:09 +0000)]
Warn if a well-known/"public" CA issues a certificate for a non-TLD

In preparation for new gTLDs being issued, begin phasing out the process of
permitting publicly-trusted, well-known CAs to issue certificates for names
that the CA cannot verify exclusive control over, such as "webmail" or
"intranet.corp".

Instead, require all publicly-trusted certificates be issued for domains that
chain to an ICANN-recognized root zone (registry controlled domain).

For certs that fail to meet this basic criteria, do not display the page as
secure, as an attacker may be able to go to another CA (or even the same CA
as the 'legitimate' site) and get a valid, publicly-trusted certificate for the
same name.

This does not cause an interstitial to be shown, but represents the first step
to phasing out the practice.

BUG=119212
TEST=[to be filled in]

Review URL: https://chromiumcodereview.appspot.com/15203007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200704 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoProtect against empty "labeled" DNS names in DnsTransaction.
wez@chromium.org [Fri, 17 May 2013 02:08:43 +0000 (02:08 +0000)]
Protect against empty "labeled" DNS names in DnsTransaction.

This CL makes the following changes:
1. DNSDomainFromDot fails for "empty" names such as "", ".", ".." etc.
2. Some additional unit-tests are added for DNSDomainFromDot().
3. DnsTransaction now treats DNS names such as "." as invalid arguments.
4. Added a comment to SocketStreamDispatcherHost to clarify that SocketStreamHost is responsible for checking |url|.

BUG=235161

Review URL: https://chromiumcodereview.appspot.com/14876023

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200702 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoBuild fix for quic_unittests.
dongseong.hwang@intel.com [Thu, 16 May 2013 22:10:07 +0000 (22:10 +0000)]
Build fix for quic_unittests.

-Werror=narrowing does not allow narrowing conversion of '0x96'
from 'int' to 'char' in quic_spdy_server_stream_test.cc. This
patch specifies that char constant as '\x96'.

R=wtc@chromium.org
BUG=none

Review URL: https://chromiumcodereview.appspot.com/14890028

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200639 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agonet: remove include_subdomains for square.com
agl@chromium.org [Thu, 16 May 2013 22:06:35 +0000 (22:06 +0000)]
net: remove include_subdomains for square.com

They realised that they can't do that yet.

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200637 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoFix command line handling in quic_server
rch@chromium.org [Thu, 16 May 2013 20:35:15 +0000 (20:35 +0000)]
Fix command line handling in quic_server

Review URL: https://chromiumcodereview.appspot.com/14896009

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200622 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoActually implement header compression for quic streams.
rch@chromium.org [Thu, 16 May 2013 20:20:17 +0000 (20:20 +0000)]
Actually implement header compression for quic streams.

R=rtenneti@chromium.org

Review URL: https://codereview.chromium.org/15042010

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200617 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agonet: add (*.)square.com to HSTS preloaded.
agl@chromium.org [Thu, 16 May 2013 17:50:50 +0000 (17:50 +0000)]
net: add (*.)square.com to HSTS preloaded.

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200569 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 days agoAdd SpdyMajorVersion enum and use it everywhere
akalin@chromium.org [Thu, 16 May 2013 17:43:42 +0000 (17:43 +0000)]
Add SpdyMajorVersion enum and use it everywhere

This is a bit more type-safe than just passing around ints.

Also add TODO for NPN->SpdyVersion conversion functions.

This lands server change 45485205.

R=rch@chromium.org

Review URL: https://codereview.chromium.org/14348010

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200568 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoMove AddMultipartValueForUpload to net/base/mime_util.h/cc.
grunell@chromium.org [Thu, 16 May 2013 12:59:18 +0000 (12:59 +0000)]
Move AddMultipartValueForUpload to net/base/mime_util.h/cc.

Moved from cloud print since it is used from several places. This was triggered by https://chromiumcodereview.appspot.com/14329020/ were there also is a discussion about this move.

BUG=229829
R=scottbyer@chromium.org, sky@chromium.org, wtc@chromium.org

Review URL: https://codereview.chromium.org/15076008

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200521 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoSimple Cache: Remove the wrong DCHECK.
pasko@chromium.org [Thu, 16 May 2013 12:53:02 +0000 (12:53 +0000)]
Simple Cache: Remove the wrong DCHECK.

When I added this DCHECK I was only thinking about the Android case, where we
should have nothing except net::DISK_CACHE as cache type, but the feature is
also useful to test on other platforms. Platform-conditional DCHECK is more ugly
than useful, so just remove it.

BUG=none

Review URL: https://chromiumcodereview.appspot.com/15171003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200520 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoLand Recent QUIC changes.
rtenneti@chromium.org [Thu, 16 May 2013 12:52:39 +0000 (12:52 +0000)]
Land Recent QUIC changes.

Stop versioning non crypto parameters by SCFG. This enables the server
to send different values for these parameters for same SCFG.

As a consequence the server sends the negotiated (authoritative) values
of these parameters in SHLO.

Merge internal change: 45655201

QUIC: make several magic values configurable.

This is half a change. The other half needs to alter server and so
I'll put it in a different CL.

This makes four magic values from the server handshake into parameters
of the server config. A future CL will be able to have the server set
them from it's SSL config protobuf.

Merge internal change: 45622443

QUIC: don't request a proof if the client doesn't have a ProofVerifier.

In order to support cert-less operation, this change alters the client
to not request a proof from the server if it doesn't have a
ProofVerifier configured. Without a ProofVerifier, the client will
simply do opportunistic encryption.

Merge internal change: 45614800

* Stop processing if the current packet closed the connection.
* Close the connection if invalid RST packet received (consistent with
  current behavior) -- UDP provides simple CRC.

Merge internal change: 45612040

Don't call ConnectionClose on ConnectionCloseFrame if visitor asked to
stop after processing ack frame.

Merge internal change: 45606025

Don't further process revived packet if visitor refuses the packet header.

Merge internal change: 45530388

Fix coding style nits.

Use "*sets" instead of "set" for arguments or variables of the
CommonCertSets type.

Merge internal change: 45523282

Added enum for write packet error.

Handling failed writes due to errors other than EAGAIN/EWOULDBLOCK I
don't know if this happens for us but might as well handle it.

Merge internal change: 45522400

Tear down the connection when there is a decompression error.

Merge internal change: 45521857

Bugfix infinite wait

Merge internal change: 45509285

Replaced number 3 with kSpdyVersion3.
Will work akalin to define and use SpdyMajorVersion enum and use it
everywhere.

This is a partial merge of internal change: 45485205

Removing an obselete TODO

Merge internal change: 45471987

Move QuicConfig out of QuicCryptoStream. The motivation behind this
change is to be able to select different values for QuicConfig
depending upon SNI (after we receive CHLO).

Merge internal change: 45434264

Limiting the number of FEC groups to 2

Merge internal change: 45425759

Closing connection on out of bounds packet.

Merge internal change: 45413532

Miscellaneous cleanup: add 'const', remove unneeded headers, and make
random minor fixes.

Document the CommonCertSets methods better.

Merge internal change: 45380570

Move FindMutualTag from CryptoUtils to QuicUtils. We will also use
this in version negotiation

Merge internal change: 45337156

Replacing CHECK-fails on address migration with graceful shutdown.

Added GetAddressFamily utility method. Added check for IPV4 in
WritePacket method QuicSocketUtils to copy the IPV4 self_address.

Merge internal change: 45306947

QUIC - Negotiate max open streams.

Added QuicClientSessionPeer to access QuicConfig in QuicClientSession.

Merge internal change: 45233402

Allow retransmitting packets that are retransmissions when we get trucated acks.

Merge internal change: 45233252

Reduce connection timeout till crypto handshake is finished to 1min.

Merge internal change: 45232483

R=rch@chromium.org

Review URL: https://chromiumcodereview.appspot.com/15074007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200519 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoAdd unit tests for WebSocket GetKeyNumber()
ricea@chromium.org [Thu, 16 May 2013 07:38:22 +0000 (07:38 +0000)]
Add unit tests for WebSocket GetKeyNumber()

Add unit tests for GetKeyNumber() in websocket_handshake_handler.cc.

BUG=240226

Review URL: https://chromiumcodereview.appspot.com/14842017

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200480 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoMerge SpdyProxyClientSocket unittests.
ttuttle@chromium.org [Thu, 16 May 2013 03:39:37 +0000 (03:39 +0000)]
Merge SpdyProxyClientSocket unittests.

Now that we've got the proper subset of functions merged into SpdyTestUtil,
merge spdy_proxy_client_socket_spdy[23]_unittest into a single unittest.

BUG=226192

Review URL: https://chromiumcodereview.appspot.com/14772037

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200434 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoCleanup: Remove unneeded base/file_util.h includes in chrome_frame, courgette, ipc...
thestig@chromium.org [Thu, 16 May 2013 02:37:50 +0000 (02:37 +0000)]
Cleanup: Remove unneeded base/file_util.h includes in chrome_frame, courgette, ipc, media, and net.

Review URL: https://chromiumcodereview.appspot.com/14820034

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200419 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days ago[SPDY] Strengthen checks in SpdyStream::DoSendBody()
akalin@chromium.org [Wed, 15 May 2013 22:18:07 +0000 (22:18 +0000)]
[SPDY] Strengthen checks in SpdyStream::DoSendBody()

This is to narrow down the cause of the flow control bug below.

BUG=238429

Review URL: https://chromiumcodereview.appspot.com/14997010

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200369 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoAdd HttpCache.ReadError* histograms.
gavinp@chromium.org [Wed, 15 May 2013 22:00:36 +0000 (22:00 +0000)]
Add HttpCache.ReadError* histograms.

Use sparse histograms to track causes of errors in cache reads. At the same
time, expand error reporting in SimpleCache.

This is intended to help track down transient read errors in the simple cache,
but may be useful on other backends as well.

R=pasko@chromium.org,felipeg,rvargas
BUG=239223

Review URL: https://chromiumcodereview.appspot.com/14750008

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200363 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agonet: Return LoadTiming information in the case of a cache hit.
mmenke@chromium.org [Wed, 15 May 2013 21:33:25 +0000 (21:33 +0000)]
net:  Return LoadTiming information in the case of a cache hit.
If the request went over the wire before headers were returned,
return information about the last over the wire request.  Otherwise,
set send times to be when the cache entry was opened, and
receive_header_start to be when the headers were read.

BUG=239842

Review URL: https://chromiumcodereview.appspot.com/14625012

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200356 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoMerge framer-based Construct* functions to SpdyTestUtil
ttuttle@chromium.org [Wed, 15 May 2013 21:29:20 +0000 (21:29 +0000)]
Merge framer-based Construct* functions to SpdyTestUtil

Merge several of the Construct* functions that just call through into the
framer into SpdyTestUtil.

BUG=226192

Review URL: https://chromiumcodereview.appspot.com/15112006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200353 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoRe-enable CertDatabaseNSSTest.TrustIntermediateCA{2,3} on Linux/CrOS for NSS 3.15+
rsleevi@chromium.org [Wed, 15 May 2013 21:17:16 +0000 (21:17 +0000)]
Re-enable CertDatabaseNSSTest.TrustIntermediateCA{2,3} on Linux/CrOS for NSS 3.15+

The test failures were related to a bug introduced in NSS 3.14.2, fixed in NSS
3.15. Make these tests run only for NSS >= 3.15.

BUG=224612
R=wtc

Review URL: https://chromiumcodereview.appspot.com/15047007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200349 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoIf HostResolver::Request completes with OK, the AddressList is not empty. Previously...
mef@chromium.org [Wed, 15 May 2013 21:05:11 +0000 (21:05 +0000)]
If HostResolver::Request completes with OK, the AddressList is not empty. Previously committed CL https://codereview.chromium.org/14760008/ ensures that, so unnecessary checks are now removed.

BUG=126211
TEST=All existing tests still pass.

Reviewers:
szym@chromium.org - overall
mmenke@chromium.org - chrome/browser/net/network_stats.cc
sergeyu@chromium.org - content/browser/renderer_host/p2p/socket_dispatcher_host.cc

Review URL: https://chromiumcodereview.appspot.com/14715016

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200348 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days ago[SPDY] Add in_do_loop_ sentinel variable to SpdyStream
akalin@chromium.org [Wed, 15 May 2013 20:46:59 +0000 (20:46 +0000)]
[SPDY] Add in_do_loop_ sentinel variable to SpdyStream

This is to catch quickly cases where the delegate tries to close the
SpdyStream while it's being called by the SpdyStream.

Fix a test that triggers this check.

BUG=238429

Review URL: https://chromiumcodereview.appspot.com/15187002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200345 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days ago[SPDY] Make DoSend{DomainBoundCert,Body}Complete() take a result parameter
akalin@chromium.org [Wed, 15 May 2013 20:46:19 +0000 (20:46 +0000)]
[SPDY] Make DoSend{DomainBoundCert,Body}Complete() take a result parameter

r194127 erroneously made the code assume that DoSend{DomainBoundCert,Body}()
would always return OK or ERR_IO_PENDING.

DoSendHeadersComplete() is okay as-is since DoSendHeaders()
always returns ERR_IO_PENDING.

BUG=238429

Review URL: https://chromiumcodereview.appspot.com/14990016

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200344 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days ago[SPDY] Incorporate latest framing changes from HTTP2 into SPDY 4 as SPDY 4a2.
akalin@chromium.org [Wed, 15 May 2013 20:42:36 +0000 (20:42 +0000)]
[SPDY] Incorporate latest framing changes from HTTP2 into SPDY 4 as SPDY 4a2.
Removes support for SPDY 4a1.

Remove --enable-spdy4 flag for now (until we get test
coverage).

This lands server change 45362310.

BUG=230124
TBR=jam@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14189003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200342 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoSet encryption_established_ to true in QuicCryptoClientStream before calling OnCrypto...
rch@chromium.org [Wed, 15 May 2013 17:04:39 +0000 (17:04 +0000)]
Set encryption_established_ to true in QuicCryptoClientStream before calling OnCryptoHandshakeEvent of the session.

Merge internal change: 46625931

Review URL: https://chromiumcodereview.appspot.com/15021018

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200302 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoSwitch SimpleEntryImpl to use GetDataSize() rather than read data_size_ directly.
gavinp@chromium.org [Wed, 15 May 2013 16:48:11 +0000 (16:48 +0000)]
Switch SimpleEntryImpl to use GetDataSize() rather than read data_size_ directly.

A few functions were mixing these two (equivelent) methods of reading
the data size of an entry. To reduce confusion, just switch everything
to use the method.

R=pasko@chromium.org,felipeg
BUG=None

Review URL: https://chromiumcodereview.appspot.com/14632008

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200299 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 days agoServerBoundCertService: use different certs for subdomains of "private registries".
mattm@chromium.org [Wed, 15 May 2013 16:28:59 +0000 (16:28 +0000)]
ServerBoundCertService: use different certs for subdomains of "private registries".

BUG=129174

Review URL: https://chromiumcodereview.appspot.com/14997013

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200290 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoClean up local functions in spdy_test_util_spdy[23]
ttuttle@chromium.org [Wed, 15 May 2013 04:50:34 +0000 (04:50 +0000)]
Clean up local functions in spdy_test_util_spdy[23]

Some are no longer needed now that we've moved the functions that use them
into SpdyTestUtil, and we are getting rid of the ConstructSpdyControlFrame
variant that doesn't take an associated stream ID.

BUG=226192

Review URL: https://chromiumcodereview.appspot.com/14861014

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200159 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoBypass data reduction proxy on receipt of a 500 response code
bengr@chromium.org [Wed, 15 May 2013 04:32:00 +0000 (04:32 +0000)]
Bypass data reduction proxy on receipt of a 500 response code

BUG=238844

Review URL: https://chromiumcodereview.appspot.com/14865009

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200153 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days ago[SPDY] Make SpdyStream not ref-counted
akalin@chromium.org [Tue, 14 May 2013 23:13:48 +0000 (23:13 +0000)]
[SPDY] Make SpdyStream not ref-counted

Add a bunch of functions to SpdyStream to help manage
stream ownership.

Reduce the number of active_streams_ lookups in SpdyStream.

Make SpdyStream::~SpdyStream() non-virtual.

BUG=178943
R=rch@chromium.org

Review URL: https://codereview.chromium.org/15129003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200101 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoAdd support for split Public Suffix List distinctions.
nyquist@chromium.org [Tue, 14 May 2013 20:49:29 +0000 (20:49 +0000)]
Add support for split Public Suffix List distinctions.

This adds support for the private additions to the Public Suffix List.

* Since net::RegistryControlledDomainService only contained static methods, this
  CL changes these methods to be contained within the namespace
  net::registry_controlled_domains and removes the class entirely.
* All methods defined as part of net::registry_controlled_domains now
  have a mandatory argument to specify whether the private registries
  should be included.
* Since the old implementation did not take into account the private
  registries, this sets all old callers to use EXCLUDE_PRIVATE as the
  net::registry_controlled_domains::PrivateRegistryFilter argument.
* Changes the parameter for including unknown registries or not to be an enum
  instead of a boolean, using a similar naming scheme as for the private
  registries: net::registry_controlled_domains::UnknownRegistryFilter.
* This also updates the effective-TLD data file to:
  45cfff9c781f 2013-04-23 11:51 +0100
  It includes changes from a number of Mozilla bugs, listed on
  https://hg.mozilla.org/mozilla-central/log/45cfff9c781f/netwerk/dns/effective_tld_names.dat
  between 290afd57d2a8 (2012-07-04 16:08 +0100) and
  45cfff9c781f (2013-04-23 11:51 +0100).

Patch set 1 is equal to the committed patch set from:
https://codereview.chromium.org/13979002/

TBRing OWNERs from original CL.

TBR=pam@chromium.org
BUG=37436, 96086

Review URL: https://codereview.chromium.org/15140003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200066 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoMerge ConstructSpdyControlFrame into SpdyTestUtil.
ttuttle@chromium.org [Tue, 14 May 2013 19:32:23 +0000 (19:32 +0000)]
Merge ConstructSpdyControlFrame into SpdyTestUtil.

BUG=226192

Review URL: https://chromiumcodereview.appspot.com/14975006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@200045 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days ago[SPDY] Make SpdyWriteQueue use WeakPtrs and not scoped_refptrs for SpdyStream
akalin@chromium.org [Tue, 14 May 2013 05:51:44 +0000 (05:51 +0000)]
[SPDY] Make SpdyWriteQueue use WeakPtrs and not scoped_refptrs for SpdyStream

Add check that the SpdyStream remains non-NULL while its
in the SpdyWriteQueue.

Make ActivateStream() take a scoped_refptr<> and make it do
a single map loop.

Make SpdyStream functions use SpdyStream::GetWeakPtr().

BUG=178943

Review URL: https://chromiumcodereview.appspot.com/15102014

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199930 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoRemove redundant reset() call on WebSocket response parser
tyoshino@chromium.org [Tue, 14 May 2013 05:50:35 +0000 (05:50 +0000)]
Remove redundant reset() call on WebSocket response parser

Review URL: https://chromiumcodereview.appspot.com/15133002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199928 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoRevert r187343
rsleevi@chromium.org [Tue, 14 May 2013 01:14:54 +0000 (01:14 +0000)]
Revert r187343

http://crrev.com/187343 added debugging information to track down
http://crbug.com/96594. However, that debugging information is not actively
being used and only adds spam to logs.

BUG=96594

Review URL: https://chromiumcodereview.appspot.com/14758010

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199882 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoMake SpdySessions implement LayeredPool and hook them up
mmenke@chromium.org [Tue, 14 May 2013 01:07:03 +0000 (01:07 +0000)]
Make SpdySessions implement LayeredPool and hook them up
to their parent socket pool as, so they can be closed when
they're idle and the parent pool is stalled.

BUG=92244

Review URL: https://chromiumcodereview.appspot.com/14473012

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199880 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoRename names of queues in CookieMonster to less confusing ones.
tyoshino@chromium.org [Tue, 14 May 2013 00:53:55 +0000 (00:53 +0000)]
Rename names of queues in CookieMonster to less confusing ones.

Tasks waiting for the entire cookie store to be loaded
queue_ -> tasks_pending_

Tasks waiting for cookies for a specific domain key to be loaded
tasks_queued_ -> tasks_pending_for_key_

Review URL: https://chromiumcodereview.appspot.com/14752015

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199875 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoUse Persistent::Reset.
marja@chromium.org [Mon, 13 May 2013 20:16:25 +0000 (20:16 +0000)]
Use Persistent::Reset.

This gets rid of more places where Persistent handles are copied
(see bug).

BUG=236290
TBR=cbenzel@chromium.org
TBR=eroman@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14746011

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199809 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoDon't call SSL read/write callbacks after an SSL socket is deleted
rsleevi@chromium.org [Mon, 13 May 2013 20:05:25 +0000 (20:05 +0000)]
Don't call SSL read/write callbacks after an SSL socket is deleted

BUG=232633
R=wtc

Review URL: https://chromiumcodereview.appspot.com/14981005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199806 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoRevert 199771 "Add support for split Public Suffix List distinct..."
nyquist@chromium.org [Mon, 13 May 2013 18:33:30 +0000 (18:33 +0000)]
Revert 199771 "Add support for split Public Suffix List distinct..."

> Add support for split Public Suffix List distinctions.
>
> This adds support for the private additions to the Public Suffix List.
>
> * Since net::RegistryControlledDomainService only contained static methods, this
>   CL changes these methods to be contained within the namespace
>   net::registry_controlled_domains and removes the class entirely.
> * All methods defined as part of net::registry_controlled_domains now
>   have a mandatory argument to specify whether the private registries
>   should be included.
> * Since the old implementation did not take into account the private
>   registries, this sets all old callers to use EXCLUDE_PRIVATE as the
>   net::registry_controlled_domains::PrivateRegistryFilter argument.
> * Changes the parameter for including unknown registries or not to be an enum
>   instead of a boolean, using a similar naming scheme as for the private
>   registries: net::registry_controlled_domains::UnknownRegistryFilter.
> * This also updates the effective-TLD data file to:
>   45cfff9c781f 2013-04-23 11:51 +0100
>   It includes changes from a number of Mozilla bugs, listed on
>   https://hg.mozilla.org/mozilla-central/log/45cfff9c781f/netwerk/dns/effective_tld_names.dat
>   between 290afd57d2a8 (2012-07-04 16:08 +0100) and
>   45cfff9c781f (2013-04-23 11:51 +0100).
>
> BUG=37436,96086
> R=brettw@chromium.org, erikwright@chromium.org, pam@chromium.org, rsleevi@chromium.org, sky@chromium.org
>
> Review URL: https://codereview.chromium.org/13979002

TBR=nyquist@chromium.org

Review URL: https://codereview.chromium.org/14767028

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199774 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoAdd support for split Public Suffix List distinctions.
nyquist@chromium.org [Mon, 13 May 2013 18:12:48 +0000 (18:12 +0000)]
Add support for split Public Suffix List distinctions.

This adds support for the private additions to the Public Suffix List.

* Since net::RegistryControlledDomainService only contained static methods, this
  CL changes these methods to be contained within the namespace
  net::registry_controlled_domains and removes the class entirely.
* All methods defined as part of net::registry_controlled_domains now
  have a mandatory argument to specify whether the private registries
  should be included.
* Since the old implementation did not take into account the private
  registries, this sets all old callers to use EXCLUDE_PRIVATE as the
  net::registry_controlled_domains::PrivateRegistryFilter argument.
* Changes the parameter for including unknown registries or not to be an enum
  instead of a boolean, using a similar naming scheme as for the private
  registries: net::registry_controlled_domains::UnknownRegistryFilter.
* This also updates the effective-TLD data file to:
  45cfff9c781f 2013-04-23 11:51 +0100
  It includes changes from a number of Mozilla bugs, listed on
  https://hg.mozilla.org/mozilla-central/log/45cfff9c781f/netwerk/dns/effective_tld_names.dat
  between 290afd57d2a8 (2012-07-04 16:08 +0100) and
  45cfff9c781f (2013-04-23 11:51 +0100).

BUG=37436,96086
R=brettw@chromium.org, erikwright@chromium.org, pam@chromium.org, rsleevi@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/13979002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199771 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoOverride server-side simple-cache trial with commandline switches.
pasko@google.com [Mon, 13 May 2013 12:37:44 +0000 (12:37 +0000)]
Override server-side simple-cache trial with commandline switches.

FIXING broken about:flags for simple cache on Android.

Until recently we used a trick to avoid dedicated global settings in
net::disk_cache other than the objects belonging to the infrastructure of the
trials. The commandline flag would change the experiment group on the chromium
side, while one the net/ side we would check which group we belong to.

Later we decided to switch to the server-controlled experiments. This went into
a conflict with our approach: the server-controlled experiment would override
the settings set by the command-line option. This is unfortunate.

Stevet@ suggests that there are plans to avoid overriding the experiment groups
by the server config, but in the meantime the trick stops working.

Solve this by adding backend type enum provided at backend instantiation.

TBR=jam@chromium.org
BUG=239461

Review URL: https://chromiumcodereview.appspot.com/14828004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199708 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days ago[SPDY] Make sure final SpdyStream references are held by SpdySession
akalin@chromium.org [Mon, 13 May 2013 08:48:28 +0000 (08:48 +0000)]
[SPDY] Make sure final SpdyStream references are held by SpdySession

This will make it much easier to avoid use-after-free bugs when we
make SpdyStream not ref-counted.

Expose only WeakPtr<SpdyStream> objects outside of SpdySession
and SpdyWriteQueue.

Introduce SpdySession::DeleteStreamRefs, which takes a pointer to the last
scoped_refptr to that stream and serves as its destructor.

Fix a lot of dangling SpdyStream references in tests.

Remove SpdyStream::cancelled(), as a stream now guaranteed to be
deleted when cancelled.

Split SpdyStreamRequest::OnRequestComplete() into
OnRequestComplete{Success,Failure}().

BUG=178943

Review URL: https://chromiumcodereview.appspot.com/14812007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199688 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoDetailed SimpleCache histograms tracking read/write failures.
gavinp@chromium.org [Mon, 13 May 2013 06:12:00 +0000 (06:12 +0000)]
Detailed SimpleCache histograms tracking read/write failures.

By tracking the exact causes of failures, we can better field debug problems
occuring occasionally in trials.

BUG=239223
R=felipeg,pasko-chromium,rdsmith,isherman@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14874010

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199666 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoHave media gallery (through native media file util) use MIME sniffer
krb@chromium.org [Sat, 11 May 2013 00:21:09 +0000 (00:21 +0000)]
Have media gallery (through native media file util) use MIME sniffer
to verify all media files before allowing user to open them.

BUG=171753

Review URL: https://chromiumcodereview.appspot.com/12703012

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199587 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days ago[SPDY] Make SpdySession::ResetStream take a RequestPriority parameter
akalin@chromium.org [Fri, 10 May 2013 23:57:07 +0000 (23:57 +0000)]
[SPDY] Make SpdySession::ResetStream take a RequestPriority parameter

This lets us use the correct priority when the stream isn't created yet:
in particular, when we have just received a SYN_STREAM frame.

Also call ResetStream() from OnStreamError() even if the stream isn't
known (as IDLE priority).

In other cases, we already have a reference to the stream itself, so that saves
an extra ref-count increment/decrement.

Refactored SpdySession::OnWindowUpdate() to handle session
and stream window updates separately.

BUG=178943
R=rch@chromium.org

Review URL: https://codereview.chromium.org/14883005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199578 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoClean up QuicNetworkTransactionTest
rch@chromium.org [Fri, 10 May 2013 23:45:19 +0000 (23:45 +0000)]
Clean up QuicNetworkTransactionTest

BUG=

Review URL: https://chromiumcodereview.appspot.com/14969015

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199572 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoDeflake SimpleCache reads when multiple operations in flight.
gavinp@chromium.org [Fri, 10 May 2013 22:39:39 +0000 (22:39 +0000)]
Deflake SimpleCache reads when multiple operations in flight.

When multiple Reads/Writes are in flight, they can race each other for
updates to the size of the entry. By moving the updates to coincide
with the beginning of the blocking operation, we remove flakes.

Unit tests still require that reads can fast fail; but not while
operations are pending (they use the single operation interface), so
we still pass unit tests with the tighter (and actually correct)
behaviour that we only fast fail when no other operations are pending.

R=pasko@chromium.org,felipeg,rdsmith,pliard
BUG=239223

Review URL: https://chromiumcodereview.appspot.com/15085016

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199559 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoRevert 199535 "Add GetFullRequestHeaders, from URLRequestJob to ..."
ttuttle@chromium.org [Fri, 10 May 2013 22:02:40 +0000 (22:02 +0000)]
Revert 199535 "Add GetFullRequestHeaders, from URLRequestJob to ..."

> Add GetFullRequestHeaders, from URLRequestJob to HttpNetworkTransaction.
>
> Dev Tools displays the raw request and response headers.  Right now, it gets
> them by snarfing them out of the NetLog, which is bad, as the NetLog is for
> huamn consumption only.  I'm trying to refactor the DevToolsNetLogObserver
> away; providing an alternate, supported path to get the request headers is the
> first step.
>
> BUG=196304
> TEST=added to URLRequest, HttpTransaction, and HttpNetworkTransaction unittests
>
> Review URL: https://chromiumcodereview.appspot.com/12621011

TBR=ttuttle@chromium.org

Review URL: https://codereview.chromium.org/15054003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199553 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoAdd GetFullRequestHeaders, from URLRequestJob to HttpNetworkTransaction.
ttuttle@chromium.org [Fri, 10 May 2013 21:08:50 +0000 (21:08 +0000)]
Add GetFullRequestHeaders, from URLRequestJob to HttpNetworkTransaction.

Dev Tools displays the raw request and response headers.  Right now, it gets
them by snarfing them out of the NetLog, which is bad, as the NetLog is for
huamn consumption only.  I'm trying to refactor the DevToolsNetLogObserver
away; providing an alternate, supported path to get the request headers is the
first step.

BUG=196304
TEST=added to URLRequest, HttpTransaction, and HttpNetworkTransaction unittests

Review URL: https://chromiumcodereview.appspot.com/12621011

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199535 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoAdd NEWCACHE method to IndexInitializeMethod histogram.
gavinp@chromium.org [Fri, 10 May 2013 10:05:26 +0000 (10:05 +0000)]
Add NEWCACHE method to IndexInitializeMethod histogram.

UMA histograms don't distinguish creating a new cache from rebuilding a new index due to a preexisting stale or corrupt index. This means that it's difficult to see how often the cache is restoring with a bad index, vs a new cache being created; and since lots of users start up the new simple backend everyday, we can't track bad indexes.

This is not great; index restore/rebuild is slow, and we want to make sure it happens very rarely in practice.

This adds a new value to the INITIALIZE_METHOD, so we can separate new caches from rebuilding indexes in existing caches.

As well, we track how many entries are in our new index. This isn't expected to always be zero, since entries can be created asynchronously while or before the index is rebuilding. But it does provide a sanity check in case index files are being erased (not expected), as large values would show we're sometimes missing index files on mature caches.

R=stevet,asvitkine@chromium.org
BUG=None

Review URL: https://chromiumcodereview.appspot.com/14890014

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199447 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoHistograms tracking index writing on SimpleCache.
gavinp@chromium.org [Fri, 10 May 2013 07:44:22 +0000 (07:44 +0000)]
Histograms tracking index writing on SimpleCache.

We're planning on having a background/foreground distinction on index
writes, and we want to propogate that distinction to the histograms as
it's a key input to figuring out how to keep the simple index fresh.

R=pasko,isherman@chromium.org,rkaplow
BUG=233536

Review URL: https://chromiumcodereview.appspot.com/14792003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199415 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoSave 'url.path()' in a local variable to avoid a use-after-free.
jorgelo@chromium.org [Fri, 10 May 2013 06:24:29 +0000 (06:24 +0000)]
Save 'url.path()' in a local variable to avoid a use-after-free.

BUG=239580
TEST=Does not repro on an ASan build.

Review URL: https://chromiumcodereview.appspot.com/14959011

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199404 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days ago[net/dns] Fix how DnsTransaction computes next server index after fallback.
szym@chromium.org [Fri, 10 May 2013 06:15:51 +0000 (06:15 +0000)]
[net/dns] Fix how DnsTransaction computes next server index after fallback.

BUG=239657
TEST=net_unittests --gtest_filter=DnsTransactionTest.ServerFallbackAndRotate

Review URL: https://chromiumcodereview.appspot.com/14676012

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199402 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoQUIC - Added NetLog's Logging test to quic_network_transaction_unittest.cc.
rtenneti@chromium.org [Fri, 10 May 2013 05:55:26 +0000 (05:55 +0000)]
QUIC - Added NetLog's Logging test to quic_network_transaction_unittest.cc.
Deleted the DISABLED Logging test from quic_client_session_test.cc.

Added code for MockUDPClientSocket::GetLocalAddress.

R=rch@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14614006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199394 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoTimeout HTTP proxy connect jobs faster on iOS
bengr@chromium.org [Fri, 10 May 2013 03:48:06 +0000 (03:48 +0000)]
Timeout HTTP proxy connect jobs faster on iOS

BUG=239514

Review URL: https://chromiumcodereview.appspot.com/14969011

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199363 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoUpdate WebSocket OWNERS files with latest status of developers.
tyoshino@chromium.org [Fri, 10 May 2013 03:17:44 +0000 (03:17 +0000)]
Update WebSocket OWNERS files with latest status of developers.

NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/15085005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199356 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoMerge ConstructSpdyFrame into SpdyTestUtil
ttuttle@chromium.org [Fri, 10 May 2013 02:53:05 +0000 (02:53 +0000)]
Merge ConstructSpdyFrame into SpdyTestUtil

Merge the two forms of ConstructSpdyFrame from spdy_test_util_spdy2/3 into
SpdyTestUtil and update tests to use the shared version.

BUG=226192

Review URL: https://chromiumcodereview.appspot.com/15077005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199346 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoRandomize proxy timeout on Android over a range.
bengr@chromium.org [Thu, 9 May 2013 22:21:06 +0000 (22:21 +0000)]
Randomize proxy timeout on Android over a range.

BUG=237876

Review URL: https://chromiumcodereview.appspot.com/14864016

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199288 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoSSLClientSocketNSS should expect and properly handle when the
rsleevi@chromium.org [Thu, 9 May 2013 21:51:27 +0000 (21:51 +0000)]
SSLClientSocketNSS should expect and properly handle when the
underlying transport socket synchronously returns an
unexpected error, such as an unclean socket shutdown.

BUG=238536
R=wtc

Review URL: https://chromiumcodereview.appspot.com/14963009

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199277 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoRename the embedded test server to EmbeddedTestServer in net::test_server namespace.
phajdan.jr@chromium.org [Thu, 9 May 2013 17:00:26 +0000 (17:00 +0000)]
Rename the embedded test server to EmbeddedTestServer in net::test_server namespace.

This is a part of replacing most usages of the Python test server
with an in-process C++ test server that should be easier to debug.

BUG=96594
R=rch@chromium.org

Review URL: https://codereview.chromium.org/15069003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199229 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoFix DiskCacheBackendTest.SimpleCacheSetSize.
gavinp@chromium.org [Thu, 9 May 2013 13:22:31 +0000 (13:22 +0000)]
Fix DiskCacheBackendTest.SimpleCacheSetSize.

Added a maximum file size feature to the simple cache backend.

R=rvargas,pasko,felipeg
BUG=None

Review URL: https://chromiumcodereview.appspot.com/14510004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199209 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoLand Recent QUIC changes
rtenneti@chromium.org [Thu, 9 May 2013 12:29:33 +0000 (12:29 +0000)]
Land Recent QUIC changes

QUIC: use QuicTag/QuicTagVector throughout.

crypto_protocol.h has had CryptoTag and CryptoTagVector. Then quic_protocol.h
got QuicVersionTag and QuicVersionTagList because it didn't want to depend on
crypto_protocol.h

This change uses a single QuicTag and QuicTagVector throughout the code,
including the crypto code.

Merge internal change: 45230337

QUIC: move random values to the beginning and the certifiate chain to the end.

jar suggested that the certificate chain should have a tag that will cause it
to be sorted at the end of any handshake messages because it's likely to be
large and the client might be able to get everything that it needs from the
small values at the beginning.

Likewise he argued that tags with random values should be towards the beginning
of the message because the server mightn't hold state for a rejected client
hello and therefore the client may have issues reassembling the rejection
message in the event that it sent two client hellos.

This change tweaks the tag values to achieve that ordering.

Merge internal change: 45228375

Removing obselete TODOs

Merge internal change: 45219448

Use the idle connection state timeout negotiated in crypto handshake.

Merge internal change: 45176251

QUIC: address wtc's followup comments on cl/44792710.

This change addresses wtc's comments on cl/44792710. There should be no
semantic differences.

Merge internal change: 45051718

QUIC - Fixed HasRetransmittableData enum to have the correct values.

Fixed comments from rch

Merge internal change: 45143336

Change the QUIC version number to a new value which is amenable to frequent i ncrementing.

Merge internal change: 45111687

QUIC: run clang-format over .../quic/crypto.

I ran:
  for x in $(ls -1 *.cc *.h) ; do clang-format -i $x -style Google; echo $x;
done

And then used git add -p to manually review the changes. In the cases where I
didn't care, I went with what the tool produced.

Merge internal change: 45053104

QUIC: address wtc's followup comments on cl/44792710.

This change addresses wtc's comments on cl/44792710. There should be no
semantic differences.

Merge internal change: 45051718

Minor cleanup of ReliableQuicStreamTest output. Also change MockConnection to create a NiceMock version of the Helper to avoid annoying GMock messages.

Merge internal change: 45010564

QUIC: partly deflake EndToEndTest.LargePost

Since cl/44690884, some runs of this test have timed out. Everything
appears to be working ok, just not fast enough. It's possible that the
additional packet `losses' caused by decryption failures when we lose
the client hello are convincing the congestion control that the loss
rate is very high.

However, since I have a trip to NIST this week, this change removes the
flake by reverting a tiny part of cl/44690884.

Sadly there is another flake in the test which this CL doesn't fix.
Details in the bug.

Merge internal change: 45008247

Fix a bug in QUIC header compression handling where buffered headers were not handled properly.

Merge internal change: 45007035

QUIC: tiny test cleanup.

wtc suggested this in a post-submission comment.

Merge internal change: 44898354

QUIC: add expiry to server configs and have the GFE generate random server configs.

Server configs need an expiry because they are effectively certificates. This
change has the GFE generate server configs with the same expiry as the primary
certificate.

It also switches the GFE to generating random server configs at startup.
(Random in the sense of random keys and orbit values.)

Originally I wanted to have the server config persist over a restart and so
derived them, deterministically, from the primary, private key with a todo to
diversify the orbit. However, since we don't have any shared strike registers
at the moment that doesn't seem to be worth the complexity. Also, figuring out
how to diversify the orbit value in a per-GFE sense is really messy (include
the hostname? include the port? Which port?). So this CL goes for simple and
secure.

Merge internal change: 44898035

QUIC: use 24-bit lengths for public values.

If ideal lattices don't work out then we may end up with Diffie-Hellman public
values that are larger than 16-bits. (Hopefully not, but you never know.)

Merge internal change: 44897191

QUIC: have the client echo the server's nonce.

This reflects a comment from wtc previously that this would be a good idea.

Merge internal change: 44896699

QUIC: steps 12 and 13, forward secure mode.

Merge internal change: 44896363

Fix LOG(DFATAL) when client sends invalid stream frame with fin.

Merge internal change: 44871764

R=rch@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14816006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199190 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoDon't access the server bound cert service from the SSL worker thread
rsleevi@chromium.org [Thu, 9 May 2013 12:28:25 +0000 (12:28 +0000)]
Don't access the server bound cert service from the SSL worker thread

BUG=236457
R=wtc

Review URL: https://chromiumcodereview.appspot.com/14777004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199189 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoDisable SSL3 fallback restriction on Google properties
thaidn@google.com [Thu, 9 May 2013 11:33:22 +0000 (11:33 +0000)]
Disable SSL3 fallback restriction on Google properties

Instead of reverting http://crrev.com/195335, this CL will disable
the changes introduced in that CL.

BUG=237055

Review URL: https://chromiumcodereview.appspot.com/14759024

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199185 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoAdd Mime type sniffing for Office documents
zork@chromium.org [Thu, 9 May 2013 11:33:03 +0000 (11:33 +0000)]
Add Mime type sniffing for Office documents

BUG=238522

Review URL: https://chromiumcodereview.appspot.com/14754004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199184 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days ago[Memory Sheriff] Fix a leak of MockAsyncResolverBase.
groby@chromium.org [Thu, 9 May 2013 09:52:44 +0000 (09:52 +0000)]
[Memory Sheriff] Fix a leak of MockAsyncResolverBase.

It seems like we were leaking the proxy resolver created in
URLRequestFtpJobTest.FtpProxyRequestOrphanJob.

The original call to set_proxy_service went directly to the request context,
and bypassed the context storage. And URLRequestContext does not take ownership
of the pointers passed in, so that would leak.

After this patch, context_storage_ takes ownership of the proxy service and
cleans up.

TBR=thestig@chromium.org,phajdan@chromium.org
R=mmenke@chromium.org

BUG=238339

Review URL: https://chromiumcodereview.appspot.com/14686008

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199177 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoGracefully handle requests for server bound certs on taskrunner shutdown
rsleevi@chromium.org [Thu, 9 May 2013 07:07:42 +0000 (07:07 +0000)]
Gracefully handle requests for server bound certs on taskrunner shutdown

BUG=236387
R=mattm

Review URL: https://chromiumcodereview.appspot.com/14636010

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199157 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoAdded JNI method to allow java code parse the scheme from a url string using GURL.
apiccion@chromium.org [Thu, 9 May 2013 03:49:48 +0000 (03:49 +0000)]
Added JNI method to allow java code parse the scheme from a url string using GURL.

BUG=223930

Review URL: https://chromiumcodereview.appspot.com/14614005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199096 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoRemove inside_chromium_build gyp variable
jamesr@chromium.org [Wed, 8 May 2013 23:52:44 +0000 (23:52 +0000)]
Remove inside_chromium_build gyp variable

In the days of olde, we supported compiling from inside a chromium checkout and
inside a WebKit checkout with some chromium libraries. In the latter configuration,
used mainly by the build.webkit.org bots, the paths to the WebKit headers relative
to chromium gyp files was different. This added a lot of complexity and some extra
scripts to fix up paths and includes. Blink only supports building within a chromium
checkout so all of this complexity can be removed.

Review URL: https://chromiumcodereview.appspot.com/14823005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199057 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoCreate SpdyTestUtil and add first two methods
ttuttle@chromium.org [Wed, 8 May 2013 22:56:07 +0000 (22:56 +0000)]
Create SpdyTestUtil and add first two methods

To merge our currently-separate _spdy[23] unittests, I'm writing a class that
will eventually contain all of the helper functions (e.g. ConstructSpdyFrame)
that are currently duplicated across spdy_test_util_spdy[23].h.

This change creates the class and merges the first two functions
(Construct{Get,Post}HeaderBlock) into it.  It updates tests that use those
functions to create a SpdyTestUtil object and call the method, and updates the
original spdy2/spdy3 versions (which are still used internally within
spdy_test_util_spdy[23].cc) to call a SpdyTestUtil declared inside that file.

BUG=226192

Review URL: https://chromiumcodereview.appspot.com/14688016

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199033 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoMove static functions in WebSocketJobTest into namespace net
ttuttle@chromium.org [Wed, 8 May 2013 21:13:49 +0000 (21:13 +0000)]
Move static functions in WebSocketJobTest into namespace net

Instead of using net:: dozens of times, just move the static bits before the
test into the net namespace as well.

BUG=226192

Review URL: https://chromiumcodereview.appspot.com/14853005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@199001 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoAdd a DeterministicMockUDPClientSocket.
rch@chromium.org [Wed, 8 May 2013 18:02:40 +0000 (18:02 +0000)]
Add a DeterministicMockUDPClientSocket.
Factor out the shared code between the deterministic TCP and UDP client sockets into a DeterministicSocketHelper.

Review URL: https://chromiumcodereview.appspot.com/14796009

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198935 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoRemove DiskCacheEntryTest.SimpleCacheBuffering.
gavinp@chromium.org [Wed, 8 May 2013 16:23:44 +0000 (16:23 +0000)]
Remove DiskCacheEntryTest.SimpleCacheBuffering.

This test doesn't make sense on the simple cache, as it lacks the same
concept of buffering used in the standard cache.

R=rvargas,pasko,felipeg
BUG=None

Review URL: https://chromiumcodereview.appspot.com/14219005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198923 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoRemoved static factories for data, ftp, file, and about jobs.
pauljensen@chromium.org [Wed, 8 May 2013 16:04:34 +0000 (16:04 +0000)]
Removed static factories for data, ftp, file, and about jobs.
Instead add corresponding ProtocolHandlers as needed.
Remove URLRequestContext members used by these static
factories.  Bake FtpAuthCache into FtpProtocolHandler as it
was already unique per FtpProtocolHandler.
This is a revived version of http://crrev.com/10836206

BUG=142945

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188912

Review URL: https://chromiumcodereview.appspot.com/11931024

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198915 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoRevert 198820 "Move FileEnumerator to its own file, do some refa..."
dbeam@chromium.org [Wed, 8 May 2013 05:46:20 +0000 (05:46 +0000)]
Revert 198820 "Move FileEnumerator to its own file, do some refa..."

Broke both windows clobber and official builders' compile with this error:

771>Link:
771>     Creating library ..\..\..\build\Release\lib\gcp_portmon64.lib and
object ..\..\..\build\Release\lib\gcp_portmon64.exp
771>base.lib(path_service.obj) : fatalerror LNK1112: module machine type 'X86'
conflicts with target machine type 'x64'
771>
771>Build FAILED.

> Move FileEnumerator to its own file, do some refactoring.
>
> It creates a class FileInfo to contain the details rather than using a platform-specific typedef. This allows the accessors GetName, GetSize, etc. to be moved directly to this class (previously they were static helpers on the FileEnumerator class) which makes a bunch of code much cleaner. It also gives reasonable getting and initialization which the previous version lacked.
>
> BUG=175002
> R=rvargas@chromium.org
>
> Review URL: https://codereview.chromium.org/13165005

TBR=brettw@chromium.org

Review URL: https://codereview.chromium.org/14824006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198850 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoRevert 198844 "Move sequenced_task_runner to base/task"
dbeam@chromium.org [Wed, 8 May 2013 05:35:24 +0000 (05:35 +0000)]
Revert 198844 "Move sequenced_task_runner to base/task"

Reverting revisions that rely on r198820 so to unbreak the build.

> Move sequenced_task_runner to base/task
>
> BUG=
> R=akalin@chromium.org
>
> Review URL: https://codereview.chromium.org/14927008

TBR=brettw@chromium.org

Review URL: https://codereview.chromium.org/14985007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198848 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoMove sequenced_task_runner to base/task
brettw@chromium.org [Wed, 8 May 2013 04:14:58 +0000 (04:14 +0000)]
Move sequenced_task_runner to base/task

BUG=
R=akalin@chromium.org

Review URL: https://codereview.chromium.org/14927008

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198844 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoMove FileEnumerator to its own file, do some refactoring.
brettw@chromium.org [Tue, 7 May 2013 22:51:31 +0000 (22:51 +0000)]
Move FileEnumerator to its own file, do some refactoring.

It creates a class FileInfo to contain the details rather than using a platform-specific typedef. This allows the accessors GetName, GetSize, etc. to be moved directly to this class (previously they were static helpers on the FileEnumerator class) which makes a bunch of code much cleaner. It also gives reasonable getting and initialization which the previous version lacked.

BUG=175002
R=rvargas@chromium.org

Review URL: https://codereview.chromium.org/13165005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198820 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoHostResolverImpl will return ERR_NAME_NOT_RESOLVED instead of Ok if address list...
mef@chromium.org [Tue, 7 May 2013 21:24:23 +0000 (21:24 +0000)]
HostResolverImpl will return ERR_NAME_NOT_RESOLVED instead of Ok if address list is empty

BUG=224248

TEST=net_unittests --gtest_filter=HostResolverImplTest.EmptyListMeansNameNotResolved
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/14760008

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198799 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoLand Recent QUIC changes
rtenneti@chromium.org [Tue, 7 May 2013 20:55:04 +0000 (20:55 +0000)]
Land Recent QUIC changes

Implement header compression/decompression in ReliableQuicStream.

Merge internal change: 44867738

QUIC: deflake proof_test.

The current proof_test removes a byte from the start of the signature in order
to make it invalid. However, the signature is a big-endian number and, ~1% of
the time, the first byte will be zero - thus removing it doesn't change the
number.

This change adds a non-zero byte to the start of the signature instead.

Merge internal change: 44803399

Replace calls to scoped_ptr(NULL) with calls to scoped_ptr().

Merge internal change: 44799980

Add a blank line in order to get the dependencies correct for rebuild.

Merge internal change: 44796024

Fix "large integer implicitly truncated to unsigned type"

Merge internal change: 44793986

QUIC: compress certificates.

This change causes server certificates to be compressed using three tricks:
  1) The client can advertise sets of common certificates that the server can
     then simply reference. This change contains "common certificate set 0",
     which is the set of the intermediates used twice or more in the Alexa top
     5000. It's temporary because it's missing GIAG2 which we'll want to
     include soon.
  2) The client can send 64-bit, FNV-1a hashes of certificates that it already
     has and the server can reference them by hash.
  3) Otherwise, certifciates are gzip compressed with a dictionary that
     includes any certificates compressed using the previous two methods and a
     1500 byte lump of common substrings. (Again, taken from the Alexa top 5000)

POKE=1

Merge internal change: 44792710

R=mnaganov@chromium.org, rch@chromium.org

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=198736

Review URL: https://codereview.chromium.org/14651009

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198793 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoMove SpawnedTestServer to its own subdirectory.
phajdan.jr@chromium.org [Tue, 7 May 2013 20:04:21 +0000 (20:04 +0000)]
Move SpawnedTestServer to its own subdirectory.

This is a part of replacing most usages of the Python test server
with an in-process C++ test server that should be easier to debug.

BUG=96594
R=rch@chromium.org

Review URL: https://codereview.chromium.org/14691006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198783 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoLess indentation in WebSocketJob::SaveNextCookie() for readability
tyoshino@chromium.org [Tue, 7 May 2013 18:09:54 +0000 (18:09 +0000)]
Less indentation in WebSocketJob::SaveNextCookie() for readability

Review URL: https://chromiumcodereview.appspot.com/14701005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198766 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoRevert 198736 "Land Recent QUIC changes"
csharp@chromium.org [Tue, 7 May 2013 17:56:28 +0000 (17:56 +0000)]
Revert 198736 "Land Recent QUIC changes"

Caused compile failures on the "Google Chrome ChromeOS" builder:
cc1plus: warnings being treated as errors
net/quic/quic_utils.cc:14:error: integer constant is too large for 'unsigned long' type
net/quic/quic_utils.cc:15:error: integer constant is too large for 'unsigned long' type
make: *** [out/Release/obj.target/net/net/quic/quic_utils.o] Error 1

> Land Recent QUIC changes
>
> Implement header compression/decompression in ReliableQuicStream.
>
> Merge internal change: 44867738
>
>
> QUIC: deflake proof_test.
>
> The current proof_test removes a byte from the start of the signature in order
> to make it invalid. However, the signature is a big-endian number and, ~1% of
> the time, the first byte will be zero - thus removing it doesn't change the
> number.
>
> This change adds a non-zero byte to the start of the signature instead.
>
> Merge internal change: 44803399
>
> Replace calls to scoped_ptr(NULL) with calls to scoped_ptr().
>
> Merge internal change: 44799980
>
> Add a blank line in order to get the dependencies correct for rebuild.
>
> Merge internal change: 44796024
>
> Fix "large integer implicitly truncated to unsigned type"
>
> Merge internal change: 44793986
>
> QUIC: compress certificates.
>
> This change causes server certificates to be compressed using three tricks:
>   1) The client can advertise sets of common certificates that the server can
>      then simply reference. This change contains "common certificate set 0",
>      which is the set of the intermediates used twice or more in the Alexa top
>      5000. It's temporary because it's missing GIAG2 which we'll want to
>      include soon.
>   2) The client can send 64-bit, FNV-1a hashes of certificates that it already
>      has and the server can reference them by hash.
>   3) Otherwise, certifciates are gzip compressed with a dictionary that
>      includes any certificates compressed using the previous two methods and a
>      1500 byte lump of common substrings. (Again, taken from the Alexa top 5000)
>
> POKE=1
>
> Merge internal change: 44792710
>
> R=rch@chromium.org
>
> Review URL: https://chromiumcodereview.appspot.com/14651009

TBR=rtenneti@chromium.org

Review URL: https://codereview.chromium.org/15018013

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198764 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoGTTF: move chrome/browser/google_apis/test_server to net/test
phajdan.jr@chromium.org [Tue, 7 May 2013 17:50:26 +0000 (17:50 +0000)]
GTTF: move chrome/browser/google_apis/test_server to net/test

This is a part of replacing most usages of the Python test server
with an in-process C++ test server that should be easier to debug.

BUG=96594
R=rch@chromium.org, satorux@chromium.org

Review URL: https://codereview.chromium.org/14971002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@198762 4ff67af0-8c30-449e-8e8b-ad334ec8d88c