| Index: content/browser/service_worker/service_worker_request_context.cc
 | 
| diff --git a/content/browser/service_worker/service_worker_request_context.cc b/content/browser/service_worker/service_worker_request_context.cc
 | 
| new file mode 100644
 | 
| index 0000000000000000000000000000000000000000..3a300cb27afff01b65365b3ab01869a630a94b05
 | 
| --- /dev/null
 | 
| +++ b/content/browser/service_worker/service_worker_request_context.cc
 | 
| @@ -0,0 +1,55 @@
 | 
| +// Copyright 2014 The Chromium 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 "content/browser/service_worker/service_worker_request_context.h"
 | 
| +
 | 
| +#include "content/public/common/url_constants.h"
 | 
| +#include "net/url_request/url_request_job_factory_impl.h"
 | 
| +
 | 
| +namespace content {
 | 
| +
 | 
| +namespace {
 | 
| +
 | 
| +class ServiceWorkerProtocolHandler
 | 
| +    : public net::URLRequestJobFactory::ProtocolHandler {
 | 
| + public:
 | 
| +  explicit ServiceWorkerProtocolHandler() {}
 | 
| +  virtual ~ServiceWorkerProtocolHandler() {}
 | 
| +
 | 
| +  virtual net::URLRequestJob* MaybeCreateJob(
 | 
| +      net::URLRequest* request,
 | 
| +      net::NetworkDelegate* network_delegate) const OVERRIDE {
 | 
| +    // TODO(kinuko): Implement this.
 | 
| +    NOTIMPLEMENTED();
 | 
| +    return NULL;
 | 
| +  }
 | 
| +
 | 
| + private:
 | 
| +  DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProtocolHandler);
 | 
| +};
 | 
| +
 | 
| +class ServiceWorkerRequestJobFactory : public net::URLRequestJobFactoryImpl {
 | 
| + public:
 | 
| +  ServiceWorkerRequestJobFactory() {
 | 
| +    SetProtocolHandler(
 | 
| +        kHttpScheme, new ServiceWorkerProtocolHandler);
 | 
| +    SetProtocolHandler(
 | 
| +        kHttpsScheme, new ServiceWorkerProtocolHandler);
 | 
| +  }
 | 
| +};
 | 
| +
 | 
| +}  // namespace
 | 
| +
 | 
| +
 | 
| +ServiceWorkerRequestContext::ServiceWorkerRequestContext(
 | 
| +    const net::URLRequestContext* original_request_context) {
 | 
| +  CopyFrom(original_request_context);
 | 
| +  job_factory_.reset(new ServiceWorkerRequestJobFactory);
 | 
| +  set_job_factory(job_factory_.get());
 | 
| +}
 | 
| +
 | 
| +ServiceWorkerRequestContext::~ServiceWorkerRequestContext() {
 | 
| +}
 | 
| +
 | 
| +}  // namespace content
 | 
| 
 |