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

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

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 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 | « jingle/notifier/listener/mediator_thread_unittest.cc ('k') | net/base/host_resolver_impl.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 : dir_(dir), 164 : dir_(dir),
165 recursive_(recursive), 165 recursive_(recursive),
166 sort_(sort), 166 sort_(sort),
167 lister_(lister) { 167 lister_(lister) {
168 DCHECK(lister_); 168 DCHECK(lister_);
169 } 169 }
170 170
171 DirectoryLister::Core::~Core() {} 171 DirectoryLister::Core::~Core() {}
172 172
173 bool DirectoryLister::Core::Start() { 173 bool DirectoryLister::Core::Start() {
174 origin_loop_ = base::MessageLoopProxy::CreateForCurrentThread(); 174 origin_loop_ = base::MessageLoopProxy::current();
175 175
176 return base::WorkerPool::PostTask( 176 return base::WorkerPool::PostTask(
177 FROM_HERE, NewRunnableMethod(this, &Core::StartInternal), true); 177 FROM_HERE, NewRunnableMethod(this, &Core::StartInternal), true);
178 } 178 }
179 179
180 void DirectoryLister::Core::Cancel() { 180 void DirectoryLister::Core::Cancel() {
181 lister_ = NULL; 181 lister_ = NULL;
182 } 182 }
183 183
184 void DirectoryLister::Core::StartInternal() { 184 void DirectoryLister::Core::StartInternal() {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 void DirectoryLister::OnReceivedData(const DirectoryListerData& data) { 242 void DirectoryLister::OnReceivedData(const DirectoryListerData& data) {
243 delegate_->OnListFile(data); 243 delegate_->OnListFile(data);
244 } 244 }
245 245
246 void DirectoryLister::OnDone(int error) { 246 void DirectoryLister::OnDone(int error) {
247 delegate_->OnListDone(error); 247 delegate_->OnListDone(error);
248 } 248 }
249 249
250 } // namespace net 250 } // namespace net
OLDNEW
« no previous file with comments | « jingle/notifier/listener/mediator_thread_unittest.cc ('k') | net/base/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698