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

Unified Diff: components/precache/core/fetcher_pool.h

Issue 1921923002: Convert //components/[o-t]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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: components/precache/core/fetcher_pool.h
diff --git a/components/precache/core/fetcher_pool.h b/components/precache/core/fetcher_pool.h
index 67e9a972759090f92b8e53e69871801d48985eb6..1a9cd1cd73c96845a67dce24343cefa6545dfd20 100644
--- a/components/precache/core/fetcher_pool.h
+++ b/components/precache/core/fetcher_pool.h
@@ -5,10 +5,10 @@
#ifndef COMPONENTS_PRECACHE_CORE_FETCHER_POOL_H_
#define COMPONENTS_PRECACHE_CORE_FETCHER_POOL_H_
+#include <memory>
#include <unordered_map>
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
namespace precache {
@@ -42,7 +42,7 @@ class FetcherPool {
// Takes ownership and adds the given |element| to the pool.
// The element will live until its deletion.
- void Add(scoped_ptr<T> element) {
+ void Add(std::unique_ptr<T> element) {
DCHECK(IsAvailable()) << "FetcherPool size exceeded. "
"Did you check IsAvailable?";
DCHECK(element) << "The element cannot be null.";
@@ -69,7 +69,7 @@ class FetcherPool {
private:
const size_t max_size_;
- std::unordered_map<const T*, scoped_ptr<T>> elements_;
+ std::unordered_map<const T*, std::unique_ptr<T>> elements_;
DISALLOW_COPY_AND_ASSIGN(FetcherPool);
};
« no previous file with comments | « components/precache/content/precache_manager_unittest.cc ('k') | components/precache/core/fetcher_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698