Commit c8571eab authored by avi@chromium.org's avatar avi@chromium.org

Allow content to get the system request context, a request context not tied to any profile.

BUG=76788, 64339, 92361, 92363, 92366
TEST=none yet

Review URL: http://codereview.chromium.org/7745048

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98439 0039d316-1c4b-4281-b951-d872f2087c98
parent fd16bc44
......@@ -745,6 +745,12 @@ ChromeContentBrowserClient::GetDefaultRequestContextDeprecatedCrBug64339() {
return Profile::Deprecated::GetDefaultRequestContext();
}
net::URLRequestContextGetter*
ChromeContentBrowserClient::GetSystemRequestContext() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return g_browser_process->system_request_context();
}
#if defined(OS_LINUX)
int ChromeContentBrowserClient::GetCrashSignalFD(
const std::string& process_type) {
......
......@@ -115,6 +115,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
virtual FilePath GetDefaultDownloadDirectory() OVERRIDE;
virtual net::URLRequestContextGetter*
GetDefaultRequestContextDeprecatedCrBug64339() OVERRIDE;
virtual net::URLRequestContextGetter* GetSystemRequestContext() OVERRIDE;
#if defined(OS_POSIX) && !defined(OS_MACOSX)
// Can return an optional fd for crash handling, otherwise returns -1.
......
......@@ -287,6 +287,10 @@ class ContentBrowserClient {
virtual net::URLRequestContextGetter*
GetDefaultRequestContextDeprecatedCrBug64339() = 0;
// Returns the system request context, a context tied to no browser context.
// This is called on the UI thread.
virtual net::URLRequestContextGetter* GetSystemRequestContext() = 0;
#if defined(OS_POSIX) && !defined(OS_MACOSX)
// Can return an optional fd for crash handling, otherwise returns -1.
virtual int GetCrashSignalFD(const std::string& process_type) = 0;
......
......@@ -251,6 +251,11 @@ MockContentBrowserClient::GetDefaultRequestContextDeprecatedCrBug64339() {
return NULL;
}
net::URLRequestContextGetter*
MockContentBrowserClient::GetSystemRequestContext() {
return NULL;
}
#if defined(OS_POSIX) && !defined(OS_MACOSX)
int MockContentBrowserClient::GetCrashSignalFD(
const std::string& process_type) {
......
......@@ -119,6 +119,7 @@ class MockContentBrowserClient : public ContentBrowserClient {
virtual FilePath GetDefaultDownloadDirectory() OVERRIDE;
virtual net::URLRequestContextGetter*
GetDefaultRequestContextDeprecatedCrBug64339() OVERRIDE;
virtual net::URLRequestContextGetter* GetSystemRequestContext() OVERRIDE;
#if defined(OS_POSIX) && !defined(OS_MACOSX)
virtual int GetCrashSignalFD(const std::string& process_type) OVERRIDE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment