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

Side by Side Diff: content/browser/service_worker/service_worker_script_cache_map.h

Issue 377153003: Service Worker: set active worker to REDUNDANT when unregistered (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CACHE_MAP_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CACHE_MAP_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CACHE_MAP_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CACHE_MAP_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "content/browser/service_worker/service_worker_database.h" 13 #include "content/browser/service_worker/service_worker_database.h"
14 14
15 class GURL; 15 class GURL;
16 16
17 namespace content { 17 namespace content {
18 18
19 class ServiceWorkerContextCore; 19 class ServiceWorkerContextCore;
20 class ServiceWorkerVersion; 20 class ServiceWorkerVersion;
21 21
22 // Class that maintains the mapping between urls and a resource id 22 // Class that maintains the mapping between urls and a resource id
23 // for a particular versions implicit script resources. 23 // for a particular version's implicit script resources.
24 class ServiceWorkerScriptCacheMap { 24 class ServiceWorkerScriptCacheMap {
25 public: 25 public:
26 int64 Lookup(const GURL& url); 26 int64 Lookup(const GURL& url);
27 27
28 // Used during the initial run of a new version to build the map 28 // Used during the initial run of a new version to build the map
29 // of resources ids. 29 // of resources ids.
30 void NotifyStartedCaching(const GURL& url, int64 resource_id); 30 void NotifyStartedCaching(const GURL& url, int64 resource_id);
31 void NotifyFinishedCaching(const GURL& url, bool success); 31 void NotifyFinishedCaching(const GURL& url, bool success);
32 32
33 // Used to retrieve the results of the initial run of a new version. 33 // Used to retrieve the results of the initial run of a new version.
(...skipping 19 matching lines...) Expand all
53 base::WeakPtr<ServiceWorkerContextCore> context_; 53 base::WeakPtr<ServiceWorkerContextCore> context_;
54 ResourceIDMap resource_ids_; 54 ResourceIDMap resource_ids_;
55 bool has_error_; 55 bool has_error_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptCacheMap); 57 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptCacheMap);
58 }; 58 };
59 59
60 } // namespace content 60 } // namespace content
61 61
62 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CACHE_MAP_H_ 62 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CACHE_MAP_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_registration.h ('k') | content/browser/service_worker/service_worker_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698