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

Side by Side Diff: net/base/directory_lister.cc

Issue 2854243003: Use constexpr TaskTraits constructor in net. (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
« no previous file with comments | « no previous file | net/disk_cache/blockfile/file_ios.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/base/directory_lister.h" 5 #include "net/base/directory_lister.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 DCHECK(delegate_); 74 DCHECK(delegate_);
75 DCHECK(!dir.value().empty()); 75 DCHECK(!dir.value().empty());
76 } 76 }
77 77
78 DirectoryLister::~DirectoryLister() { 78 DirectoryLister::~DirectoryLister() {
79 Cancel(); 79 Cancel();
80 } 80 }
81 81
82 void DirectoryLister::Start() { 82 void DirectoryLister::Start() {
83 base::PostTaskWithTraits( 83 base::PostTaskWithTraits(
84 FROM_HERE, base::TaskTraits().MayBlock().WithShutdownBehavior( 84 FROM_HERE,
85 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN), 85 {base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
86 base::Bind(&Core::Start, core_)); 86 base::Bind(&Core::Start, core_));
87 } 87 }
88 88
89 void DirectoryLister::Cancel() { 89 void DirectoryLister::Cancel() {
90 core_->CancelOnOriginThread(); 90 core_->CancelOnOriginThread();
91 } 91 }
92 92
93 DirectoryLister::Core::Core(const base::FilePath& dir, 93 DirectoryLister::Core::Core(const base::FilePath& dir,
94 ListingType type, 94 ListingType type,
95 DirectoryLister* lister) 95 DirectoryLister* lister)
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 void DirectoryLister::OnListFile(const DirectoryListerData& data) { 194 void DirectoryLister::OnListFile(const DirectoryListerData& data) {
195 delegate_->OnListFile(data); 195 delegate_->OnListFile(data);
196 } 196 }
197 197
198 void DirectoryLister::OnListDone(int error) { 198 void DirectoryLister::OnListDone(int error) {
199 delegate_->OnListDone(error); 199 delegate_->OnListDone(error);
200 } 200 }
201 201
202 } // namespace net 202 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/blockfile/file_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698