Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: chrome/browser/google_apis/request_sender.cc

Issue 17379020: Get rid of RequestRegistry (part 5): each request cancels itself. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/google_apis/request_registry.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/request_registry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698