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

Side by Side Diff: content/browser/renderer_host/pepper/quota_reservation.cc

Issue 2873333004: Rename TaskRunner::RunsTasksOnCurrentThread() in //content (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/renderer_host/pepper/quota_reservation.h" 5 #include "content/browser/renderer_host/pepper/quota_reservation.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 callback, quota_reservation_->remaining_quota(), file_sizes)); 127 callback, quota_reservation_->remaining_quota(), file_sizes));
128 } else { 128 } else {
129 // Unit testing code path. 129 // Unit testing code path.
130 callback.Run(quota_reservation_->remaining_quota(), file_sizes); 130 callback.Run(quota_reservation_->remaining_quota(), file_sizes);
131 } 131 }
132 } 132 }
133 133
134 void QuotaReservation::DeleteOnCorrectThread() const { 134 void QuotaReservation::DeleteOnCorrectThread() const {
135 if (file_system_context_.get() && 135 if (file_system_context_.get() &&
136 !file_system_context_->default_file_task_runner() 136 !file_system_context_->default_file_task_runner()
137 ->RunsTasksOnCurrentThread()) { 137 ->RunsTasksInCurrentSequence()) {
138 file_system_context_->default_file_task_runner()->DeleteSoon(FROM_HERE, 138 file_system_context_->default_file_task_runner()->DeleteSoon(FROM_HERE,
139 this); 139 this);
140 } else { 140 } else {
141 // We're on the right thread to delete, or unit test. 141 // We're on the right thread to delete, or unit test.
142 delete this; 142 delete this;
143 } 143 }
144 } 144 }
145 145
146 } // namespace content 146 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_private_storage_helper.cc ('k') | content/browser/tracing/memory_tracing_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698