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

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

Issue 3165055: Actually allow recursive=true to be set in net::DirectoryLister... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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
« no previous file with comments | « no previous file | 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 message_loop_(NULL), 105 message_loop_(NULL),
106 thread_(kNullThreadHandle) { 106 thread_(kNullThreadHandle) {
107 DCHECK(!dir.value().empty()); 107 DCHECK(!dir.value().empty());
108 } 108 }
109 109
110 DirectoryLister::DirectoryLister(const FilePath& dir, 110 DirectoryLister::DirectoryLister(const FilePath& dir,
111 bool recursive, 111 bool recursive,
112 SORT_TYPE sort, 112 SORT_TYPE sort,
113 DirectoryListerDelegate* delegate) 113 DirectoryListerDelegate* delegate)
114 : dir_(dir), 114 : dir_(dir),
115 recursive_(false), 115 recursive_(recursive),
116 delegate_(delegate), 116 delegate_(delegate),
117 sort_(sort), 117 sort_(sort),
118 message_loop_(NULL), 118 message_loop_(NULL),
119 thread_(kNullThreadHandle) { 119 thread_(kNullThreadHandle) {
120 DCHECK(!dir.value().empty()); 120 DCHECK(!dir.value().empty());
121 } 121 }
122 122
123 DirectoryLister::~DirectoryLister() { 123 DirectoryLister::~DirectoryLister() {
124 if (thread_) { 124 if (thread_) {
125 PlatformThread::Join(thread_); 125 PlatformThread::Join(thread_);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // If canceled is set, we need to report some kind of error, 223 // If canceled is set, we need to report some kind of error,
224 // but don't overwrite the error condition if it is already set. 224 // but don't overwrite the error condition if it is already set.
225 if (!error && canceled_.IsSet()) 225 if (!error && canceled_.IsSet())
226 error = net::ERR_ABORTED; 226 error = net::ERR_ABORTED;
227 227
228 if (delegate_) 228 if (delegate_)
229 delegate_->OnListDone(error); 229 delegate_->OnListDone(error);
230 } 230 }
231 231
232 } // namespace net 232 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698