| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
NetworkDelegate::OnHeadersReceived const
BUG=149890
TBR=tony@chromium.org,mnaganov@chromium.org,jochen@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10944013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163111 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
histograms for cache/network activity.
R=rvargas@chromium.org, mmenke@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10834313
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152398 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
cache, for full and partial page loads.
R=mmenke@chromium.org, jam@chromium.org, willchan@chromium.org, brettw@chromium.org
BUG=139210
Review URL: https://chromiumcodereview.appspot.com/10736066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149007 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function will be called before an WebSocket tries to connect.
This function can do extra work such as policy checks to prevent the connect.
ChromeNetworkDelegate implements the function to check URL blacklist.
BUG=131046
TEST=net_unittests
Review URL: https://chromiumcodereview.appspot.com/10541046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141816 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, deal with a couple of TODOs in the throttling code, and remove
metrics we no longer need since we are no longer running field trials
for this code.
BUG=119760
Review URL: https://chromiumcodereview.appspot.com/10440119
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141000 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
so that we can open files in the user's Downloads
directory.
Shouldn't affect actual ChromeOS or other platforms.
BUG=chromium-os:29447
TEST=Ran on Linux, opened files from Downloads folder.
Review URL: http://codereview.chromium.org/10068021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135553 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
As a side effect, requests going through URLFetcher now also have to pass cookie checks. Requests from the URLFetcher can be optionally annotated with a render view, so the user can be notified about blocked cookies. This plumbing is done for the alternate nav url fetcher, and the template url fetcher.
BUG=116322
TEST=manual/pyauto
Review URL: https://chromiumcodereview.appspot.com/9572001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125831 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
canceled/completed/killed.
With this CL, URLRequestJobs notify their NetworkDelegate when they are being destroyed to insure that the NetworkDelegate does not access any of their variables or call callbacks.
Also the WebRequest API does not execute any callbacks if they URLRequest has informed the API that the Request has been completed or canceled.
Both cases could happen in rare race conditions.
BUG=108968
TEST=no
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=117342
Review URL: http://codereview.chromium.org/9147018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117685 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
R=groby
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8743019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112534 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a new signal that allows extensions to
- Modify/Delete cookies of HTTP responses before they are seen by the cookie monster.
- Cancel requests based on the length or content type of the HTTP response.
BUG=89118
TEST=no
Review URL: http://codereview.chromium.org/7931026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104091 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
taking no action.
BUG=32056
TEST=net_unittests
Review URL: http://codereview.chromium.org/8100001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103801 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback.
Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g.
BUG=98719
TEST=none
Review URL: http://codereview.chromium.org/8070013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cancel, in addition to observing.
TBR=ananta@chromium.org
BUG=32056
TEST=net_unittests
Review URL: http://codereview.chromium.org/8037038
TBR=cbentzel@chromium.org
Review URL: http://codereview.chromium.org/8082010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103372 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
addition to observing.
TBR=ananta@chromium.org
BUG=32056
TEST=net_unittests
Review URL: http://codereview.chromium.org/8037038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103360 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=api test
Review URL: http://codereview.chromium.org/7538024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95308 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL replaces the onRequestSent signal of the webrequest API with a new onSendHeader signal. The sequence is now: onBeforeRequest -> onBeforeSendHeaders -> onSendHeaders.
This change allows us to completely remove the webrequest API from the network transaction layer and stay in the URL request layer. That solve the problem that the network layer may convert one URLRequest to multiple HTTP requests which should be transparent to the webrequest API. It also solves the problem that requests answered from the cache did not trigger an onRequestSent event.
Given the choice of removing onRequestSent completely and replacing it with onSendHeaders, I chose the latter so that extensions can see the headers sent to the network after other extensions had a chance to modify them.
BUG=no
TEST=no
Review URL: http://codereview.chromium.org/7353021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92584 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL moves the OnBeforeSendHeaders signal from net_http_transaction.cc and net_cache_transaction.cc to url_request_http_job.cc. We do this for several reasons:
- deep in the http stack one URL Request can be split into several http requests
(with different byte ranges).
- We do not want to expose this implementation detail to extension authors.
- It is not sufficient to submit only the first OnBeforeSendHeaders event to
the extension: If the extension modifies the headers, this modification should
apply to all http requests.
- from an architectural perspective we do not want to go too deep in order to
allow changing the network stack implementation without being limited by the
published Extension API (needs to be backwards compatible)
BUG=60101
TEST=no
Review URL: http://codereview.chromium.org/7039010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90753 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=81160
TEST=none
Review URL: http://codereview.chromium.org/7043007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86241 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
URLRequest::Interceptor and URLRequest::ProtocolFactory are globally registered. This causes a variety of problems. This provides a method for replacing them.
It used to be the case that we used net::URLRequest::IsHandledProtocol()/net::URLRequest::IsHandledURL() to see if the request would be handled by Chrome, or deferred to an external protocol handler. This required that URLRequest be aware of all protocol handlers.
We instead provide ProfileIOData::IsHandledProtocol(), which checks to see if there are any Chrome registered protocol handlers, and if not, checks the default ones in net::URLRequest.
Note this doesn't work for custom handlers (registerProtocolHandler) because they are dynamic and profile-specific. We would have to add a member function to ProfileIOData and not use a global. This is problematic since we check ProfileIOData::IsHandledProtocol in the RenderViewContextMenu, which runs on the UI thread, whereas ProfileIOData lives on the IO thread. RenderViewContextMenu is using also using it synchronously, which makes it a pain to support.
So, we don't support custom handlers in ProfileIOData::IsHandledProtocol(). This means that "save as" won't work for custom handlers. Seems ok for now.
This also fixes the multiprofile/incognito bugs where if a profile registers a custom handler, and then a different profile / an incognito profile registers the same custom handler and then unregisters it, which globally unregisters it, so the original profile is now broken. By removing the use of the globals, we fix this.
Also fixes a bunch of style guide violations in the ProtocolHandler/ProtocolHandlerRegistry code.
This changelist replaces two existing URLRequest::ProtocolFactory uses: chrome-extension/user-script and custom handlers.
Also improve the tests in ResourceDispatcherHost so we don't have to do as many NULL checks. Change the MockResourceContext to create a TestURLRequestContext.
BUG=81979
TEST=none
Review URL: http://codereview.chromium.org/6960006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85376 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=60101
TEST=no
Review URL: http://codereview.chromium.org/6931055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85260 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Also add a wrapper class to avoid passing around raw NULL pointers, and a bridge so I can invoke the method from other than the IO thread
BUG=48930
TEST=net unittests
Review URL: http://codereview.chromium.org/6822026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83881 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
requestHeaders and allow the extension to modify them.
I also changed the network delegate callbacks, so that they accept arguments beyond just a status code, and they do not outlive the object they are bound to.
BUG=60101
TEST=automated
Review URL: http://codereview.chromium.org/6899001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83246 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=60101
TEST=run browser_tests
Review URL: http://codereview.chromium.org/6883119
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82793 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
chrome.experimental.webRequest.onBeforeRedirect
BUG=60101
TEST=execute browser tests
Review URL: http://codereview.chromium.org/6882043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82317 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=60101
TEST=browser_tests --gtest_filter='ExtensionWebRequestApiTest.WebRequestEvents'
Review URL: http://codereview.chromium.org/6853014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82308 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=60101
TEST=no
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81479
Review URL: http://codereview.chromium.org/6677148
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81782 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
The change introduced a regression in the WebRequestEvents api test.
TBR=mpcomplete
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81503 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=60101
TEST=no
Review URL: http://codereview.chromium.org/6677148
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81479 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This lets us look up the request associated with an http transaction and
send event details for the webRequest.onBeforeRequest extension event.
I also hooked up the onBeforeRequest event for HTTP network and cache transactions so that they are separate from other requests. This lets us have the request header information.
BUG=60101
TEST=no
Review URL: http://codereview.chromium.org/6698009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79905 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RegisterProtocolHandler URLs.
Currently we use a static_cast<> to convert a URLRequestContext into a
ChromeURLRequestContext in a ProtocolFactory. However, ProtocolFactory is
global and not all URLRequestContexts are instances of ChromeURLRequestContext,
so this will always crash in certain circumstances (such as the one described
in the TEST field).
This change solves the problem by providing a MaybeCreateURLRequestJob() method
in NetworkDelegate and then having the ProtocolHandlerRegistry::Factory() call
it instead of casting.
BUG=74063
TEST=Requesting a URL that has a registerProtocolHandler() from chrome://net-internals/#tests doesn't crash.
Review URL: http://codereview.chromium.org/6592060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77559 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I did some measurements with a Release build of chrome, both manually and via the page cycler tests. It seems that a simple empty blocking event listener can add anywhere from a 1 to 30ms delay to request times, largely depending on how many requests are in the queue (when many requests come at once, the last ones to be processed by the extension are delayed the longest).
From page cycler data (on my local machine), the average increase in page load time seems to be around 6ms. This is independent of total page load time (which makes sense).
BUG=60101
TEST=covered by apitests
Review URL: http://codereview.chromium.org/6574049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77339 0039d316-1c4b-4281-b951-d872f2087c98
|
|
* Renames HttpNetworkDelegate to NetworkDelegate, moves to net/base/network_delegate.h. NOTE: this is a layering violation. wtc/eroman/willchan have agreed to this exception because the other solutions are less palatable.
* Move the virtuals in NetworkDelegate to the private section. Use non-virtual public interface as the network stack's interface for notifying the delegate. Add sanity checking to the implmentation in NetworkDelegate. The private virtual interface is for consumers to receive notifications.
* Remove ExtensionIOEventRouter from ChromeURLRequestContext, it is only used by the ChromeNetworkDelegate. Pass it directly to the ChromeNetworkDelegate's constructor.
* Introduce a SystemNetworkDelegate. It does nothing right now.
BUG=67232
TEST=none
Review URL: http://codereview.chromium.org/6580002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75822 0039d316-1c4b-4281-b951-d872f2087c98
|