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 "chrome/browser/google_apis/request_sender.h" | 5 #include "chrome/browser/google_apis/request_sender.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/google_apis/auth_service.h" | 8 #include "chrome/browser/google_apis/auth_service.h" |
9 #include "chrome/browser/google_apis/base_requests.h" | 9 #include "chrome/browser/google_apis/base_requests.h" |
10 | 10 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 StartRequestWithRetry(request); | 86 StartRequestWithRetry(request); |
87 } | 87 } |
88 | 88 |
89 void RequestSender::CancelRequest( | 89 void RequestSender::CancelRequest( |
90 const base::WeakPtr<AuthenticatedRequestInterface>& request) { | 90 const base::WeakPtr<AuthenticatedRequestInterface>& request) { |
91 DCHECK(thread_checker_.CalledOnValidThread()); | 91 DCHECK(thread_checker_.CalledOnValidThread()); |
92 | 92 |
93 // Do nothing if the request is already finished. | 93 // Do nothing if the request is already finished. |
94 if (!request.get()) | 94 if (!request.get()) |
95 return; | 95 return; |
96 request_registry_->CancelRequest(request->AsRequestRegistryRequest()); | 96 request->Cancel(); |
97 } | 97 } |
98 | 98 |
99 } // namespace google_apis | 99 } // namespace google_apis |
OLD | NEW |