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

Side by Side Diff: chrome/browser/extensions/shared_module_service.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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 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 CHROME_BROWSER_EXTENSIONS_SHARED_MODULE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_SHARED_MODULE_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_SHARED_MODULE_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_SHARED_MODULE_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 const Extension* extension, 46 const Extension* extension,
47 std::list<SharedModuleInfo::ImportInfo>* missing_modules, 47 std::list<SharedModuleInfo::ImportInfo>* missing_modules,
48 std::list<SharedModuleInfo::ImportInfo>* outdated_modules); 48 std::list<SharedModuleInfo::ImportInfo>* outdated_modules);
49 49
50 // Checks an extension's shared module imports to see if they are satisfied. 50 // Checks an extension's shared module imports to see if they are satisfied.
51 // If they are not, this function adds the dependencies to the pending install 51 // If they are not, this function adds the dependencies to the pending install
52 // list if |extension| came from the webstore. 52 // list if |extension| came from the webstore.
53 ImportStatus SatisfyImports(const Extension* extension); 53 ImportStatus SatisfyImports(const Extension* extension);
54 54
55 // Returns a set of extensions that import a given extension. 55 // Returns a set of extensions that import a given extension.
56 scoped_ptr<ExtensionSet> GetDependentExtensions(const Extension* extension); 56 std::unique_ptr<ExtensionSet> GetDependentExtensions(
57 const Extension* extension);
57 58
58 private: 59 private:
59 // Uninstall shared modules which are not used by other extensions. 60 // Uninstall shared modules which are not used by other extensions.
60 void PruneSharedModules(); 61 void PruneSharedModules();
61 62
62 // ExtensionRegistryObserver implementation. 63 // ExtensionRegistryObserver implementation.
63 void OnExtensionInstalled(content::BrowserContext* browser_context, 64 void OnExtensionInstalled(content::BrowserContext* browser_context,
64 const Extension* extension, 65 const Extension* extension,
65 bool is_update) override; 66 bool is_update) override;
66 void OnExtensionUninstalled(content::BrowserContext* browser_context, 67 void OnExtensionUninstalled(content::BrowserContext* browser_context,
67 const Extension* extension, 68 const Extension* extension,
68 extensions::UninstallReason reason) override; 69 extensions::UninstallReason reason) override;
69 70
70 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 71 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
71 extension_registry_observer_; 72 extension_registry_observer_;
72 73
73 // The context associated with this SharedModuleService. 74 // The context associated with this SharedModuleService.
74 content::BrowserContext* browser_context_; 75 content::BrowserContext* browser_context_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(SharedModuleService); 77 DISALLOW_COPY_AND_ASSIGN(SharedModuleService);
77 }; 78 };
78 79
79 } // namespace extensions 80 } // namespace extensions
80 81
81 #endif // CHROME_BROWSER_EXTENSIONS_SHARED_MODULE_SERVICE_H_ 82 #endif // CHROME_BROWSER_EXTENSIONS_SHARED_MODULE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698