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

Side by Side Diff: chrome/browser/dom_ui/chrome_url_data_manager.cc

Issue 306032: Simplify threading in browser thread by making only ChromeThread deal with di... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: a few more simplifications Created 11 years, 1 month 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/dom_ui/chrome_url_data_manager.h" 5 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // feet of any method invoked here (we could trigger a callback). 266 // feet of any method invoked here (we could trigger a callback).
267 scoped_refptr<URLRequestChromeJob> job = i->second; 267 scoped_refptr<URLRequestChromeJob> job = i->second;
268 pending_requests_.erase(i); 268 pending_requests_.erase(i);
269 job->DataAvailable(bytes); 269 job->DataAvailable(bytes);
270 } 270 }
271 } 271 }
272 272
273 void ChromeURLDataManager::DataSource::SendResponse( 273 void ChromeURLDataManager::DataSource::SendResponse(
274 RequestID request_id, 274 RequestID request_id,
275 RefCountedMemory* bytes) { 275 RefCountedMemory* bytes) {
276 ChromeThread::GetMessageLoop(ChromeThread::IO)->PostTask(FROM_HERE, 276 ChromeThread::PostTask(
277 ChromeThread::IO, FROM_HERE,
277 NewRunnableMethod(&chrome_url_data_manager, 278 NewRunnableMethod(&chrome_url_data_manager,
278 &ChromeURLDataManager::DataAvailable, 279 &ChromeURLDataManager::DataAvailable,
279 request_id, scoped_refptr<RefCountedMemory>(bytes))); 280 request_id, scoped_refptr<RefCountedMemory>(bytes)));
280 } 281 }
281 282
282 MessageLoop* ChromeURLDataManager::DataSource::MessageLoopForRequestPath( 283 MessageLoop* ChromeURLDataManager::DataSource::MessageLoopForRequestPath(
283 const std::string& path) const { 284 const std::string& path) const {
284 return message_loop_; 285 return message_loop_;
285 } 286 }
286 287
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 net::ERR_INVALID_URL)); 428 net::ERR_INVALID_URL));
428 } 429 }
429 } 430 }
430 431
431 URLRequestChromeFileJob::URLRequestChromeFileJob(URLRequest* request, 432 URLRequestChromeFileJob::URLRequestChromeFileJob(URLRequest* request,
432 const FilePath& path) 433 const FilePath& path)
433 : URLRequestFileJob(request, path) { 434 : URLRequestFileJob(request, path) {
434 } 435 }
435 436
436 URLRequestChromeFileJob::~URLRequestChromeFileJob() { } 437 URLRequestChromeFileJob::~URLRequestChromeFileJob() { }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698