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

Unified Diff: base/threading/sequenced_worker_pool.cc

Issue 1641563002: Remove linked_ptr usage in //base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase, really Created 4 years, 11 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 | « base/supports_user_data.cc ('k') | chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/sequenced_worker_pool.cc
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc
index 3cc50f404c214ed75f1f540cf598f89d4d83e530..081a49f39e65d0d2a140b4254dab5ac0efb2d0bc 100644
--- a/base/threading/sequenced_worker_pool.cc
+++ b/base/threading/sequenced_worker_pool.cc
@@ -19,7 +19,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/linked_ptr.h"
+#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/condition_variable.h"
@@ -448,7 +448,7 @@ class SequencedWorkerPool::Inner {
// Owning pointers to all threads we've created so far, indexed by
// ID. Since we lazily create threads, this may be less than
// max_threads_ and will be initially empty.
- typedef std::map<PlatformThreadId, linked_ptr<Worker> > ThreadMap;
+ using ThreadMap = std::map<PlatformThreadId, scoped_ptr<Worker>>;
ThreadMap threads_;
// Set to true when we're in the process of creating another thread.
@@ -788,9 +788,8 @@ void SequencedWorkerPool::Inner::ThreadLoop(Worker* this_worker) {
AutoLock lock(lock_);
DCHECK(thread_being_created_);
thread_being_created_ = false;
- std::pair<ThreadMap::iterator, bool> result =
- threads_.insert(
- std::make_pair(this_worker->tid(), make_linked_ptr(this_worker)));
+ auto result = threads_.insert(
+ std::make_pair(this_worker->tid(), make_scoped_ptr(this_worker)));
DCHECK(result.second);
while (true) {
« no previous file with comments | « base/supports_user_data.cc ('k') | chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698