OLD | NEW |
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" |
11 #include "base/i18n/file_util_icu.h" | 11 #include "base/i18n/file_util_icu.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/platform_thread.h" | 13 #include "base/platform_thread.h" |
14 #include "base/thread_restrictions.h" | 14 #include "base/threading/thread_restrictions.h" |
15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 | 18 |
19 static const int kFilesPerEvent = 8; | 19 static const int kFilesPerEvent = 8; |
20 | 20 |
21 // A task which is used to signal the delegate asynchronously. | 21 // A task which is used to signal the delegate asynchronously. |
22 class DirectoryDataEvent : public Task { | 22 class DirectoryDataEvent : public Task { |
23 public: | 23 public: |
24 explicit DirectoryDataEvent(DirectoryLister* d) : lister(d), error(0) { | 24 explicit DirectoryDataEvent(DirectoryLister* d) : lister(d), error(0) { |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 // If canceled is set, we need to report some kind of error, | 230 // If canceled is set, we need to report some kind of error, |
231 // but don't overwrite the error condition if it is already set. | 231 // but don't overwrite the error condition if it is already set. |
232 if (!error && canceled_.IsSet()) | 232 if (!error && canceled_.IsSet()) |
233 error = net::ERR_ABORTED; | 233 error = net::ERR_ABORTED; |
234 | 234 |
235 if (delegate_) | 235 if (delegate_) |
236 delegate_->OnListDone(error); | 236 delegate_->OnListDone(error); |
237 } | 237 } |
238 | 238 |
239 } // namespace net | 239 } // namespace net |
OLD | NEW |