summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/url_request_automation_job.cc
Commit message (Collapse)AuthorAgeFilesLines
* Update net/base/cookie_*.h includes to net/cookies/cookie_*.h .erikwright@chromium.org2012-03-151-1/+1
| | | | | | | | | | | | Once complete, forwarding headers will be removed from net/base/ . TEST=none R=willchan Review URL: http://codereview.chromium.org/9703062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126999 0039d316-1c4b-4281-b951-d872f2087c98
* Add ResourceRequestInfo.darin@chromium.org2012-03-071-16/+13
| | | | | | | | | | | | | | | | ResourceRequestInfo exposes the members of ResourceDispatcherHostRequestInfo required by src/chrome. ResourceDispatcherHostRequestInfo remains for use by src/content (maybe it should have a different name), and ResourceDispatcherHostRequestInfo subclasses ResourceRequestInfo. ResourceDispatcherHost::RenderViewForRequest is removed in favor of ResourceRequestInfo::GetAssociatedRenderView(). src/chrome uses ResourceRequestInfo::ForRequest(URLRequest*) instead of ResourceDispatcherHost::InfoForRequest. Deletes DummyResourceHandler in favor of just having ~ResourceDispatcherHostRequestInfo null-test its ResourceHandler. R=jam@chromium.org TBR=mirandac@chromium.org,ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/9580002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125457 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Pickle Read methods to use higher performance PickleIterator.jbates@chromium.org2012-03-071-1/+1
| | | | | | | | | | | | | | | | There was a lot of redundant error checking and initialization code in all Pickle Read methods because of the void** iterator type. This change replaces the void* iterator with PickleIterator, which encapsulates the read pointer so that less error checking and initialization code is needed for reading. PickleIterator has all the necessary data to do the actual reading. The advantage of having it provide Read methods (as opposed to leaving them solely in the Pickle interface) is that the callers do not need to pass around the const Pickle* once they have a PickleIterator. Followup CLs will refactor the call sites to remove const Pickle* arguments where they are now unnecessary. Then the Pickle::Read* methods can be removed entirely. The alternative approach would have been to change the Pickle::Read methods to non-const and remove the iterator parameter (making Read methods advance an internal read pointer). Unfortunately, the const Read with iterator design is entrenched throughout the chromium code, making this a much more complex change with the same performance outcome. BUG=13108 Review URL: https://chromiumcodereview.appspot.com/9447084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125447 0039d316-1c4b-4281-b951-d872f2087c98
* Move RenderWidgetHost and RenderViewHost interfaces to their own files.joi@chromium.org2012-03-061-2/+2
| | | | | | | | | | | This also finishes breaking the Chrome dependency on RenderWidgetHostImpl and RenderViewHostImpl. TBR=jam@chromium.org BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9599011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125166 0039d316-1c4b-4281-b951-d872f2087c98
* Move BrowserThread to content namespace.joi@chromium.org2011-11-021-0/+1
| | | | | | | | | TBR=owners BUG=98716 Review URL: http://codereview.chromium.org/8437002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108270 0039d316-1c4b-4281-b951-d872f2087c98
* Split BrowserThread into public API and private implementation, step 1.joi@chromium.org2011-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Only content/ now has the ability to create BrowserThread objects, with the exception that tests can create the content::TestBrowserThread subclass, and (temporarily) code in chrome/ can create the DeprecatedBrowserThread subclass. A follow-up change will make content/ take care of its own thread creation, remove DeprecatedBrowserThread, and move all state and non-trivial constructors from BrowserThread down to BrowserThreadImpl. Also moved BrowserProcessSubThread into content/ namespace. As part of follow-up cleanup, chrome/ will stop using this class. BUG=98716 TEST=existing Review URL: http://codereview.chromium.org/8392042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107718 0039d316-1c4b-4281-b951-d872f2087c98
* Update automation messages to use the new way of declaring message structs, ↵jam@chromium.org2011-10-211-8/+8
| | | | | | | | to cut back on unnecessary code. Review URL: http://codereview.chromium.org/8356020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106734 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Cleanup in automation.jhawkins@chromium.org2011-10-171-8/+7
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8212006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105761 0039d316-1c4b-4281-b951-d872f2087c98
* net: Rename URLRequestStatus::os_error_.tfarina@chromium.org2011-09-081-3/+3
| | | | | | | | | | | BUG=92264 TEST=None R=willchan@chromium.org Review URL: http://codereview.chromium.org/7846007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100136 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Use IPC_BEGIN_MESSAGE_MAP_EX everywhere in the automation framework.phajdan.jr@chromium.org2011-07-291-2/+9
| | | | | | | | | | | This avoids an implicit DCHECK that crashes the browser under test which is hard to debug. A log message should work better. BUG=77875 Review URL: http://codereview.chromium.org/7523043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94691 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate RegisterProtocolFactory/(Un)RegisterInterceptor.willchan@chromium.org2011-07-191-2/+2
| | | | | | | | | | | | Mark those APIs as private and friend existing uses. BUG=none TEST=none Review URL: http://codereview.chromium.org/7397008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92992 0039d316-1c4b-4281-b951-d872f2087c98
* Stop calls to InfoForRequest() and RenderViewForRequest() by TaskManager ↵wez@chromium.org2011-07-121-3/+2
| | | | | | | | | | | from triggering warnings for URLRequests not belonging to ResourceDispatcherHost. BUG= TEST=Run Debug build. There should be no warnings about "Request is missing our data". Review URL: http://codereview.chromium.org/7289031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92210 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 90354 - Revert 90352 - Move Referer header to extra_headers fieldbattre@chromium.org2011-06-271-0/+1
| | | | | | | | | | | | | | | | | | | Reapply http://codereview.chromium.org/6995064 after fixing the chrome_frame_net_tests. BUG=no TEST=no Review URL: http://codereview.chromium.org/7230009 TBR=battre@chromium.org Review URL: http://codereview.chromium.org/7236031 TBR=battre@chromium.org Review URL: http://codereview.chromium.org/7264017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90548 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 90352 - Move Referer header to extra_headers fieldbattre@chromium.org2011-06-241-1/+0
| | | | | | | | | | | | | | | | Reapply http://codereview.chromium.org/6995064 after fixing the chrome_frame_net_tests. BUG=no TEST=no Review URL: http://codereview.chromium.org/7230009 TBR=battre@chromium.org Review URL: http://codereview.chromium.org/7236031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90354 0039d316-1c4b-4281-b951-d872f2087c98
* Move Referer header to extra_headers fieldbattre@chromium.org2011-06-241-0/+1
| | | | | | | | | | | | | Reapply http://codereview.chromium.org/6995064 after fixing the chrome_frame_net_tests. BUG=no TEST=no Review URL: http://codereview.chromium.org/7230009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90352 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crash in the Chrome browser process which occurs while servicing ↵ananta@chromium.org2011-05-111-8/+6
| | | | | | | | | | | | | | | | | | | ChromeFrame requests over automation. The crash occurs in the URLRequestAutomationJob which is invoked from the AutomationResourceMessageFilter which filters the automation channel. A recent change to remove refcounting usage from the URLRequestJob subclasses also changed the request map to not maintain a refcounted object. Long story short, while processing the OnRequestEnd IPC message the job can get destroyed midway in the handler. Fix is to rearrange the code in the URLRequestAutomationJob::OnRequestEnd function to access the pending_buf only when the job is not complete and we received a valid response. BUG=none TEST=ChromeFrame should not crash on startup. This can be reproduced by navigating to meebo.com in IE TBR=amit Review URL: http://codereview.chromium.org/7001011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84915 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for the URLRequestTestHTTP.NetworkDelegateTunnelConnectionFailed net ↵ananta@chromium.org2011-04-271-1/+3
| | | | | | | | | | | | | | | | test failures with ChromeFrame. This started occurring with a change in the URLRequestJob class to notify the network delegate about the request status in the URLRequestJob::NotifyStartError function. This is invoked for requests which fail right at the start, i.e. we fail to connect to the server etc. Fix is to invoke the NotifyStartError function on similar lines in the URLRequestautomationJob class. BUG=none TEST=chrome frame net tests should all pass. Review URL: http://codereview.chromium.org/6904017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83124 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Gears from Chrome.aa@chromium.org2011-03-111-6/+0
| | | | | | | | | | There are probably a few more bits and pieces that can be removed, but I think this is the majority of it. BUG=51934 Review URL: http://codereview.chromium.org/6576020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77888 0039d316-1c4b-4281-b951-d872f2087c98
* Update a bunch of files to the new location of browser_thread.hjam@chromium.org2011-03-011-4/+4
| | | | | | | TBR=avi Review URL: http://codereview.chromium.org/6594063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76357 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for the HTTPSGetTest and GetTest net test failures with ChromeFrame. ↵ananta@chromium.org2011-02-241-0/+6
| | | | | | | | | | | | | | | | | | These failures occurred because of new expectations in these tests which match the server ip address and port being connected to. We need to return that information from ChromeFrame. Fix is to send over the corresponding HostPortPair structure in the AutomationMsg_RequestStarted IPC message. A major part of this CL is basically the groundwork to pass this information over via automation. BUG=none TEST=chrome frame net tests should pass. Review URL: http://codereview.chromium.org/6575027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75942 0039d316-1c4b-4281-b951-d872f2087c98
* Begin the DCHECK() cleanup. Starting off with /src/chrome/a* and ↵rsesek@chromium.org2011-02-171-1/+1
| | | | | | | | | | | /src/chrome/browser/a* BUG=58409 Review URL: http://codereview.chromium.org/6539002 Patch from Kushal Pisavadia <kushi.p@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75314 0039d316-1c4b-4281-b951-d872f2087c98
* Support XHR upload event notifications in Chromeframe. We don't get ↵ananta@chromium.org2011-02-081-0/+14
| | | | | | | | | | | | | | | | incremental progress notifications from IE indicating how much data was uploaded etc. We just fire one notification indicating that upload was completed when queried from Chrome. Fixes bug http://code.google.com/p/chromium/issues/detail?id=70713 BUG=70713 TEST=As described in the bug Review URL: http://codereview.chromium.org/6246159 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74049 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestStatus URLRequestStatus;tfarina@chromium.org2011-01-131-8/+9
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/6166010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71285 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up Automation and Chrome Frame IPC code.-only use routed messages when ↵jam@chromium.org2010-12-231-14/+10
| | | | | | | | needed-use routing IDs to avoid manually unpacking messages-remove data structures from IPC namespace (that should only be used for IPC code, and param traits)Note that I temporarily commented out part of a test in external_tab_test.cc because I couldn't figure out how to get the updated gmock macros to compile. Review URL: http://codereview.chromium.org/5998006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70105 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the DCHECK in the UrlRequestautomationJob::ReadRawData function which ↵ananta@chromium.org2010-12-201-1/+0
| | | | | | | | | | | | | | | | asserts that this function is only invoked in the IO thread. While this is true for ChromeFrame in general for chrome frame net tests this DCHECK fires beause the test suite runs the url request tests in a worker thread created specifically to run these tests. BUG=none TEST=chrome frame net tests should pass on the try server. TBR=amit Review URL: http://codereview.chromium.org/6037005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69741 0039d316-1c4b-4281-b951-d872f2087c98
* Keep deinlining stuff.erg@google.com2010-12-151-9/+8
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5783004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69273 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestJob URLRequestJob;tfarina@chromium.org2010-12-111-5/+6
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/5607004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68935 0039d316-1c4b-4281-b951-d872f2087c98
* Use ScopedRunnableMethodFactory for URLRequestAutomationJob.willchan@chromium.org2010-12-031-6/+12
| | | | | | | | | | | There's no reason to AddRef() when posting a task for URLRequestAutomationJob. This is a step towards eliminating refcounting for URLRequestJob. BUG=63692 TEST=existing Review URL: http://codereview.chromium.org/5512006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68154 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequest URLRequest;tfarina@chromium.org2010-11-301-9/+13
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/5384002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67762 0039d316-1c4b-4281-b951-d872f2087c98
* Part 2 of reapplying r64637.erg@google.com2010-11-101-1/+1
| | | | | | | | | | | | | Move the automation message files from chrome/test/automation to chrome/common/. This requires a temporary override to chrome/common/DEPS until Part 3 lands. BUG=51409 TEST=compiles Review URL: http://codereview.chromium.org/4758001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65695 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Refactor automation messages." due to mysterious problems on mac.erg@google.com2010-11-011-1/+1
| | | | | | | | | | | | | This reverts commit c1c1fed998ee4d839bfe256150e5e59220ebc0ef (r64637). TBR=nirnimesh@ BUG=51409 TEST=none Review URL: http://codereview.chromium.org/4194007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64644 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor automation messages.erg@google.com2010-11-011-1/+1
| | | | | | | | | | | | | | | | | automation_messages used to live in chrome/test/automation, when it's needed by browser and chrome_frame. When I started lifting code out of headers and into implementation files, I was getting link errors and temporarily solved the problem by compiling the cc files manually into libbrowser.a. Now this is part of chrome/common/ which is included by all targets needed. While doing this, discover that automation IPC redefines the ContextMenuParams struct. Rename it to MiniContextMenuParams. BUG=51409 TEST=none Review URL: http://codereview.chromium.org/4200007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64637 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent an annoying warning from showing up in ChromeFrame runs when we ↵ananta@chromium.org2010-10-291-2/+3
| | | | | | | | | | | | | | don't have user data for a UrlRequest. ChromeFrame is not interested in these requests anyway. Fixes bug http://code.google.com/p/chromium/issues/detail?id=58694 Bug=58694 Review URL: http://codereview.chromium.org/4133006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64519 0039d316-1c4b-4281-b951-d872f2087c98
* Convert LOG(INFO) to VLOG(1) - chrome/browser/automation/.pkasting@chromium.org2010-10-221-14/+14
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3963004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63558 0039d316-1c4b-4281-b951-d872f2087c98
* Refreshing pages in ChromeFrame would basically always fetch the pages from ↵ananta@chromium.org2010-10-211-1/+2
| | | | | | | | | | | | | | | | | | the cache. We need to emulate Chrome and MSHTML where in the cache is resynchronized, i.e. new content is fetched from the server if it has been modified. To achieve this we now pass the load flags from Chrome when we initiate a HTTP request and basically or in the BINDF_RESYNCHRONIZE and BINDF_GETNEWESTVERSION flags based on the value of the load flags. Fixes bug http://code.google.com/p/chromium/issues/detail?id=41508 Test=Covered by new ChromeFrame test. Review URL: http://codereview.chromium.org/4000001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63389 0039d316-1c4b-4281-b951-d872f2087c98
* In a fake SSLInfo, set security_bits to -1 instead of 0 wtc@chromium.org2010-10-151-1/+1
| | | | | | | | | | | | because the encryption strength is unknown (0 means no encryption). R=finnur BUG=53366,13049 TEST=no unit test failures Review URL: http://codereview.chromium.org/3749003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62785 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeThread to BrowserThread Part19:tfarina@chromium.org2010-10-121-1/+1
| | | | | | | | | | | - Include browser_thread.h instead of chrome_thread.h in more 65 files. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3717003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62226 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeThread to BrowserThread Part 2:tfarina@chromium.org2010-10-061-2/+2
| | | | | | | | | | | - Rename the entries under appcache, autocomplete and automation. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3524012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61610 0039d316-1c4b-4281-b951-d872f2087c98
* Pass the accept and cache-control headers from ChromeFrame via the host ↵ananta@chromium.org2010-10-011-2/+0
| | | | | | | | | | | | | network stack. Fixes bug http://code.google.com/p/chromium/issues/detail?id=57455 Bug=57455 Test=Covered by updated ChromeFrame test. Review URL: http://codereview.chromium.org/3536005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61252 0039d316-1c4b-4281-b951-d872f2087c98
* Do not write non-toplevel POST response into the WINInet cache.stoyan@chromium.org2010-10-011-1/+10
| | | | | | | BUG=55918 Review URL: http://codereview.chromium.org/3595004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61184 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move a bunch of code to the headers and remove includes.erg@google.com2010-09-221-0/+1
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3412016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60208 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity issue 8297: Uninitialized member in url_request_automation_job.ccfinnur@chromium.org2010-07-241-0/+1
| | | | | | | | | BUG=None (Coverity issue id listed above) TEST=None Review URL: http://codereview.chromium.org/3045011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53592 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeFrame should allow conditional HTTP headers like if_match, ↵ananta@chromium.org2010-06-161-5/+0
| | | | | | | | | | | | | | | if_modified_since, etc to pass through the host network stack. Filtering out these issues causes POST requests issued by buzz to fail. Fixes bug http://b/issue?id=2321282 Bug=2321282 Test=Covered by ChromeFrame unit test. Review URL: http://codereview.chromium.org/2846005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49880 0039d316-1c4b-4281-b951-d872f2087c98
* Use net::HttpRequestHeaders instead of std::string in URLRequest and friends.willchan@chromium.org2010-05-061-12/+19
| | | | | | | | BUG=22588 Review URL: http://codereview.chromium.org/1998001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46612 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid unregistering automation job twice.stoyan@chromium.org2010-03-081-5/+0
| | | | | | Review URL: http://codereview.chromium.org/672016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40968 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeFrame should honor the host browser's cookie policy. To achieve this ↵ananta@chromium.org2010-03-021-112/+0
| | | | | | | | | | | | | | | | we always read the cookies from the host browser when the renderer requests them. This also cleans up the mess with the host network stack code parsing cookies from the host looking for persistent cookies. Fixes bug http://code.google.com/p/chromium/issues/detail?id=34151 Bug=34151 Test=Covered by existing host network stack tests and chrome frame cookie tests. Review URL: http://codereview.chromium.org/661290 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40402 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a Chrome crash caused in a ChromeFrame instance in the automation job ↵ananta@chromium.org2010-02-151-7/+7
| | | | | | | | | | | | | | | | | used for routing network requests to the host. The crash happens while dereferencing a NULL AutomationResourceMessageFilter pointer in a pending job. We already NULL check the pointer in the if block above. Moving this check at the top. Fixes bug http://code.google.com/p/chromium/issues/detail?id=35728 Bug=35728 Review URL: http://codereview.chromium.org/605022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39035 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a Chrome crash which occurs in a ChromeFrame instance while servicing a ↵ananta@chromium.org2010-02-101-5/+38
| | | | | | | | | | | | | | | | | | | | | | | read request in the automation job. The crash based on the dump occurs while dereferencing a NULL message filter, which means that we received a read request for a disconnected/terminated job. This happens when a request is paused while waiting for the renderer to ack sent data packets Following fixes:- 1. NULL check the message_filter pointer before dereferencing it in URLRequestAutomationJob::ReadRawData. 2. Only complete the job when we receive a Read request for it or if we have a pending read. Added ASSERTS in OnDataAvailable to check if we receive unexpected data. Fixes bug http://code.google.com/p/chromium/issues/detail?id=34819 Bug=34819 Test=Covered by ui test. Review URL: http://codereview.chromium.org/577033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38583 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 38001 and 38002.darin@chromium.org2010-02-031-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify CookiePolicy to work asynchronously This change will enable us to prompt the user before setting a cookie. While we only need to prompt before setting, we actually need to make both CanSetCookie and CanGetCookies asynchronous. This is necessary in order to preserve FIFO ordering since the value returned by GetCookies depends on the changes made to the cookie DB by SetCookie. This change also includes some simplification of CookieStore. Instead of N virtual functions, I distilled it down to only 4. The remaining functions are instead expressed in terms of those. While studying all the places where we currently use CookiePolicy, I found that some of them were not appropriate. After discussing with Amit, I decided to remove the policy checks in URLRequestAutomationJob. See the comments in the code regarding this. I changed the signature of CookieMonster::GetRawCookies to GetAllCookiesForURL to better match GetAllCookies. Related to this change webkit/glue/webcookie.h grows a constructor that takes a CanonicalCookie to help clean up some code. On the Chrome side, ChromeURLRequestContext now has a ChromeCookiePolicy object. That object is threadsafe ref counted because it is passed between the UI and IO threads. It is responsible for implementing the queuing logic described above. It will also in the future trigger the Chrome UI code to actually show the setcookie prompt. Please review the state machinery changes in URLRequestHttpJob carefully. R=eroman BUG=34331 TEST=no tests yet for prompting. Review URL: http://codereview.chromium.org/564045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38028 0039d316-1c4b-4281-b951-d872f2087c98
* Back out trunk r37998.mark@chromium.org2010-02-031-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Modify CookiePolicy to work asynchronously This change will enable us to prompt the user before setting a cookie. While we only need to prompt before setting, we actually need to make both CanSetCookie and CanGetCookies asynchronous. This is necessary in order to preserve FIFO ordering since the value returned by GetCookies depends on the changes made to the cookie DB by SetCookie. This change also includes some simplification of CookieStore. Instead of N virtual functions, I distilled it down to only 4. The remaining functions are instead expressed in terms of those. While studying all the places where we currently use CookiePolicy, I found that some of them were not appropriate. After discussing with Amit, I decided to remove the policy checks in URLRequestAutomationJob. See the comments in the code regarding this. I changed the signature of CookieMonster::GetRawCookies to GetAllCookiesForURL to better match GetAllCookies. I also filed a bug about making it even closer in functionality. Related to this change webkit/glue/webcookie.h grows a constructor that takes a CanonicalCookie to help clean up some code. On the Chrome side, ChromeURLRequestContext now has a ChromeCookiePolicy object. That object is threadsafe ref counted because it is passed between the UI and IO threads. It is responsible for implementing the queuing logic described above. It will also in the future trigger the Chrome UI code to actually show the setcookie prompt. Please review the state machinery changes in URLRequestHttpJob carefully. R=eroman BUG=34331 TEST=no tests yet for prompting. Review URL: http://codereview.chromium.org/567015 TBR=darin@chromium.org Review URL: http://codereview.chromium.org/562037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38002 0039d316-1c4b-4281-b951-d872f2087c98