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

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

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_garbage_collector.cc
diff --git a/chrome/browser/extensions/extension_garbage_collector.cc b/chrome/browser/extensions/extension_garbage_collector.cc
index ff9e72ad22567df6ac52de2f9704231c8a3154f1..e24e5ad0247a3a81cb34854140b10ac78fb29975 100644
--- a/chrome/browser/extensions/extension_garbage_collector.cc
+++ b/chrome/browser/extensions/extension_garbage_collector.cc
@@ -5,6 +5,8 @@
#include "chrome/browser/extensions/extension_garbage_collector.h"
#include <stddef.h>
+
+#include <memory>
#include <utility>
#include "base/bind.h"
@@ -12,7 +14,6 @@
#include "base/files/file_util.h"
#include "base/location.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/sequenced_task_runner.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
@@ -184,7 +185,7 @@ void ExtensionGarbageCollector::GarbageCollectExtensions() {
return;
}
- scoped_ptr<ExtensionPrefs::ExtensionsInfo> info(
+ std::unique_ptr<ExtensionPrefs::ExtensionsInfo> info(
extension_prefs->GetInstalledExtensionsInfo());
std::multimap<std::string, base::FilePath> extension_paths;
for (size_t i = 0; i < info->size(); ++i) {
@@ -218,9 +219,9 @@ void ExtensionGarbageCollector::GarbageCollectIsolatedStorageIfNeeded() {
return;
extension_prefs->SetNeedsStorageGarbageCollection(false);
- scoped_ptr<base::hash_set<base::FilePath> > active_paths(
+ std::unique_ptr<base::hash_set<base::FilePath>> active_paths(
new base::hash_set<base::FilePath>());
- scoped_ptr<ExtensionSet> extensions =
+ std::unique_ptr<ExtensionSet> extensions =
ExtensionRegistry::Get(context_)->GenerateInstalledExtensionsSet();
for (ExtensionSet::const_iterator iter = extensions->begin();
iter != extensions->end();

Powered by Google App Engine
This is Rietveld 408576698