summaryrefslogtreecommitdiffstats
path: root/ios/net
Commit message (Collapse)AuthorAgeFilesLines
* [iOS/GN] Fix compilation of ios_chrome_unittests with gn.sdefresne2016-03-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Get GN in sync with gyp by adding missing dependencies, removing the obsoletes dependencies and adding missing files and targets. Change the toolchain when targetting iOS devices to not build fat binaries as this break the "gn gen"-time selection of the level of optimisation to use from skia and libwebp. Instead, building for devices on iOS is now similar to other platforms (i.e. the arch is selected via "target_cpu" with "arm" an alias for "armv7"). Fixes the following errors: Undefined symbols for architecture arm64: "_VP8DspInitNEON", referenced from: _VP8DspInit in dec.o ... BUG=459705,596237 Review URL: https://codereview.chromium.org/1810423002 Cr-Commit-Position: refs/heads/master@{#383416}
* SameSite: Implement 'Strict'/'Lax' attribute parsing.mkwst2016-03-156-12/+12
| | | | | | | | | | | | | | | | | | | | | | | https://tools.ietf.org/html/draft-west-first-party-cookies-06 introduced the notion of "Strict" or "Lax" enforcement of the "SameSite" attribute. This patch implements the infrastructure changes necessary to support that distinction, but does not yet implement the behavioral change (that is, after this patch, `SameSite` will be rejected, while `SameSite=Strict` and `SameSite=Lax` will have the same behavior that `SameSite` alone has today). Most of this patch is occupied with the fairly mechanical process of swapping out a new 'CookieSameSite' enum for the existing boolean in various constructors and setters. The most interesting piece is the change to the storage backend, which now stores 0, 1, or 2 in the database to represent the possible values, rather than 0 or 1 to represent the boolean. BUG=459154 Review URL: https://codereview.chromium.org/1773133002 Cr-Commit-Position: refs/heads/master@{#381201}
* Log whether the ephemerality of the ChannelIDStore and CookieStore are the samenharper2016-03-093-0/+10
| | | | | | | | BUG=548423 Review URL: https://codereview.chromium.org/1745373002 Cr-Commit-Position: refs/heads/master@{#380165}
* Properly retain system_store_ in CookieStoreIOS.sdefresne2016-03-082-2/+3
| | | | | | | | | | | | The NSHTTPCookieStorage referenced by CookieStoreIOS is not always the system singleton and need to be properly refcounted. Change the instance variable to base::scoped_nsobject<> to take care of this. BUG=None Review URL: https://codereview.chromium.org/1771343002 Cr-Commit-Position: refs/heads/master@{#379835}
* CookieStore: Remove reference counting.mmenke2016-03-073-75/+89
| | | | | | | | | | | | | This has caused a number of issues in the past, and having defined lifecycles for objects makes code easier to reason about and maintain. BUG=472744 TBR=alexclarke@chromium.org, creis@chromium.org Review URL: https://codereview.chromium.org/1701063002 Cr-Commit-Position: refs/heads/master@{#379588}
* Remove CookieStore::GetCookieMonster.mmenke2016-02-253-12/+0
| | | | | | | | | | | | A bunch of CookieStore consumers were depending on CookieMonster instead of CookieStore. Now that they've been fixed, remove GetCookieMonster to avoid any such dependencies from cropping up in the future. BUG=579653 Review URL: https://codereview.chromium.org/1697003002 Cr-Commit-Position: refs/heads/master@{#377629}
* net: move IsLocalhost() function into url_util.htfarina2016-02-231-1/+0
| | | | | | | | | | | | | | This patch moves the last function in net_util.h into url_util.h. We are moving it there because it also operates on a URL part (host). BUG=488531 TEST=net_unittests --gtest_filter=UrlUtilTest.IsLocalhost R=eroman@chromium.org TBR=darin@chromium.org Review URL: https://codereview.chromium.org/1726693002 Cr-Commit-Position: refs/heads/master@{#377115}
* Introduce CookieStore::GetCookieListWithOptionsAsyncmkwst2016-02-233-12/+21
| | | | | | | | | | | | | | | | We'll use this method to implement 'GetAllCookiesForURLAsync', in the hopes of eventually removing that method entirely. This also paves the way to replace 'GetCookiesWithOptionsAsync'. As part of the refactoring, cookie line construction has been promoted to a static method on CookieStore: 'BuildCookieLine'. BUG=588081,581650 R=rdsmith@chromium.org,mmenke@chromium.org Review URL: https://codereview.chromium.org/1708233003 Cr-Commit-Position: refs/heads/master@{#376991}
* [iOS] Support empty callbacks in all CookieStoreIOS methods.droger2016-02-221-4/+8
| | | | | | | | | | | | | This CL adds the missing tests for empty callbacks, to match the other CookieStore implementations. Callers do expect empty callbacks to be supported, resulting in actual crashes. This CL fixes these crashes. BUG=587930 Review URL: https://codereview.chromium.org/1717253002 Cr-Commit-Position: refs/heads/master@{#376771}
* Clean forward-declaration of Objective-C classes.sdefresne2016-02-161-4/+0
| | | | | | | | | | | | Remove hack to support forward-declaring Objective-C classes as C++ classes since those headers are only included from Objective-C++ files. BUG=298181 Review URL: https://codereview.chromium.org/1699053002 Cr-Commit-Position: refs/heads/master@{#375552}
* Clean forward-declaration of Objective-C classes.sdefresne2016-02-161-6/+0
| | | | | | | | | | | | Remove hack to support forward-declaring Objective-C classes as C++ classes since those headers are only included from Objective-C++ files. BUG=298181 Review URL: https://codereview.chromium.org/1699033002 Cr-Commit-Position: refs/heads/master@{#375551}
* Promote CookieMonster::DeleteCanonicalCookieAsync to CookieStore.mmenke2016-02-053-0/+33
| | | | | | | | | | | | This is part of an effort to get rid of GetCookieMonster, and make classes that care abotu cookies only depend on CookieStore. TBR=sky@chromium.org BUG=579653 Review URL: https://codereview.chromium.org/1666513002 Cr-Commit-Position: refs/heads/master@{#373952}
* Remove ImportCookies from CookieMonster interface.mmenke2016-02-053-20/+23
| | | | | | | | | | | | | | | | | | | | | Consumers now use CookieStore::SetCookieWithDetailsAsync. The old method grabbed a mutex and synchronously set all cookies. It's the only cookie method that did that, and it's unclear why. With the new code, the cookies won't be set until any old matching cookie has already been loaded from the store, which will then be overwritten. With the old code, that didn't happen, and it's unclear if the code was actually correct. This also adds an argument to SetCookieWithDetailsAsync: last_access_time, to better match old behavior. TBR=bauerb@chromium.org BUG=579653 Review URL: https://codereview.chromium.org/1663473002 Cr-Commit-Position: refs/heads/master@{#373902}
* Promote SetCookieWithDetailsAsync from CookieMonster to CookieStore.mmenke2016-02-023-1/+100
| | | | | | | | | | | | | | | | | This means that more classes can just use the CookieStore interface, rather than depending on a particular implementation of it. Also remove an argument from SetCookieWithDetailsAsync that was no longer being used, and add an argument to set the creation time, so that a followup CL can replace ImportCookies calls with SetCookieWithDetailsAsync. TBR=tedchoc@chromium.org BUG=579653 Review URL: https://codereview.chromium.org/1644163002 Cr-Commit-Position: refs/heads/master@{#372883}
* Rename first-party-only cookies to same-site cookies.mkwst2016-02-012-3/+3
| | | | | | | | | | | As per https://tools.ietf.org/html/draft-west-first-party-cookies-05 and https://lists.w3.org/Archives/Public/ietf-http-wg/2016JanMar/0134.html. BUG=459154 Review URL: https://codereview.chromium.org/1615773005 Cr-Commit-Position: refs/heads/master@{#372630}
* Promote GetAllCookiesAsync from CookieMonster to CookieStore.mmenke2016-01-223-6/+63
| | | | | | | | | | | This means that more classes can just use the CookieStore interface, rather than depending on a particular implementation of it. BUG=579653 Review URL: https://codereview.chromium.org/1618943002 Cr-Commit-Position: refs/heads/master@{#371080}
* Add FlushStore to CookieStore interface.mmenke2016-01-223-23/+25
| | | | | | | | | | | | | | | | | This results in consumers no longer having to downcast to CookieMonster to call the method, and is part of the process of removing CookieStore::GetCookieMonster entirely. Also move a lot of the CookieMonster documentation to the corresponding CookieStore methods, and moved methods around to have consistent ordering. BUG=579653 TBR=newt@chromium.org Review URL: https://codereview.chromium.org/1616443003 Cr-Commit-Position: refs/heads/master@{#370988}
* Remove use of void** from HttpResponseHeaders::EnumerateHeaderLinesolli.raula2016-01-211-1/+1
| | | | | | | | | | | Remove use of of obaque void** and use instead size_t* parameter. Logic inside is untouched. TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1594973004 Cr-Commit-Position: refs/heads/master@{#370672}
* Convert some raw CanonicalCookie ptrs to scoped_ptr<CanonicalCookie>.tfh2016-01-211-2/+5
| | | | | | | | BUG=479898 Review URL: https://codereview.chromium.org/1602283002 Cr-Commit-Position: refs/heads/master@{#370665}
* Re-enable CookieStoreIOSWithBackend.MultipleNotifiesdroger2016-01-151-2/+1
| | | | | | | | | | | The test passes locally on both device and simulator, try to re-enable it on bots. BUG=567736 Review URL: https://codereview.chromium.org/1585363004 Cr-Commit-Position: refs/heads/master@{#369757}
* Convert Pass()→std::move() for iOS build.dcheng2016-01-143-4/+10
| | | | | | | | | | BUG=557422 R=rickyz@chromium.org TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1586833002 Cr-Commit-Position: refs/heads/master@{#369328}
* Disable CookieStoreIOSWithBackend.MultipleNotifies test.sdefresne2015-12-291-1/+2
| | | | | | | | | | | The test started failing downstream with merge 363378. Disable the test upstream too (was disabled downstream as part of said merge). BUG=567736 Review URL: https://codereview.chromium.org/1550143002 Cr-Commit-Position: refs/heads/master@{#367068}
* Checking for valid header name, value before adding them.shreyasv2015-12-221-5/+13
| | | | | | | | | | | | | | | The header name, value are strings obtained from http headers and indirectly through the WKNavigationDelegate callbacks. There is no guarantee that these strings contain valid header names, values. This CL adds a check for the validity of these string before actually adding it to |http_headers|. BUG=570919 Review URL: https://codereview.chromium.org/1546433002 Cr-Commit-Position: refs/heads/master@{#366602}
* Switch to standard integer types in ios/.avi2015-12-2210-2/+17
| | | | | | | | | BUG=138542 TBR=stuartmorgan@chromium.org Review URL: https://codereview.chromium.org/1544743002 Cr-Commit-Position: refs/heads/master@{#366521}
* Remove the TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03 macro.danakj2015-12-041-1/+1
| | | | | | | | | | | | | This macro existed only to add a Pass() method on scoped_refptr and skia::RefPtr. We can just use std::move() now, so replace callsites to Pass() with std::move() and kill the macro. R=thakis@chromium.org BUG=557422 Review URL: https://codereview.chromium.org/1477643002 Cr-Commit-Position: refs/heads/master@{#363281}
* Remove ScopedVector from ElementsUploadDataStreamolli.raula2015-11-261-3/+6
| | | | | | | | | | | | Also made related small refactorings in http_cache_unittest and remove some unused variables from http_network_transaction_unittest TBR=jam@chromium.org BUG=554289 Review URL: https://codereview.chromium.org/1476443002 Cr-Commit-Position: refs/heads/master@{#361841}
* Run gn --format over all .gn filesagrieve2015-11-201-1/+1
| | | | | | | | | | | | | | | | The recent formatter alphebetizing change is causing a lot of noise in code reviews. Figured it'd be worth a clean-up CL. Exact command I ran: find . -name "*.gn*" -exec gn format --in-place "{}" \; TBR=ddorwin@chromium.org BUG=554928 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1464873002 Cr-Commit-Position: refs/heads/master@{#360891}
* Experiment to disallow setting of secure cookies from insecure schemesjww2015-11-201-0/+3
| | | | | | | | | | | | | | | | | | | | Per the draft modification to the Cookie RFC (https://tools.ietf.org/html/draft-west-leave-secure-cookies-alone), this adds support for disallowing the setting of Secure cookies from URLs with insecure schemes, if experimental web features are turned on. This specifically disallows the setting and creation of Secure cookies from insecure schemes, as well as disallows the updating of previously Secure cookies to non-Secure from an insecure scheme. It also updates the garbage collection algorithm to remove non-Secure cookies before Secure ones. BUG=546820 TBR=tedchoc@chromium.org Review URL: https://codereview.chromium.org/1420333002 Cr-Commit-Position: refs/heads/master@{#360886}
* Remove no-longer-needed CookieStoreTestTraits::enforce_prefixesestark2015-11-171-1/+0
| | | | | | | | | | | | | | https://crrev.com/1450323002 moves cookie prefix unit tests from CookieMonster unit tests to CanonicalCookie unit tests. This means that we no longer need the ability to enforce prefixes in CookieMonster unit tests, so this CL removes the code for doing that. BUG=541511 TBR=ellyjones@chromium.org Review URL: https://codereview.chromium.org/1457433002 Cr-Commit-Position: refs/heads/master@{#360200}
* ios: Stop using __weak.Nico Weber2015-11-042-3/+3
| | | | | | | | | | | | | | | | | | | | | Since we don't build with ARC enabled and without garbage collection, __weak had no semantic meaning. Upstream clang wants to change __weak to have ARC zeroing weak references semantics, but to not silently change behavior, they're first making it an error to use __weak without ARC. Replace __weak with comments so we can update compilers. Also remove a workaround that's no longer necessary. Similar to https://codereview.chromium.org/1407103008/ on OS X. BUG=550066,228650 R=stuartmorgan@chromium.org TBR=thestig Review URL: https://codereview.chromium.org/1424713006 . Cr-Commit-Position: refs/heads/master@{#357920}
* Injecting an NSHTTPCookieStorage dependency into CookieStoreIOSshreyasv2015-11-032-43/+76
| | | | | | | | | | | | | | | | | | | | In Chrome we plan to use a subclass of NSHTTPCookieStorage as we plan to implement an in-memory only cookie store (as opposed to the default implementation in NSHTTPCookieStorage which passes it to CFNetwork). I briefly considered doing a subclass of CookieStore that has an NSHTTPCookieStorage as the backend. But I ended up re-implementing a lot of the logic from CookieStoreIOS (such as the conversion between a canonical cookie and an NSHTTPCookie) Injecting this dependency will avoid unnecessary code duplication. BUG=542866 Review URL: https://codereview.chromium.org/1428673003 Cr-Commit-Position: refs/heads/master@{#357603}
* Remove fixed TODOs for Xcode 7 static cast issue.justincohen2015-10-261-3/+0
| | | | | | | | BUG=498825 Review URL: https://codereview.chromium.org/1405023007 Cr-Commit-Position: refs/heads/master@{#355998}
* Clean up TODO(marq) in upstream code.marq2015-10-222-5/+0
| | | | | | | | | | | Removed obsolete TODOs Replaced remaining items with bugs. BUG=546140 Review URL: https://codereview.chromium.org/1417293002 Cr-Commit-Position: refs/heads/master@{#355591}
* Updated TODO(shreyasv)shreyasv2015-10-221-3/+0
| | | | | | | | | | | | | | Removed stale TODO in SnapshotManager. The sessionID is not the same for the lifetime of the SnapshotManager and can change e.g. during session restore. Changed TODOs to the format TODO(crbug.com/*) BUG=546145 Review URL: https://codereview.chromium.org/1423483004 Cr-Commit-Position: refs/heads/master@{#355564}
* [iOS] Split CrNet cache clearing to a helper file.droger2015-10-213-0/+122
| | | | | | | | | | | | The new code clears SDCH and QUIC data that were not cleared in CrNet previously, and thus this changes the CrNet behavior slightly. BUG=527722 Review URL: https://codereview.chromium.org/1393973003 Cr-Commit-Position: refs/heads/master@{#355405}
* Implement $Secure- cookie prefixestark2015-10-191-0/+3
| | | | | | | | | | | | | | | | | | | This CL implements the rule that cookies whose names start with $Secure- can only be set if the Secure attribute is enabled. The implementation is a runtime-enabled web platform feature for now. Intent to Implement: https://groups.google.com/a/chromium.org/d/msg/blink-dev/IU5t6eLuS2Y/Uq-7Kat9BwAJ BUG=541511 TBR=droger@chromium.org Committed: https://crrev.com/467a098174e062d4380eb0ad8f7b2f0b0b7ed5fa Cr-Commit-Position: refs/heads/master@{#354676} Review URL: https://codereview.chromium.org/1393193005 Cr-Commit-Position: refs/heads/master@{#354832}
* Revert of Implement $Secure- cookie prefix (patchset #16 id:420001 of ↵mnissler2015-10-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1393193005/ ) Reason for revert: Broke net_unittests on Android: I 63.275s run_tests_on_device(06b2a92a003bca26) [ RUN ] URLRequestTest.SecureCookiePrefixOnNonsecureOrigin I 63.275s run_tests_on_device(06b2a92a003bca26) [ERROR:spawner_communicator.cc(241)] request failed, status: 3, error: -324 I 63.275s run_tests_on_device(06b2a92a003bca26) ../../net/url_request/url_request_unittest.cc:2737: Failure I 63.276s run_tests_on_device(06b2a92a003bca26) Value of: test_server_https.Start() I 63.276s run_tests_on_device(06b2a92a003bca26) Actual: false I 63.276s run_tests_on_device(06b2a92a003bca26) Expected: true I 63.276s run_tests_on_device(06b2a92a003bca26) [ERROR:spawner_communicator.cc(241)] request failed, status: 3, error: -324 I 63.276s run_tests_on_device(06b2a92a003bca26) [ FAILED ] URLRequestTest.SecureCookiePrefixOnNonsecureOrigin (487 ms) http://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/30742 http://build.chromium.org/p/chromium.linux/builders/Android%20Tests/builds/22819 Original issue's description: > Implement $Secure- cookie prefix > > This CL implements the rule that cookies whose names start with > $Secure- can only be set if the Secure attribute is enabled. The > implementation is a runtime-enabled web platform feature for now. > > Intent to Implement: > https://groups.google.com/a/chromium.org/d/msg/blink-dev/IU5t6eLuS2Y/Uq-7Kat9BwAJ > > BUG=541511 > TBR=droger@chromium.org > > Committed: https://crrev.com/467a098174e062d4380eb0ad8f7b2f0b0b7ed5fa > Cr-Commit-Position: refs/heads/master@{#354676} TBR=mkwst@chromium.org,jochen@chromium.org,mmenke@chromium.org,droger@chromium.org,estark@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=541511 Review URL: https://codereview.chromium.org/1409243003 Cr-Commit-Position: refs/heads/master@{#354736}
* Implement $Secure- cookie prefixestark2015-10-171-0/+3
| | | | | | | | | | | | | | | | This CL implements the rule that cookies whose names start with $Secure- can only be set if the Secure attribute is enabled. The implementation is a runtime-enabled web platform feature for now. Intent to Implement: https://groups.google.com/a/chromium.org/d/msg/blink-dev/IU5t6eLuS2Y/Uq-7Kat9BwAJ BUG=541511 TBR=droger@chromium.org Review URL: https://codereview.chromium.org/1393193005 Cr-Commit-Position: refs/heads/master@{#354676}
* [iOS][GN] Port ios_net_unittests to build with gn.sdefresne2015-10-073-0/+78
| | | | | | | | | | | | | | | | | | | | Add new BUILD.gn file exporting //ios/net and //ios/net:ios_net_unittests targets (corresponding to ios_net and ios_net_unittests with gyp) and add dependency on the unit test target in //BUILD.gn. Add missing dependency on //build/config/mac:compiler when targetting iOS or mac in //build/config/compiler/BUILD.gn (paralleling the other deps on //build/config/${system}:compiler). Change the "-arch" value to target fat architecture "arm64" & "armv7" when current_cpu is "arm" (better to have fat binaries working on all devices since it is not possible currently to target "armv7" with gn). BUG=459705 Review URL: https://codereview.chromium.org/1388983003 Cr-Commit-Position: refs/heads/master@{#352827}
* CookieStoreIOS: handle dotted domains correctlyellyjones2015-09-042-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | On iOS <9.0, NSHTTPCookie used to leave leading dots in place on the Domain attribute of cookies, and CookieStoreIOS used this behavior to differentiate host-only cookies (those with no Domain attribute) from those with an explicit Domain attribute that happened to match the hostname. On iOS >=9.0, this behavior has changed and it is no longer possible to differentiate cookies in this manner. Instead, CookieStoreIOS now uses ParsedCookie to check for a Domain attribute's presence directly. This causes CookieStoreIOS to begin supporting trailing dots on URLs: since NSHTTPCookie strips trailing dots from the Domain attribute, the previous approach of checking the cookie's domain against the URL's host failed when the URL's host had a trailing dot. Since CookieStoreIOS now checks directly for Domain this problem no longer occurs and the behavior of CookieStoreIOS is closer to that of CookieMonster. This CL also introduces a new flag 'preserves_trailing_dots' into CookieStoreTestTraits. This flag indicates that the cookie store does not fold the domains 'foo.com.' and 'foo.com' together. CookieMonster does preserve trailing dots (ie, does not fold those domains); CookieStoreIOS does not preserve trailing dots (ie, does fold those domains). BUG=516603 Review URL: https://codereview.chromium.org/1318063002 Cr-Commit-Position: refs/heads/master@{#347439}
* [iOS] Cleanup certificate error handling.droger2015-09-041-4/+4
| | | | | | | | | | | | | This CL updates some certificate error handling code to make it consistent with the other platforms. In particular this matches what is done in: content/browser/ssl/ssl_policy.cc. BUG=488745 Review URL: https://codereview.chromium.org/1322843003 Cr-Commit-Position: refs/heads/master@{#347355}
* Using scoped_ptr for URLRequestJobFactoryImpl::SetProtocolHandlersvaldez2015-08-241-2/+4
| | | | | | | | | | Adding scoped_ptr to call in order to take ownership of handler. BUG=517161 Review URL: https://codereview.chromium.org/1295523006 Cr-Commit-Position: refs/heads/master@{#345185}
* Move cookie source display logic to CookiesTreeModelestark2015-08-211-1/+1
| | | | | | | | | | | | | | | | | | | Previously, CanonicalCookie::Source() returned the source of the cookie as needed by CookiesTreeModel -- that is, with the port stripped and scheme changed to http. This CL moves this CookiesTreeModel-specific logic to CookiesTreeModel, so that CanonicalCookie::Source() represents the actual origin that set the cookie. This CL is to be followed up with https://codereview.chromium.org/1303593002/, which aims to measure the frequency of non-secure origins setting Secure cookies. BUG=522261 TBR=miguelg@chromium.org Review URL: https://codereview.chromium.org/1297023004 Cr-Commit-Position: refs/heads/master@{#344866}
* [iOS] Cleanup URLRequest load flagsdroger2015-08-071-4/+3
| | | | | | | | | | | | | | This CL cleans up the load flags: - removes LOAD_VERIFY_EV_CERT, as this feature has been disabled - cleans up cache flags to catch future changes in the OS enum There should be no user-visible changes. BUG=409055 Review URL: https://codereview.chromium.org/1278743002 Cr-Commit-Position: refs/heads/master@{#342313}
* Remove legacy StartsWithASCII function.brettw2015-07-161-1/+2
| | | | | | | | | | | This replaces it with base::StartsWith and the appropriate case flag. Since the existing version only ever did case-insensitive tests in ASCII, there should be no behavior change. BUG=506255 TBR=jam Review URL: https://codereview.chromium.org/1242023005 Cr-Commit-Position: refs/heads/master@{#339175}
* [iOS] Do not drop cookie tasks when cookie loading is interrupted.droger2015-06-223-12/+70
| | | | | | | | | | | | | | | | | | This CL adds support for the case where cookie loading is interrupted with pending tasks. The old behavior was to DCHECK and early return without processing the tasks until the next reload of the cookies. This CL implements the right behavior: run the tasks against the CookieMonster which becomes the source of truth when cookie loading is interrupted. The CL also adds two unittests that would have been failing before. BUG=469843 Review URL: https://codereview.chromium.org/1187283002 Cr-Commit-Position: refs/heads/master@{#335506}
* Fixed a crash on crn_http_protocol_handler.mmjbbegue2015-06-221-1/+7
| | | | | | | | | | | Closure calling net::HttpProtocolHandlerCore::Start wasn't using a scoped_nsobject. BUG=502181 Review URL: https://codereview.chromium.org/1191353002 Cr-Commit-Position: refs/heads/master@{#335495}
* Fixed a crash from calling the wrong selector.jbbegue2015-06-161-2/+3
| | | | | | | | | | | Original CL introducing the crash: https://codereview.chromium.org/1142383006 BUG=None Review URL: https://codereview.chromium.org/1173263003 Cr-Commit-Position: refs/heads/master@{#334605}
* CrNet: add pauseable NSURLProtocol and switch to using itellyjones2015-06-124-41/+261
| | | | | | | | | | | | | | | | | | | | | | | On iOS 8 with NSURLProtocol, CFNetwork appears to treat |-startLoading| as meaning "start or resume" and |-stopLoading| as "pause", and may deliver many such notifications over the lifetime of a request. The old CRNHTTPProtocolHandler is not designed for this behavior, so this change adds a separate NSURLProtocol implementation that can defer sending callbacks until the request is "resumed". This change should not affect the behavior of Chromium on iOS in any way, since Chromium will continue using the old NSURLProtocol implementation with the old behavior. The new NSURLProtocol ought to be safe to use in the same situations, but demonstrating this conclusively is difficult. Also, replace crnet_consumer with a non-graphical app with its own NSURLSession delegate to make testing behavior easier. BUG= Review URL: https://codereview.chromium.org/1142383006 Cr-Commit-Position: refs/heads/master@{#334168}
* Move StartsWith[ASCII] to base namespace.brettw2015-06-121-1/+1
| | | | | | | | | NOPRESUBMIT=true (no presubmit due to removing base:: from a ScopedAllowIO) Review URL: https://codereview.chromium.org/1172183002 Cr-Commit-Position: refs/heads/master@{#334108}