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

Side by Side Diff: chrome/common/cancelable_task_tracker.cc

Issue 23514018: Add Reset to ScopedClosureRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android fix 2 Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/common/cancelable_task_tracker.h" 5 #include "chrome/common/cancelable_task_tracker.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/callback_helpers.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/message_loop/message_loop_proxy.h" 14 #include "base/message_loop/message_loop_proxy.h"
15 #include "base/synchronization/cancellation_flag.h" 15 #include "base/synchronization/cancellation_flag.h"
16 #include "base/task_runner.h" 16 #include "base/task_runner.h"
17 17
18 using base::Bind; 18 using base::Bind;
19 using base::CancellationFlag; 19 using base::CancellationFlag;
20 using base::Closure; 20 using base::Closure;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 bool success = task_flags_.insert(std::make_pair(id, flag)).second; 175 bool success = task_flags_.insert(std::make_pair(id, flag)).second;
176 DCHECK(success); 176 DCHECK(success);
177 } 177 }
178 178
179 void CancelableTaskTracker::Untrack(TaskId id) { 179 void CancelableTaskTracker::Untrack(TaskId id) {
180 DCHECK(thread_checker_.CalledOnValidThread()); 180 DCHECK(thread_checker_.CalledOnValidThread());
181 size_t num = task_flags_.erase(id); 181 size_t num = task_flags_.erase(id);
182 DCHECK_EQ(1u, num); 182 DCHECK_EQ(1u, num);
183 } 183 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/ssl_client_certificate_request.cc ('k') | chromeos/dbus/blocking_method_caller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698