summaryrefslogtreecommitdiffstats
path: root/net/base/net_util.h
Commit message (Collapse)AuthorAgeFilesLines
* Implement support for p2p socket UDP packages to set the Differntiated ↵hubbe@chromium.org2013-10-221-0/+28
| | | | | | | | | | Services Code Point for each package. Will be used by webrtc to hopefully improve performance. (See bug for how we will test this.) BUG=277022 Review URL: https://codereview.chromium.org/22381012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229975 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Fix style errors and remove unused #includes in ↵thestig@chromium.org2013-10-141-6/+4
| | | | | | | | net/base/net_util.h, and fix missing #includes elsewhere as a result. Review URL: https://codereview.chromium.org/25183003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228546 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup of GetNetworkList code.vitalybuka@chromium.org2013-09-291-2/+2
| | | | | | | | | Use size_t for network prefix for consistency with other code. Use ParseCIDRBlock to split address and network. Review URL: https://codereview.chromium.org/24674003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225882 0039d316-1c4b-4281-b951-d872f2087c98
* Added NetworkInterface::network_prefix.vitalybuka@chromium.org2013-09-261-1/+11
| | | | | | | | | | | | | BUG=295997 NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=225303 R=szym@chromium.org Review URL: https://codereview.chromium.org/23726043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225353 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 225303 "Added NetworkInterface::network_prefix."vitalybuka@chromium.org2013-09-261-11/+1
| | | | | | | | | | | | | | | > Added NetworkInterface::network_prefix. > > BUG=295997 > NOTRY=true > > Review URL: https://codereview.chromium.org/23726043 TBR=vitalybuka@chromium.org Review URL: https://codereview.chromium.org/24530007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225326 0039d316-1c4b-4281-b951-d872f2087c98
* Added NetworkInterface::network_prefix.vitalybuka@chromium.org2013-09-261-1/+11
| | | | | | | | | BUG=295997 NOTRY=true Review URL: https://codereview.chromium.org/23726043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225303 0039d316-1c4b-4281-b951-d872f2087c98
* Switch the offset conversion routines from an "offsets point at characters"pkasting@chromium.org2013-09-111-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | worldview to an "offsets point between characters" worldview. This more closely aligns with how the omnibox autocomplete code (which is what this was originally written for) expects things to behave. Direct fallout from this change: * An input offset of 0 will always map to an output offset of 0. * An input offset of (length of string) will always map to the length of the output string, instead of npos. * It's possible for multiple unique input offsets to map to a single non-npos output offset, if they e.g. point to the start and end of a collapsed sequence. * Input offsets pointing into the middle of a completely-removed sequence may not be set to npos if they fall on the boundaries of a subsequence processed by the transformer. For example, when running FormatUrlWithOffsets() on "http://user:pass@domain.com/" and directing it to omit both the scheme and username/password, an input offset of "7" that points in between the scheme and the username/password will be transformed to an output offset of 0 instead of npos. Indirect fallout: * A caller like SearchProvider::NavigationToMatch() will now mark certain matches as "allowed to be default" that it didn't before. Specifically, if the user's input string ends at the same point as the desired |fill_into_edit|, the autocomplete offset will be calculated as (length of string) instead of npos, and thus the match will be thought of as "inlinable" and thus "allowed to be default". BUG=284781 TEST=none R=msw@chromium.org, willchan@chromium.org Review URL: https://codereview.chromium.org/23619016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222426 0039d316-1c4b-4281-b951-d872f2087c98
* Net: make IsSafePortableRelativePath look for reserved names on all components.rvargas@chromium.org2013-09-071-9/+6
| | | | | | | | | | | | | Now a reserved name is not allowed on any component of the path. BUG=none test=net_unittests R=asanka@chromium.org Review URL: https://chromiumcodereview.appspot.com/23464037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221882 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC changes.rtenneti@chromium.org2013-09-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first part of the code to allow faster stats/future compression stuff to register for a notification when a block of data has been fully ACKed by the peer. The idea is as follows: Someone who wants to be notified when their data is ACKed calls SendStreamDataAndNotifyWhenAcked instead of SendStreamData, and provides a Closure. The QuicConnection stores the Closure in a QuicAckNotifier, and maintains a vector of these. On every ACK frame received, the OnAck(acked_seqnums) method of each QuicAckNotifier is called. The QuicAckNotifier keeps track of the sequence numbers it is waiting to see, and after being notified of all of them it calls the Closure's Run() method. Merge internal change: 51476134 Changed SourceAddressToken's code not to include port number while performing crypto handshake (found in EndToEnd unit tests). Use IPAddressToPackedString for source address token comparison. Add CryptoServerConfig::set_strike_register_no_startup_period() to allow a QuicServer to start accepting 0-RTT handshakes without waiting a startup period. Add an end-to-end test for a successful 0-RTT handshake. Merge internal change: 51419595 Copying the overly-lenient SPDY workarounds to handling priority blocked streams for idle timeout logic. Merge internal change: 51406984 For this CL, the only chromium side change is to add QuicConnectionPeer::SetPeerAddress. Log packet retransmissions to DLOG(INFO). Use the standard format for the log messages for crypto handshake messages on the client side. Merge internal change: 51336227 New frame ID scheme to eliminate conflict between STREAM and PADDING frames. PADDING frames are now stream type 0. Description of the new scheme is in quic_framer.cc. Merge internal change: 51271708 Fixing a bug in implicitly created streams which results in early packet loss causing all streams to hang. Merge internal change: 51248632 R=rch@chromium.org Review URL: https://chromiumcodereview.appspot.com/23464033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221419 0039d316-1c4b-4281-b951-d872f2087c98
* Move server socket functionality from TCPServerSocket into TCPSocket.yzshen@chromium.org2013-09-011-0/+3
| | | | | | | | | | | | | | TCPServerSocket becomes a wrapper around TCPSocket to expose a server-only interface. There will be separate CLs to move client socket functionality from TCPClientSocket into TCPSocket. BUG=262601 TEST=newly added tcp_socket_unittest.cc Review URL: https://chromiumcodereview.appspot.com/22861033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220752 0039d316-1c4b-4281-b951-d872f2087c98
* Adds a new method, net::IsIPAddressReserved, that returns true if an IP addressfelt@chromium.org2013-08-231-4/+7
| | | | | | | | | | | | | | | | | belongs to a reserved IANA range. This includes *all* reserved IANA ranges. Applies to both IPv4 and IPv6. I used the following IANA links to decide whether a given range is reserved: https://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xml https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xml BUG=225570,119212,116838 TEST=net_unittest R=rsleevi@chromium.org Review URL: https://chromiumcodereview.appspot.com/22538003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219193 0039d316-1c4b-4281-b951-d872f2087c98
* Adds new UMA entries to give us SSL clickthrough rates specific to intranet ↵felt@chromium.org2013-08-031-0/+7
| | | | | | | | | | | | | sites. Relies on value of IsHostnameNonUnique. This CL also moves CertVerifyProc::IsHostnameNonUnique into net_util. BUG=225570 R=rsleevi@chromium.org Review URL: https://chromiumcodereview.appspot.com/21572002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215428 0039d316-1c4b-4281-b951-d872f2087c98
* Relax IsCanonicalizedHostCompliant again: allow the last component to start withpkasting@chromium.org2013-07-301-3/+3
| | | | | | | | | | | | an alphanumeric character, not just an alphabetic one. BUG=262206 TEST=Type "http://9a" in the omnibox, default choice should be to navigate R=eroman@chromium.org Review URL: https://codereview.chromium.org/21077005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214272 0039d316-1c4b-4281-b951-d872f2087c98
* Remove interface probing for IPv6 support from HostResolverImplszym@chromium.org2013-07-181-35/+0
| | | | | | | | | | Since r195406 the probe is not used. It is now safe to remove this code completely. BUG=260750 Review URL: https://chromiumcodereview.appspot.com/19286002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212224 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in net/android/, net/base/, ↵avi@chromium.org2013-06-111-2/+2
| | | | | | | | | | | | net/cert/, net/cookies/. BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/15942015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205483 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC changes.rtenneti@chromium.org2013-05-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: svn://svn.chromium.org/chrome/trunk/src@200519 0039d316-1c4b-4281-b951-d872f2087c98
* Sanitize directory names from chrome.downloads.onDeterminingFilename.benjhayden@chromium.org2013-05-051-0/+21
| | | | | | | | | | Also fixes subdirectories in DownloadPathReservationTracker and a bug in downloads_api_unittest.cc where Events were incorrectly matching expectations (false positives). BUG=181332 Review URL: https://chromiumcodereview.appspot.com/13866027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198343 0039d316-1c4b-4281-b951-d872f2087c98
* Convert net to use base::string16 instead of string16.brettw@chromium.org2013-03-291-24/+25
| | | | | | | | | | This is just a search-and-replace. BUG= Review URL: https://codereview.chromium.org/13329004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191432 0039d316-1c4b-4281-b951-d872f2087c98
* Add WifiPHYLayerProtocol to SystemProfile.szym@chromium.org2013-02-131-0/+22
| | | | | | | | | | | | | | WifiPHYLayerProtocol characterizes the physical layer (PHY) protocol of the current association with an 802.11 access point. It uses the common nomenclature of referring to the IEEE 802.11 standard amendment which introduced the protocol, i.e. a/b/g/n. TBR=sky BUG=174414 Review URL: https://codereview.chromium.org/12082090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182231 0039d316-1c4b-4281-b951-d872f2087c98
* Add FilePath to base namespace.brettw@chromium.org2013-02-021-10/+11
| | | | | | | This updates headers that forward-declare it and a few random places to use the namespace explicitly. There us a using declaration in file_path.h that makes the rest compile, which we can do in future passes. Review URL: https://codereview.chromium.org/12163003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180245 0039d316-1c4b-4281-b951-d872f2087c98
* Move DecodeFilenameValue and DecodeExt value into http_content_disposition.asanka@chromium.org2012-12-151-9/+2
| | | | | | | | | BUG=none Review URL: https://chromiumcodereview.appspot.com/11471041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173307 0039d316-1c4b-4281-b951-d872f2087c98
* Split GoogleURLTrackerInfoBarDelegate into its own .h/.cc. This will make ↵pkasting@chromium.org2012-10-061-0/+3
| | | | | | | | | | | | changes to it a little easier to understand. As part of this, added a StrippedHost() function to net_util.* to replace the one that used to be in google_url_tracker.cc. BUG=none TEST=none Review URL: https://codereview.chromium.org/11076003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160535 0039d316-1c4b-4281-b951-d872f2087c98
* Remove NetAddressToString/getnameinfo() in favour of GURLthorogood@chromium.org2012-09-181-8/+10
| | | | | | | | | | | This reroutes NetAddressToString in net_util.cc to use GURL's output methods instead. BUG=126212 Review URL: https://chromiumcodereview.appspot.com/10928079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157334 0039d316-1c4b-4281-b951-d872f2087c98
* Use GURL for stringifying IPEndPoint rather than the system network libraries.eroman@chromium.org2012-09-081-15/+38
| | | | | | | | BUG=126212 Review URL: https://chromiumcodereview.appspot.com/10910136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155569 0039d316-1c4b-4281-b951-d872f2087c98
* [net/dns] Resolve AF_UNSPEC on dual-stacked systems. Sort addresses ↵szym@chromium.org2012-08-151-0/+8
| | | | | | | | | | | | | according to RFC3484. Original review: http://codereview.chromium.org/10442098/ BUG=113993 TEST=./net_unittests --gtest_filter=AddressSorter*:HostResolverImplDnsTest.DnsTaskUnspec Review URL: https://chromiumcodereview.appspot.com/10855179 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151750 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 151586 - [net/dns] Resolve AF_UNSPEC on dual-stacked systems. Sort ↵brettw@chromium.org2012-08-141-8/+0
| | | | | | | | | | | | | | addresses according to RFC3484. BUG=113993 TEST=./net_unittests --gtest_filter=AddressSorter*:HostResolverImplDnsTest.DnsTaskUnspec Review URL: https://chromiumcodereview.appspot.com/10442098 TBR=szym@chromium.org Review URL: https://chromiumcodereview.appspot.com/10855163 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151603 0039d316-1c4b-4281-b951-d872f2087c98
* [net/dns] Resolve AF_UNSPEC on dual-stacked systems. Sort addresses ↵szym@chromium.org2012-08-141-0/+8
| | | | | | | | | | | according to RFC3484. BUG=113993 TEST=./net_unittests --gtest_filter=AddressSorter*:HostResolverImplDnsTest.DnsTaskUnspec Review URL: https://chromiumcodereview.appspot.com/10442098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151586 0039d316-1c4b-4281-b951-d872f2087c98
* Add ipv6 probe events to NetLog, and add a buttonmmenke@chromium.org2012-07-191-1/+32
| | | | | | | | | | | to net-internals to re-run the probe. R=eroman@chromium.org BUG=132132 Review URL: https://chromiumcodereview.appspot.com/10766004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147528 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* implement HaveOnlyLoopbackAddresses() for androidjames.wei@intel.com2012-06-151-0/+1
| | | | | | | | | | BUG=132033 TEST= Review URL: https://chromiumcodereview.appspot.com/10532080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142354 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the omnibox to recognize as URLs inputs that have a host component ↵pkasting@chromium.org2012-06-121-1/+1
| | | | | | | | | | that ends with a hyphen. BUG=123732 TEST=Type in "kline-.github.com/NAMS" in the address bar and check that the default action is to navigate. Review URL: https://chromiumcodereview.appspot.com/10533102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141621 0039d316-1c4b-4281-b951-d872f2087c98
* Reimplements net::AddressList without struct addrinfo.szym@chromium.org2012-05-071-27/+11
| | | | | | | | | | | | | | | | net::AddressList extends std::vector<std::IPEndPoint> by canonical name. (Canonical name is planned to be removed as well.) Removes dependency on sys_addrinfo.h throughout the codebase. Introduces net::SockaddrStorage for convenience. BUG=125696 TEST=green waterfall Review URL: http://codereview.chromium.org/10309002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135731 0039d316-1c4b-4281-b951-d872f2087c98
* Delete net::GetHeaderParamValueabarth@chromium.org2012-01-311-19/+0
| | | | | | | | | | This function is a trap. It's a quick-and-dirty parser that has many nutty quirks. There's only one caller left, and that callers should really be using a Content-Type-specific parser anyway. Review URL: http://codereview.chromium.org/9296005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119790 0039d316-1c4b-4281-b951-d872f2087c98
* Improve parsing of the Content-Disposition headerabarth@chromium.org2012-01-271-26/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous, we were using GetHeaderParamValue to parse the Content-Disposition header, which describes itself as a "quick and dirty implementation." After this patch, we use more of our normal HTTP parsing machinery, making our parsing much less quirky and better aligned with RFC 6266. Some notes: 1) Many of the test cases for parsing the Content-Disposition header included the string "Content-Disposition: " in the input. I've looked through all of the callers of these functions, and that seems to be completely bogus. The old parser wasn't careful enough to see that as a problem, but the new one follows the spec more closely. I've updated the test cases to remove this string. 2) After this patch, there's a bunch of code in net_util.cc that really should be moved to http_content_disposition.cc. I didn't move that code in this patch because I didn't want this path to be too large. I'll move it in a future patch. 3) In a future patch, I'll audit the codebase for callers of GetHeaderParamValue. With any luck, we'll be able to remove them all and delete this less-than-amazing function. BUG=65423 Review URL: http://codereview.chromium.org/9234055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119378 0039d316-1c4b-4281-b951-d872f2087c98
* No longer preconnect to unsafe ports. As UrlRequests weremmenke@chromium.org2011-12-131-2/+2
| | | | | | | | | | | never allowed to use these ports anyways, this wasn't a security issue, but just doesn't seem like a good idea. BUG=93326 Review URL: http://codereview.chromium.org/8898008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114261 0039d316-1c4b-4281-b951-d872f2087c98
* export IsPortAllowedByDefault()toyoshim@chromium.org2011-12-011-6/+5
| | | | | | | | | BUG=n/a TEST=n/a Review URL: http://codereview.chromium.org/8747004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112413 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove 3 exit time destructors and 3 static initializers.thakis@chromium.org2011-11-091-2/+2
| | | | | | | | | BUG=101600,94925 TEST=none Review URL: http://codereview.chromium.org/8467037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109317 0039d316-1c4b-4281-b951-d872f2087c98
* OpenBSD patches for net, split from CR #8275005robert.nagy@gmail.com2011-10-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | net/base/host_resolver_proc.cc: - define AI_ADDRCONFIG as 0 net/base/listen_socket.cc: - Shuffle and add missing headers since the order of including these matters. net/base/net_util.h: - Missing header for all POSIX platforms. Needed on OpenBSD and it won't hurt others. net/dns/dns_config_service_posix.h: - Missing header for OpenBSD. The order matters here too net/dns/dns_config_service_posix.cc: - Use res_init() on OpenBSD and disable RES_ROTATE if it is not defined net/net.gyp: - Do not use libresolv on OpenBSD since it's not there, the resolver is in libc. - Include base/platform_mime_util_linux.cc in the OpenBSD builds. BUG= TEST= Review URL: http://codereview.chromium.org/8336024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106604 0039d316-1c4b-4281-b951-d872f2087c98
* content: Make tab_contents_drag_source not depend on download_util.herg@google.com2011-10-181-2/+2
| | | | | | | | | | | This adds a method to the ContentBrowserClient to get what is otherwise localized resources. Most of this patch changes the interface to net::GenerateFileName() to take a utf8 string instead of a utf16 one (which was immediately changed to a utf8 one in implementation.) BUG=none TEST=none Review URL: http://codereview.chromium.org/8113012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106124 0039d316-1c4b-4281-b951-d872f2087c98
* Overwrite extensions of filenames determined from URLs if the URL could be a ↵asanka@chromium.org2011-09-121-2/+3
| | | | | | | | | | | | generator script. BUG=61571 TEST=net_unittests --gtest_filter=NetUtilTest.GenerateSafeFileName:NetUtilTest.GenerateFileName Review URL: http://codereview.chromium.org/7812006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100709 0039d316-1c4b-4281-b951-d872f2087c98
* Mark ParseHostAndPort() as NET_EXPORT instead of NET_EXPORT_PRIVATE.sergeyu@chromium.org2011-08-291-2/+2
| | | | | | | | | | | I need to use this function in content/rendeder/p2p. TEST=None BUG=None Review URL: http://codereview.chromium.org/7714027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98666 0039d316-1c4b-4281-b951-d872f2087c98
* Call GenerateSafeFilename() from GetSuggestedFilename().asanka@chromium.org2011-08-201-15/+30
| | | | | | | | | | | | GetSuggestedFilename() would then become the only function that needs to be called to generate downloaded filenames. BUG=78085 TEST=net_unittests --gtest_filter=*Generate*FileName Review URL: http://codereview.chromium.org/7607013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97581 0039d316-1c4b-4281-b951-d872f2087c98
* Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE.darin@chromium.org2011-08-121-90/+94
| | | | | | Review URL: http://codereview.chromium.org/7529043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96560 0039d316-1c4b-4281-b951-d872f2087c98
* Move filename determination logic to net_util so that it's not split between ↵asanka@chromium.org2011-08-091-6/+33
| | | | | | | | | | | | net_util and download_util. BUG=78085 TEST=net_unittests --gtest_filter=*Generate*FileName Review URL: http://codereview.chromium.org/7300005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96029 0039d316-1c4b-4281-b951-d872f2087c98
* DnsTransaction: added a delegate interface.agayev@chromium.org2011-07-181-0/+1
| | | | | | | | | BUG=60149 TEST=net_unittests --gtest_filter="DnsTransaction*" Review URL: http://codereview.chromium.org/7322016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92851 0039d316-1c4b-4281-b951-d872f2087c98
* Allow hyphens at the beginning of domain components, except for the last ↵pkasting@chromium.org2011-06-211-2/+3
| | | | | | | | | | | | domain component. This is an intentional relaxation of the rules from RFC 1738 to accommodate real-world URLs like http://-kol.deviantart.com/ and http://-tumblrprincess.tumblr.com/. BUG=31060 TEST=Type one of the above URLs in the Chrome omnibox and hit enter; you should navigate, not search. Review URL: http://codereview.chromium.org/7222019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89907 0039d316-1c4b-4281-b951-d872f2087c98
* Changes to have chrome building with net.dllrvargas@google.com2011-06-031-1/+1
| | | | | | | | BUG=76997 TEST=none Review URL: http://codereview.chromium.org/7056049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87873 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add NET_API to more code, this time what's used by chrome.dllrvargas@google.com2011-05-311-8/+8
| | | | | | | | BUG=76997 TEST=none Review URL: http://codereview.chromium.org/7082026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87393 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug 79905: Drag and drop of "DownloadURL" type ignores specified ↵jianli@chromium.org2011-05-181-9/+10
| | | | | | | | | | filename for data URLs. BUG=79905 TEST=Manual test and unittest added for net::GetSuggestedFilename Review URL: http://codereview.chromium.org/7005011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85831 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add NET_API to net/baservargas@google.com2011-05-181-78/+82
| | | | | | | | BUG=76997 TEST=NONE Review URL: http://codereview.chromium.org/6969077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85785 0039d316-1c4b-4281-b951-d872f2087c98