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/string_util.h" |
10 #include "content/browser/webui/url_data_manager_backend.h" | 10 #include "content/browser/webui/url_data_manager_backend.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 BrowserThread::IO, FROM_HERE, | 46 BrowserThread::IO, FROM_HERE, |
47 base::Bind(&URLDataSourceImpl::SendResponseOnIOThread, this, request_id, | 47 base::Bind(&URLDataSourceImpl::SendResponseOnIOThread, this, request_id, |
48 bytes_ptr)); | 48 bytes_ptr)); |
49 } | 49 } |
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); | 56 backend_->DataAvailable(request_id, bytes.get()); |
57 } | 57 } |
58 | 58 |
59 } // namespace content | 59 } // namespace content |
OLD | NEW |