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

Unified Diff: chrome/browser/extensions/extension_management.cc

Issue 2310683002: Remove most ScopedVector usage from c/b/extensions. (Closed)
Patch Set: remove scoped_vector includes Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_management.h ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_management.cc
diff --git a/chrome/browser/extensions/extension_management.cc b/chrome/browser/extensions/extension_management.cc
index 6b926d7b03e41d625379e5902b1556778cce24e0..c7e5f4fa26978c31cc3e31cc5f39ddc9d25f58b0 100644
--- a/chrome/browser/extensions/extension_management.cc
+++ b/chrome/browser/extensions/extension_management.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
@@ -59,8 +60,10 @@ ExtensionManagement::ExtensionManagement(PrefService* pref_service)
// before first call to Refresh(), so in order to resolve this, Refresh() must
// be called in the initialization of ExtensionManagement.
Refresh();
- providers_.push_back(new StandardManagementPolicyProvider(this));
- providers_.push_back(new PermissionsBasedManagementPolicyProvider(this));
+ providers_.push_back(
+ base::MakeUnique<StandardManagementPolicyProvider>(this));
+ providers_.push_back(
+ base::MakeUnique<PermissionsBasedManagementPolicyProvider>(this));
}
ExtensionManagement::~ExtensionManagement() {
@@ -79,9 +82,9 @@ void ExtensionManagement::RemoveObserver(Observer* observer) {
observer_list_.RemoveObserver(observer);
}
-std::vector<ManagementPolicy::Provider*> ExtensionManagement::GetProviders()
- const {
- return providers_.get();
+const std::vector<std::unique_ptr<ManagementPolicy::Provider>>&
+ExtensionManagement::GetProviders() const {
+ return providers_;
}
bool ExtensionManagement::BlacklistedByDefault() const {
« no previous file with comments | « chrome/browser/extensions/extension_management.h ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698