job_factory->SetProtocolHandler(
url::kWssScheme, new HttpProtocolHandler(url::kWssScheme));
+ auto host_resolver = url_request_context_getter()
+ ->GetURLRequestContext()
+ ->host_resolver();
+ job_factory->SetProtocolHandler(
+ url::kFtpScheme, new net::FtpProtocolHandler(
+ new net::FtpNetworkLayer(host_resolver)));
+
// Set up interceptors in the reverse order.
scoped_ptr<net::URLRequestJobFactory> top_job_factory = job_factory.Pass();
content::URLRequestInterceptorScopedVector::reverse_iterator it;
#include "content/public/renderer/render_view.h"
#include "ipc/ipc_message_macros.h"
#include "net/base/net_module.h"
+#include "net/grit/net_resources.h"
#include "third_party/WebKit/public/web/WebDraggableRegion.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
namespace {
-// A hack here:
-// Copy from net/grit/net_resources.h of chromium repository
-// since libchromiumcontent doesn't expose it.
-const int kIDR_DIR_HEADER_HTML = 4000;
-
bool GetIPCObject(v8::Isolate* isolate,
v8::Handle<v8::Context> context,
v8::Handle<v8::Object>* ipc) {
}
base::StringPiece NetResourceProvider(int key) {
- if (key == kIDR_DIR_HEADER_HTML) {
+ if (key == IDR_DIR_HEADER_HTML) {
base::StringPiece html_data =
ui::ResourceBundle::GetSharedInstance().GetRawDataResource(
- kIDR_DIR_HEADER_HTML);
+ IDR_DIR_HEADER_HTML);
return html_data;
}
return base::StringPiece();