| 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 "net/url_request/url_request_error_job.h" |   5 #include "net/url_request/url_request_error_job.h" | 
|   6  |   6  | 
|   7 #include "base/bind.h" |   7 #include "base/bind.h" | 
|   8 #include "base/compiler_specific.h" |   8 #include "base/compiler_specific.h" | 
|   9 #include "base/location.h" |   9 #include "base/location.h" | 
|  10 #include "base/single_thread_task_runner.h" |  10 #include "base/single_thread_task_runner.h" | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
|  21       weak_factory_(this) {} |  21       weak_factory_(this) {} | 
|  22  |  22  | 
|  23 URLRequestErrorJob::~URLRequestErrorJob() {} |  23 URLRequestErrorJob::~URLRequestErrorJob() {} | 
|  24  |  24  | 
|  25 void URLRequestErrorJob::Start() { |  25 void URLRequestErrorJob::Start() { | 
|  26   base::ThreadTaskRunnerHandle::Get()->PostTask( |  26   base::ThreadTaskRunnerHandle::Get()->PostTask( | 
|  27       FROM_HERE, |  27       FROM_HERE, | 
|  28       base::Bind(&URLRequestErrorJob::StartAsync, weak_factory_.GetWeakPtr())); |  28       base::Bind(&URLRequestErrorJob::StartAsync, weak_factory_.GetWeakPtr())); | 
|  29 } |  29 } | 
|  30  |  30  | 
 |  31 void URLRequestErrorJob::Kill() { | 
 |  32   weak_factory_.InvalidateWeakPtrs(); | 
 |  33   URLRequestJob::Kill(); | 
 |  34 } | 
 |  35  | 
|  31 void URLRequestErrorJob::StartAsync() { |  36 void URLRequestErrorJob::StartAsync() { | 
|  32   NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, error_)); |  37   NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, error_)); | 
|  33 } |  38 } | 
|  34  |  39  | 
|  35 }  // namespace net |  40 }  // namespace net | 
| OLD | NEW |