| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/webui/url_data_source_impl.h" | 5 #include "content/browser/webui/url_data_source_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.h" |
| 9 #include "base/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "content/browser/webui/url_data_manager_backend.h" | 10 #include "content/browser/webui/url_data_manager_backend.h" |
| 11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "content/public/browser/url_data_source.h" | 12 #include "content/public/browser/url_data_source.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 URLDataSourceImpl::URLDataSourceImpl(const std::string& source_name, | 16 URLDataSourceImpl::URLDataSourceImpl(const std::string& source_name, |
| 17 URLDataSource* source) | 17 URLDataSource* source) |
| 18 : source_name_(source_name), | 18 : source_name_(source_name), |
| 19 backend_(NULL), | 19 backend_(NULL), |
| (...skipping 30 matching lines...) Expand all Loading... |
| 50 | 50 |
| 51 void URLDataSourceImpl::SendResponseOnIOThread( | 51 void URLDataSourceImpl::SendResponseOnIOThread( |
| 52 int request_id, | 52 int request_id, |
| 53 scoped_refptr<base::RefCountedMemory> bytes) { | 53 scoped_refptr<base::RefCountedMemory> bytes) { |
| 54 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 54 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 55 if (backend_) | 55 if (backend_) |
| 56 backend_->DataAvailable(request_id, bytes.get()); | 56 backend_->DataAvailable(request_id, bytes.get()); |
| 57 } | 57 } |
| 58 | 58 |
| 59 } // namespace content | 59 } // namespace content |
| OLD | NEW |