Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: content/browser/appcache/appcache_url_loader_job.h

Issue 2865613002: Add an abstraction for a job in the AppCacheRequestHandler class. (Closed)
Patch Set: Fix compile failures Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_JOB_H_
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_JOB_H_
7
8 #include "base/logging.h"
9 #include "base/strings/string16.h"
10 #include "content/browser/appcache/appcache_job.h"
11 #include "content/common/content_export.h"
12
13 namespace content {
14
15 class AppCacheHost;
16 class AppCacheRequest;
17 class AppCacheStorage;
18
19 // AppCacheJob wrapper for a mojom::URLLoader implementation which returns
20 // responses stored in the AppCache.
21 class CONTENT_EXPORT AppCacheURLLoaderJob : public AppCacheJob {
22 public:
23 ~AppCacheURLLoaderJob() override;
24
25 // AppCacheJob overrides.
26 void Kill() override;
27 bool IsStarted() const override;
28 bool IsWaiting() const override;
29 bool IsDeliveringAppCacheResponse() const override;
30 bool IsDeliveringNetworkResponse() const override;
31 bool IsDeliveringErrorResponse() const override;
32 bool IsCacheEntryNotFound() const override;
33 void DeliverAppCachedResponse(const GURL& manifest_url,
34 int64_t cache_id,
35 const AppCacheEntry& entry,
36 bool is_fallback) override;
37 void DeliverNetworkResponse() override;
38 void DeliverErrorResponse() override;
39 const GURL& GetURL() const override;
40
41 protected:
42 // AppCacheJob::Create() creates this instance.
43 friend class AppCacheJob;
44
45 AppCacheURLLoaderJob();
46
47 GURL url_;
48
49 DISALLOW_COPY_AND_ASSIGN(AppCacheURLLoaderJob);
50 };
51
52 } // namespace content
53
54 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_JOB_H_
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_request_handler_unittest.cc ('k') | content/browser/appcache/appcache_url_loader_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698