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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/queue.cc

Issue 813403005: [fsp] Fix unhappy MSAN build bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/file_system_provider/queue.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/location.h" 6 #include "base/location.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "chrome/browser/chromeos/file_system_provider/queue.h" 10 #include "chrome/browser/chromeos/file_system_provider/queue.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 namespace file_system_provider { 13 namespace file_system_provider {
14 14
15 struct Queue::Task { 15 Queue::Task::Task() : token(0), completed(false) {
16 Task() : token(0), completed(false) {} 16 }
17 Task(size_t token, const AbortableCallback& callback)
18 : token(token), completed(false), callback(callback) {}
19 17
20 size_t token; 18 Queue::Task::Task(size_t token, const AbortableCallback& callback)
21 bool completed; 19 : token(token), completed(false), callback(callback) {
22 AbortableCallback callback; 20 }
23 AbortCallback abort_callback; 21
24 }; 22 Queue::Task::~Task() {
23 }
25 24
26 Queue::Queue(size_t max_in_parallel) 25 Queue::Queue(size_t max_in_parallel)
27 : max_in_parallel_(max_in_parallel), 26 : max_in_parallel_(max_in_parallel),
28 next_token_(1), 27 next_token_(1),
29 weak_ptr_factory_(this) { 28 weak_ptr_factory_(this) {
30 DCHECK_LT(0u, max_in_parallel); 29 DCHECK_LT(0u, max_in_parallel);
31 } 30 }
32 31
33 Queue::~Queue() { 32 Queue::~Queue() {
34 } 33 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return; 109 return;
111 } 110 }
112 } 111 }
113 112
114 // The task is already removed. 113 // The task is already removed.
115 callback.Run(base::File::FILE_ERROR_INVALID_OPERATION); 114 callback.Run(base::File::FILE_ERROR_INVALID_OPERATION);
116 } 115 }
117 116
118 } // namespace file_system_provider 117 } // namespace file_system_provider
119 } // namespace chromeos 118 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_system_provider/queue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698