| Index: content/browser/appcache/appcache_job.cc
|
| diff --git a/content/browser/appcache/appcache_job.cc b/content/browser/appcache/appcache_job.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ec7d6ff357d323cff023d783ea369f367765d62b
|
| --- /dev/null
|
| +++ b/content/browser/appcache/appcache_job.cc
|
| @@ -0,0 +1,45 @@
|
| +// Copyright (c) 2017 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/appcache/appcache_job.h"
|
| +#include "content/browser/appcache/appcache_request.h"
|
| +#include "content/browser/appcache/appcache_url_loader_job.h"
|
| +#include "content/browser/appcache/appcache_url_request_job.h"
|
| +
|
| +namespace content {
|
| +
|
| +std::unique_ptr<AppCacheJob> AppCacheJob::Create(
|
| + kJobType job_type,
|
| + bool is_main_resource,
|
| + AppCacheHost* host,
|
| + AppCacheStorage* storage,
|
| + AppCacheRequest* request,
|
| + net::NetworkDelegate* network_delegate,
|
| + const OnPrepareToRestartCallback& restart_callback) {
|
| + std::unique_ptr<AppCacheJob> job;
|
| + if (job_type == kJobType::URL_REQUEST_JOB) {
|
| + job.reset(new AppCacheURLRequestJob(request->GetURLRequest(),
|
| + network_delegate, storage, host,
|
| + is_main_resource, restart_callback));
|
| + } else if (job_type == kJobType::URL_LOADER_JOB) {
|
| + job.reset(new AppCacheURLLoaderJob);
|
| + } else {
|
| + NOTREACHED();
|
| + }
|
| + return job;
|
| +}
|
| +
|
| +AppCacheJob::~AppCacheJob() {}
|
| +
|
| +base::WeakPtr<AppCacheJob> AppCacheJob::GetWeakPtr() {
|
| + return weak_factory_.GetWeakPtr();
|
| +}
|
| +
|
| +net::URLRequestJob* AppCacheJob::AsURLRequestJob() {
|
| + return nullptr;
|
| +}
|
| +
|
| +AppCacheJob::AppCacheJob() : weak_factory_(this) {}
|
| +
|
| +} // namespace content
|
|
|