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

Side by Side Diff: extensions/browser/service_worker_manager.h

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "base/macros.h" 5 #include "base/macros.h"
6 #include "base/scoped_observer.h" 6 #include "base/scoped_observer.h"
7 #include "extensions/browser/extension_registry_observer.h" 7 #include "extensions/browser/extension_registry_observer.h"
8 8
9 namespace content { 9 namespace content {
10 class BrowserContext; 10 class BrowserContext;
11 } 11 }
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 // A helper class to manage extension service workers. Handles suspending 15 // A helper class to manage extension service workers. Handles suspending
16 // them when the extension is unloaded and removing them when the extension is 16 // them when the extension is unloaded and removing them when the extension is
17 // uninstalled. 17 // uninstalled.
18 class ServiceWorkerManager : public ExtensionRegistryObserver { 18 class ServiceWorkerManager : public ExtensionRegistryObserver {
19 public: 19 public:
20 explicit ServiceWorkerManager(content::BrowserContext* browser_context); 20 explicit ServiceWorkerManager(content::BrowserContext* browser_context);
21 ~ServiceWorkerManager() override; 21 ~ServiceWorkerManager() override;
22 22
23 private: 23 private:
24 // ExtensionRegistryObserver: 24 // ExtensionRegistryObserver:
25 void OnExtensionUnloaded(content::BrowserContext* browser_context, 25 void OnExtensionUnloaded(content::BrowserContext* browser_context,
26 const Extension* extension, 26 const Extension* extension,
27 UnloadedExtensionInfo::Reason reason) override; 27 UnloadedExtensionReason reason) override;
28 void OnExtensionUninstalled(content::BrowserContext* browser_context, 28 void OnExtensionUninstalled(content::BrowserContext* browser_context,
29 const Extension* extension, 29 const Extension* extension,
30 extensions::UninstallReason reason) override; 30 extensions::UninstallReason reason) override;
31 31
32 content::BrowserContext* browser_context_; 32 content::BrowserContext* browser_context_;
33 33
34 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 34 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
35 registry_observer_; 35 registry_observer_;
36 36
37 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerManager); 37 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerManager);
38 }; 38 };
39 39
40 } // namespace extensions 40 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/runtime_data_unittest.cc ('k') | extensions/browser/service_worker_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698