Commit 7a71dc06 authored by Marshall Greenblatt's avatar Marshall Greenblatt

Update to Chromium revision 203701.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1269 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
parent 300847a3
......@@ -17,5 +17,5 @@
{
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
'chromium_revision': '198276',
'chromium_revision': '203701',
}
......@@ -58,11 +58,6 @@
'OTHER_LDFLAGS': ['-Wl,-headerpad_max_install_names'],
},
'conditions': [
['OS=="win" and win_use_allocator_shim==1', {
'dependencies': [
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
],
}],
['OS=="win"', {
'configurations': {
'Debug_Base': {
......@@ -883,10 +878,10 @@
'libcef/browser/resource_dispatcher_host_delegate.h',
'libcef/browser/resource_request_job.cc',
'libcef/browser/resource_request_job.h',
'libcef/browser/scheme_handler.cc',
'libcef/browser/scheme_handler.h',
'libcef/browser/scheme_impl.cc',
'libcef/browser/scheme_impl.h',
'libcef/browser/scheme_registration.cc',
'libcef/browser/scheme_registration.h',
'libcef/browser/speech_recognition_manager_delegate.cc',
'libcef/browser/speech_recognition_manager_delegate.h',
'libcef/browser/stream_impl.cc',
......@@ -935,6 +930,8 @@
'libcef/common/response_manager.h',
'libcef/common/scheme_registrar_impl.cc',
'libcef/common/scheme_registrar_impl.h',
'libcef/common/scheme_registration.cc',
'libcef/common/scheme_registration.h',
'libcef/common/string_list_impl.cc',
'libcef/common/string_map_impl.cc',
'libcef/common/string_multimap_impl.cc',
......
......@@ -10,6 +10,8 @@
'cef_directory' : '<!(echo %CEF_DIRECTORY%)',
# Use SKIA text rendering for transparency support.
'enable_skia_text': 1,
# Disable tcmalloc's debugallocation to avoid crashing during startup.
'disable_debugallocation': 1,
}, { # OS!="win"
'cef_directory' : '<!(echo $CEF_DIRECTORY)',
}],
......
......@@ -1413,7 +1413,6 @@ enum cef_dom_node_type_t {
DOM_NODE_TYPE_ATTRIBUTE,
DOM_NODE_TYPE_TEXT,
DOM_NODE_TYPE_CDATA_SECTION,
DOM_NODE_TYPE_ENTITY_REFERENCE,
DOM_NODE_TYPE_ENTITY,
DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS,
DOM_NODE_TYPE_COMMENT,
......
......@@ -17,7 +17,7 @@
#include "libcef/browser/devtools_delegate.h"
#include "libcef/browser/media_capture_devices_dispatcher.h"
#include "libcef/browser/navigate_params.h"
#include "libcef/browser/scheme_registration.h"
#include "libcef/browser/scheme_handler.h"
#include "libcef/browser/thread_util.h"
#include "libcef/browser/url_request_context_getter.h"
#include "libcef/browser/url_request_context_getter_proxy.h"
......@@ -600,7 +600,7 @@ void CefBrowserHostImpl::StartDownload(const CefString& url) {
if (!context)
return;
scoped_refptr<content::DownloadManager> manager =
content::DownloadManager* manager =
content::BrowserContext::GetDownloadManager(context);
if (!manager)
return;
......
......@@ -10,8 +10,8 @@
#include "base/message_loop.h"
// Class used to process events on the current message loop.
class CefBrowserMessageLoop : public MessageLoopForUI {
typedef MessageLoopForUI inherited;
class CefBrowserMessageLoop : public base::MessageLoopForUI {
typedef base::MessageLoopForUI inherited;
public:
CefBrowserMessageLoop();
......
......@@ -10,7 +10,7 @@
#include "base/command_line.h"
#include "include/internal/cef_types_wrappers.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/common/webpreferences.h"
// Set default preferences based on CEF command-line flags. Chromium command-
// line flags should not exist for these preferences.
......
......@@ -34,7 +34,7 @@
#include "ipc/ipc_channel.h"
#include "net/url_request/url_request.h"
#include "v8/include/v8.h"
#include "webkit/user_agent/user_agent_util.h"
#include "webkit/common/user_agent/user_agent_util.h"
namespace scheme {
......
......@@ -22,6 +22,7 @@
#include "libcef/common/cef_switches.h"
#include "libcef/common/command_line_impl.h"
#include "libcef/common/content_client.h"
#include "libcef/common/scheme_registration.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
......@@ -30,6 +31,7 @@
#include "content/browser/plugin_service_impl.h"
#include "content/public/browser/access_token_store.h"
#include "content/public/browser/browser_url_handler.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/plugin_service_filter.h"
#include "content/public/browser/quota_permission_context.h"
#include "content/public/browser/render_process_host.h"
......@@ -250,7 +252,8 @@ class CefPluginServiceFilter : public content::PluginServiceFilter {
CefContentBrowserClient::CefContentBrowserClient()
: browser_main_parts_(NULL),
next_browser_id_(0) {
next_browser_id_(0),
scheme_set_locked_(false) {
plugin_service_filter_.reset(new CefPluginServiceFilter);
content::PluginServiceImpl::GetInstance()->SetFilter(
plugin_service_filter_.get());
......@@ -416,6 +419,19 @@ CefContentBrowserClient::CreateRequestContextForStoragePartition(
partition_path, in_memory, protocol_handlers);
}
bool CefContentBrowserClient::IsHandledURL(const GURL& url) {
if (!url.is_valid())
return false;
const std::string& scheme = url.scheme();
DCHECK_EQ(scheme, StringToLowerASCII(scheme));
if (scheme::IsInternalHandledScheme(scheme))
return true;
DCHECK(scheme_set_locked_);
return scheme_set_.find(scheme) != scheme_set_.end();
}
void CefContentBrowserClient::AppendExtraCommandLineSwitches(
CommandLine* command_line, int child_process_id) {
const CommandLine& browser_cmd = *CommandLine::ForCurrentProcess();
......@@ -495,14 +511,14 @@ void CefContentBrowserClient::AllowCertificateError(
bool overridable,
bool strict_enforcement,
const base::Callback<void(bool)>& callback,
bool* cancel_request) {
content::CertificateRequestResultType* result) {
CEF_REQUIRE_UIT();
if (resource_type != ResourceType::MAIN_FRAME) {
// A sub-resource has a certificate error. The user doesn't really
// have a context for making the right decision, so block the request
// hard.
*cancel_request = true;
*result = content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
return;
}
......@@ -522,11 +538,14 @@ void CefContentBrowserClient::AllowCertificateError(
if (overridable && !strict_enforcement)
callbackImpl = new CefAllowCertificateErrorCallbackImpl(callback);
*cancel_request = !handler->OnCertificateError(
bool proceed = handler->OnCertificateError(
static_cast<cef_errorcode_t>(cert_error), request_url.spec(),
callbackImpl.get());
if (*cancel_request && callbackImpl.get())
if (!proceed && callbackImpl.get())
callbackImpl->Disconnect();
*result = proceed ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE :
content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
}
content::AccessTokenStore* CefContentBrowserClient::CreateAccessTokenStore() {
......@@ -681,6 +700,24 @@ const wchar_t* CefContentBrowserClient::GetResourceDllName() {
}
#endif // defined(OS_WIN)
void CefContentBrowserClient::AddCustomScheme(const std::string& scheme) {
DCHECK(!scheme_set_locked_);
scheme_set_.insert(scheme);
// Register as a Web-safe scheme so that requests for the scheme from a
// render process will be allowed in resource_dispatcher_host_impl.cc
// ShouldServiceRequest.
content::ChildProcessSecurityPolicy* policy =
content::ChildProcessSecurityPolicy::GetInstance();
if (!policy->IsWebSafeScheme(scheme))
policy->RegisterWebSafeScheme(scheme);
}
void CefContentBrowserClient::LockCustomSchemes() {
DCHECK(!scheme_set_locked_);
scheme_set_locked_ = true;
}
void CefContentBrowserClient::set_last_create_window_params(
const LastCreateWindowParams& params) {
CEF_REQUIRE_IOT();
......
......@@ -8,6 +8,7 @@
#include <list>
#include <map>
#include <set>
#include <string>
#include <utility>
......@@ -74,6 +75,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
const base::FilePath& partition_path,
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
virtual bool IsHandledURL(const GURL& url) OVERRIDE;
virtual void AppendExtraCommandLineSwitches(CommandLine* command_line,
int child_process_id) OVERRIDE;
virtual content::QuotaPermissionContext*
......@@ -91,7 +93,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
bool overridable,
bool strict_enforcement,
const base::Callback<void(bool)>& callback,
bool* cancel_request) OVERRIDE;
content::CertificateRequestResultType* result) OVERRIDE;
virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
virtual bool CanCreateWindow(const GURL& opener_url,
const GURL& origin,
......@@ -111,6 +113,10 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
const wchar_t* GetResourceDllName() OVERRIDE;
#endif
// Add a custom scheme registration.
void AddCustomScheme(const std::string& scheme);
void LockCustomSchemes();
// Store additional state from the ViewHostMsg_CreateWindow message that will
// be used when CanCreateWindow() is called.
struct LastCreateWindowParams {
......@@ -139,6 +145,10 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
BrowserInfoList browser_info_list_;
int next_browser_id_;
typedef std::set<std::string> SchemeSet;
SchemeSet scheme_set_;
bool scheme_set_locked_;
// Only accessed on the IO thread.
LastCreateWindowParams last_create_window_params_;
};
......
......@@ -9,7 +9,7 @@
#include "libcef/browser/browser_main.h"
#include "libcef/browser/browser_message_loop.h"
#include "libcef/browser/content_browser_client.h"
#include "libcef/browser/scheme_registration.h"
#include "libcef/browser/scheme_handler.h"
#include "libcef/browser/thread_util.h"
#include "libcef/browser/trace_subscriber.h"
#include "libcef/common/main_delegate.h"
......
......@@ -7,49 +7,76 @@
#include "libcef/browser/thread_util.h"
#include "libcef/common/time_util.h"
#include "base/logging.h"
#include "content/browser/geolocation/geolocation_provider.h"
#include "content/public/browser/geolocation_provider.h"
#include "content/public/common/geoposition.h"
namespace {
void SetPosition(const content::Geoposition& source, CefGeoposition& target) {
target.latitude = source.latitude;
target.longitude = source.longitude;
target.altitude = source.altitude;
target.accuracy = source.accuracy;
target.altitude_accuracy = source.altitude_accuracy;
target.heading = source.heading;
target.speed = source.speed;
cef_time_from_basetime(source.timestamp, target.timestamp);
class CefLocationRequest :
public base::RefCountedThreadSafe<CefLocationRequest> {
public:
explicit CefLocationRequest(CefRefPtr<CefGetGeolocationCallback> callback)
: callback_(callback) {
CEF_REQUIRE_IOT();
geo_callback_ = base::Bind(&CefLocationRequest::OnLocationUpdate, this);
content::GeolocationProvider* provider =
content::GeolocationProvider::GetInstance();
provider->AddLocationUpdateCallback(geo_callback_, true);
provider->UserDidOptIntoLocationServices();
}
private:
void OnLocationUpdate(const content::Geoposition& position) {
if (CEF_CURRENTLY_ON_UIT()) {
if (callback_) {
CefGeoposition cef_position;
SetPosition(position, cef_position);
callback_->OnLocationUpdate(cef_position);
callback_ = NULL;
}
} else {
content::GeolocationProvider::GetInstance()->RemoveLocationUpdateCallback(
geo_callback_);
geo_callback_.Reset();
switch (source.error_code) {
case content::Geoposition::ERROR_CODE_NONE:
target.error_code = GEOPOSITON_ERROR_NONE;
break;
case content::Geoposition::ERROR_CODE_PERMISSION_DENIED:
target.error_code = GEOPOSITON_ERROR_PERMISSION_DENIED;
break;
case content::Geoposition::ERROR_CODE_POSITION_UNAVAILABLE:
target.error_code = GEOPOSITON_ERROR_POSITION_UNAVAILABLE;
break;
case content::Geoposition::ERROR_CODE_TIMEOUT:
target.error_code = GEOPOSITON_ERROR_TIMEOUT;
break;
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefLocationRequest::OnLocationUpdate, this, position));
}
}
CefString(&target.error_message) = source.error_message;
}
void SetPosition(const content::Geoposition& source, CefGeoposition& target) {
target.latitude = source.latitude;
target.longitude = source.longitude;
target.altitude = source.altitude;
target.accuracy = source.accuracy;
target.altitude_accuracy = source.altitude_accuracy;
target.heading = source.heading;
target.speed = source.speed;
cef_time_from_basetime(source.timestamp, target.timestamp);
void LocationCallback(CefRefPtr<CefGetGeolocationCallback> callback,
const content::Geoposition& position) {
if (CEF_CURRENTLY_ON_UIT()) {
CefGeoposition cef_position;
SetPosition(position, cef_position);
callback->OnLocationUpdate(cef_position);
} else {
CEF_POST_TASK(CEF_UIT, base::Bind(LocationCallback, callback, position));
switch (source.error_code) {
case content::Geoposition::ERROR_CODE_NONE:
target.error_code = GEOPOSITON_ERROR_NONE;
break;
case content::Geoposition::ERROR_CODE_PERMISSION_DENIED:
target.error_code = GEOPOSITON_ERROR_PERMISSION_DENIED;
break;
case content::Geoposition::ERROR_CODE_POSITION_UNAVAILABLE:
target.error_code = GEOPOSITON_ERROR_POSITION_UNAVAILABLE;
break;
case content::Geoposition::ERROR_CODE_TIMEOUT:
target.error_code = GEOPOSITON_ERROR_TIMEOUT;
break;
}
CefString(&target.error_message) = source.error_message;
}
}
CefRefPtr<CefGetGeolocationCallback> callback_;
content::GeolocationProvider::LocationUpdateCallback geo_callback_;
DISALLOW_COPY_AND_ASSIGN(CefLocationRequest);
};
} // namespace
......@@ -65,10 +92,9 @@ bool CefGetGeolocation(CefRefPtr<CefGetGeolocationCallback> callback) {
}
if (CEF_CURRENTLY_ON_IOT()) {
content::GeolocationProvider* provider =
content::GeolocationProvider::GetInstance();
if (provider) {
provider->RequestCallback(base::Bind(LocationCallback, callback));
if (content::GeolocationProvider::GetInstance()) {
// Will be released after the callback executes.
new CefLocationRequest(callback);
return true;
}
return false;
......
......@@ -51,7 +51,8 @@ bool CefMenuCreatorRunnerMac::RunContextMenu(CefMenuCreator* manager) {
{
// Make sure events can be pumped while the menu is up.
MessageLoop::ScopedNestableTaskAllower allow(base::MessageLoop::current());
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
// One of the events that could be pumped is |window.close()|.
// User-initiated event-tracking loops protect against this by
......
......@@ -19,7 +19,8 @@ bool CefMenuCreatorRunnerWin::RunContextMenu(CefMenuCreator* manager) {
menu_->Rebuild(NULL);
// Make sure events can be pumped while the menu is up.
MessageLoop::ScopedNestableTaskAllower allow(base::MessageLoop::current());
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
gfx::Point screen_point;
......
......@@ -5,10 +5,14 @@
#include "base/logging.h"
#include "components/user_prefs/pref_registry_syncable.h"
namespace user_prefs {
// Required by PrefProxyConfigTrackerImpl::RegisterUserPrefs.
void PrefRegistrySyncable::RegisterDictionaryPref(
const char* path,
base::DictionaryValue* default_value,
const char* path,
base::DictionaryValue* default_value,
PrefSyncStatus sync_status) {
NOTREACHED();
}
} // namespace user_prefs
......@@ -18,7 +18,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h"
#endif
#include "webkit/glue/webcursor.h"
#include "webkit/common/cursors/webcursor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
namespace {
......
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#include "libcef/browser/scheme_registration.h"
#include "libcef/browser/scheme_handler.h"
#include <string>
#include "libcef/browser/chrome_scheme_handler.h"
#include "libcef/browser/devtools_scheme_handler.h"
#include "libcef/renderer/content_renderer_client.h"
#include "libcef/common/scheme_registration.h"
#include "content/public/common/url_constants.h"
#include "net/url_request/data_protocol_handler.h"
#include "net/url_request/file_protocol_handler.h"
#include "net/url_request/url_request_job_factory_impl.h"
namespace scheme {
void AddInternalStandardSchemes(std::vector<std::string>* standard_schemes) {
static struct {
const char* name;
bool is_local;
bool is_display_isolated;
} schemes[] = {
{ chrome::kChromeUIScheme, true, true },
{ chrome::kChromeDevToolsScheme, true, false }
};
for (size_t i = 0; i < sizeof(schemes) / sizeof(schemes[0]); ++i)
standard_schemes->push_back(schemes[i].name);
if (CefContentRendererClient::Get()) {
// Running in single-process mode. Register the schemes with WebKit.
for (size_t i = 0; i < sizeof(schemes) / sizeof(schemes[0]); ++i) {
CefContentRendererClient::Get()->AddCustomScheme(
schemes[i].name, true, schemes[i].is_local,
schemes[i].is_display_isolated);
}
}
}
bool IsInternalProtectedScheme(const std::string& scheme) {
// These values originate from StoragePartitionImplMap::Get() in
// content/browser/storage_partition_impl_map.cc and are modified by
// InstallInternalHandlers().
static const char* schemes[] = {
chrome::kBlobScheme,
chrome::kChromeUIScheme,
chrome::kFileSystemScheme,
};
for (size_t i = 0; i < sizeof(schemes) / sizeof(schemes[0]); ++i) {
if (scheme == schemes[i])
return true;
}
return false;
}
void InstallInternalProtectedHandlers(
net::URLRequestJobFactoryImpl* job_factory,
content::ProtocolHandlerMap* protocol_handlers) {
protocol_handlers->insert(
std::make_pair(chrome::kDataScheme, new net::DataProtocolHandler));
protocol_handlers->insert(
std::make_pair(chrome::kFileScheme, new net::FileProtocolHandler));
for (content::ProtocolHandlerMap::iterator it =
protocol_handlers->begin();
it != protocol_handlers->end();
......@@ -76,8 +45,8 @@ void InstallInternalProtectedHandlers(
protocol_handler.reset(it->second.release());
}
// Make sure IsInternalScheme() stays synchronized with what Chromium is
// actually giving us.
// Make sure IsInternalProtectedScheme() stays synchronized with what
// Chromium is actually giving us.
DCHECK(IsInternalProtectedScheme(scheme));
bool set_protocol = job_factory->SetProtocolHandler(
......
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef CEF_LIBCEF_BROWSER_SCHEME_REGISTRATION_H_
#define CEF_LIBCEF_BROWSER_SCHEME_REGISTRATION_H_
#ifndef CEF_LIBCEF_BROWSER_SCHEME_HANDLER_H_
#define CEF_LIBCEF_BROWSER_SCHEME_HANDLER_H_
#pragma once
#include <string>
#include <vector>
#include "include/cef_frame.h"
#include "content/public/browser/content_browser_client.h"
......@@ -20,16 +17,6 @@ class URLRequestJobFactoryImpl;
namespace scheme {
// Add internal standard schemes.
void AddInternalStandardSchemes(std::vector<std::string>* standard_schemes);
// Returns true if the specified |scheme| is handled internally and should not
// be explicitly registered or unregistered with the URLRequestJobFactory. A
// registered handler for one of these schemes (like "chrome") may still be
// triggered via chaining from an existing ProtocolHandler. |scheme| should
// always be a lower-case string.
bool IsInternalProtectedScheme(const std::string& scheme);
// Install the internal scheme handlers provided by Chromium that cannot be
// overridden.
void InstallInternalProtectedHandlers(
......@@ -44,4 +31,4 @@ void DidFinishLoad(CefRefPtr<CefFrame> frame, const GURL& validated_url);
} // namespace scheme
#endif // CEF_LIBCEF_BROWSER_SCHEME_REGISTRATION_H_
#endif // CEF_LIBCEF_BROWSER_SCHEME_HANDLER_H_
......@@ -11,11 +11,12 @@
#include "libcef/browser/browser_host_impl.h"
#include "libcef/browser/context.h"
#include "libcef/browser/resource_request_job.h"
#include "libcef/browser/scheme_registration.h"
#include "libcef/browser/scheme_handler.h"
#include "libcef/browser/thread_util.h"
#include "libcef/browser/url_request_context_getter.h"
#include "libcef/common/request_impl.h"
#include "libcef/common/response_impl.h"
#include "libcef/common/scheme_registration.h"
#include "base/bind.h"
#include "base/lazy_instance.h"
......@@ -30,13 +31,8 @@
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_about_job.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_data_job.h"
#include "net/url_request/url_request_error_job.h"
#include "net/url_request/url_request_file_job.h"
#include "net/url_request/url_request_filter.h"
#include "net/url_request/url_request_ftp_job.h"
#include "net/url_request/url_request_http_job.h"
#include "net/url_request/url_request_job.h"
#include "net/url_request/url_request_job_factory_impl.h"
......@@ -58,10 +54,6 @@ struct SchemeToFactory {
static const SchemeToFactory kBuiltinFactories[] = {
{ "http", net::URLRequestHttpJob::Factory },
{ "https", net::URLRequestHttpJob::Factory },
{ "file", net::URLRequestFileJob::Factory },
{ "ftp", net::URLRequestFtpJob::Factory },
{ "about", net::URLRequestAboutJob::Factory },
{ "data", net::URLRequestDataJob::Factory },
};
bool IsBuiltinScheme(const std::string& scheme) {
......@@ -301,8 +293,7 @@ class CefUrlRequestManager {
return job;
}
// Map (scheme, domain) to factories. This map will only be accessed on the IO
// thread.
// Map (scheme, domain) to factories. Will only be accessed on the IO thread.
typedef std::map<std::pair<std::string, std::string>,
CefRefPtr<CefSchemeHandlerFactory> > HandlerMap;
HandlerMap handler_map_;
......
......@@ -11,7 +11,7 @@
#include <vector>
#include "libcef/browser/context.h"
#include "libcef/browser/scheme_registration.h"
#include "libcef/browser/scheme_handler.h"
#include "libcef/browser/thread_util.h"
#include "libcef/browser/url_network_delegate.h"
#include "libcef/browser/url_request_context_proxy.h"
......@@ -33,7 +33,6 @@
#include "net/cert/cert_verifier.h"
#include "net/cookies/cookie_monster.h"
#include "net/dns/host_resolver.h"
#include "net/ftp/ftp_network_layer.h"
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_cache.h"
#include "net/http/http_server_properties_impl.h"
......@@ -133,6 +132,7 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
net::HttpCache::DefaultBackend* main_backend =
new net::HttpCache::DefaultBackend(
cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE,
net::CACHE_BACKEND_DEFAULT,
cache_path,
0,
BrowserThread::GetMessageLoopProxyForThread(
......@@ -163,9 +163,6 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
main_backend);
storage_->set_http_transaction_factory(main_cache);
storage_->set_ftp_transaction_factory(
new net::FtpNetworkLayer(url_request_context_->host_resolver()));