OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 } | 262 } |
263 | 263 |
264 void ChromeURLDataManager::DataAvailable( | 264 void ChromeURLDataManager::DataAvailable( |
265 RequestID request_id, | 265 RequestID request_id, |
266 scoped_refptr<RefCountedMemory> bytes) { | 266 scoped_refptr<RefCountedMemory> bytes) { |
267 // Forward this data on to the pending URLRequest, if it exists. | 267 // Forward this data on to the pending URLRequest, if it exists. |
268 PendingRequestMap::iterator i = pending_requests_.find(request_id); | 268 PendingRequestMap::iterator i = pending_requests_.find(request_id); |
269 if (i != pending_requests_.end()) { | 269 if (i != pending_requests_.end()) { |
270 // We acquire a reference to the job so that it doesn't disappear under the | 270 // We acquire a reference to the job so that it doesn't disappear under the |
271 // feet of any method invoked here (we could trigger a callback). | 271 // feet of any method invoked here (we could trigger a callback). |
272 scoped_refptr<URLRequestChromeJob> job = i->second; | 272 scoped_refptr<URLRequestChromeJob> job(i->second); |
273 pending_requests_.erase(i); | 273 pending_requests_.erase(i); |
274 job->DataAvailable(bytes); | 274 job->DataAvailable(bytes); |
275 } | 275 } |
276 } | 276 } |
277 | 277 |
278 ChromeURLDataManager::DataSource::DataSource(const std::string& source_name, | 278 ChromeURLDataManager::DataSource::DataSource(const std::string& source_name, |
279 MessageLoop* message_loop) | 279 MessageLoop* message_loop) |
280 : source_name_(source_name), message_loop_(message_loop) { | 280 : source_name_(source_name), message_loop_(message_loop) { |
281 } | 281 } |
282 | 282 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 net::ERR_INVALID_URL)); | 426 net::ERR_INVALID_URL)); |
427 } | 427 } |
428 } | 428 } |
429 | 429 |
430 URLRequestChromeFileJob::URLRequestChromeFileJob(URLRequest* request, | 430 URLRequestChromeFileJob::URLRequestChromeFileJob(URLRequest* request, |
431 const FilePath& path) | 431 const FilePath& path) |
432 : URLRequestFileJob(request, path) { | 432 : URLRequestFileJob(request, path) { |
433 } | 433 } |
434 | 434 |
435 URLRequestChromeFileJob::~URLRequestChromeFileJob() { } | 435 URLRequestChromeFileJob::~URLRequestChromeFileJob() { } |
OLD | NEW |