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_manager_backend.h" | 5 #include "content/browser/webui/url_data_manager_backend.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 BrowserThread::PostTask( | 287 BrowserThread::PostTask( |
288 BrowserThread::UI, | 288 BrowserThread::UI, |
289 FROM_HERE, | 289 FROM_HERE, |
290 base::Bind(&URLRequestChromeJob::DelayStartForDevTools, | 290 base::Bind(&URLRequestChromeJob::DelayStartForDevTools, |
291 weak_factory_.GetWeakPtr())); | 291 weak_factory_.GetWeakPtr())); |
292 return; | 292 return; |
293 } | 293 } |
294 | 294 |
295 // Start reading asynchronously so that all error reporting and data | 295 // Start reading asynchronously so that all error reporting and data |
296 // callbacks happen as they would for network requests. | 296 // callbacks happen as they would for network requests. |
297 base::MessageLoop::current()->PostTask( | 297 base::MessageLoop::current()->task_runner()->PostTask( |
298 FROM_HERE, | 298 FROM_HERE, |
299 base::Bind(&URLRequestChromeJob::StartAsync, weak_factory_.GetWeakPtr())); | 299 base::Bind(&URLRequestChromeJob::StartAsync, weak_factory_.GetWeakPtr())); |
300 | 300 |
301 TRACE_EVENT_ASYNC_BEGIN1("browser", "DataManager:Request", this, "URL", | 301 TRACE_EVENT_ASYNC_BEGIN1("browser", "DataManager:Request", this, "URL", |
302 url.possibly_invalid_spec()); | 302 url.possibly_invalid_spec()); |
303 } | 303 } |
304 | 304 |
305 void URLRequestChromeJob::Kill() { | 305 void URLRequestChromeJob::Kill() { |
306 weak_factory_.InvalidateWeakPtrs(); | 306 weak_factory_.InvalidateWeakPtrs(); |
307 backend_->RemoveRequest(this); | 307 backend_->RemoveRequest(this); |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 | 794 |
795 } // namespace | 795 } // namespace |
796 | 796 |
797 net::URLRequestJobFactory::ProtocolHandler* | 797 net::URLRequestJobFactory::ProtocolHandler* |
798 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, | 798 CreateDevToolsProtocolHandler(content::ResourceContext* resource_context, |
799 bool is_incognito) { | 799 bool is_incognito) { |
800 return new DevToolsJobFactory(resource_context, is_incognito); | 800 return new DevToolsJobFactory(resource_context, is_incognito); |
801 } | 801 } |
802 | 802 |
803 } // namespace content | 803 } // namespace content |
OLD | NEW |