summaryrefslogtreecommitdiffstats
path: root/content/browser/mock_resource_context.cc
Commit message (Collapse)AuthorAgeFilesLines
* Pass AudioRendererHost data to MediaInternals.scottfr@chromium.org2011-07-081-2/+2
| | | | | | | | | BUG=none TEST=compiles, unittests Review URL: http://codereview.chromium.org/7217025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91908 0039d316-1c4b-4281-b951-d872f2087c98
* Create a URLRequestJobFactory to replace the URLRequest globals.willchan@chromium.org2011-05-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Create a content::ResourceContext.willchan@chromium.org2011-04-151-0/+23
Each Profile will have a ResourceContext which lives within the ProfileIOData on the IO thread, although it is created on the UI thread (since that's where the ProfileIOData is created). Move webkit_database::DatabaseTracker into ResourceContext and out of ChromeURLRequestContext. Fixed WorkerProcessHost to create its own ResourceMessageFilter that uses a URLRequestContextOverride pointing to its own URLRequestContext, rather than using the default request context. BUG=78596 TEST=existing Review URL: http://codereview.chromium.org/6825038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81774 0039d316-1c4b-4281-b951-d872f2087c98