OLD | NEW |
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 Loading... |
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 Loading... |
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() { } |
OLD | NEW |