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

Side by Side Diff: chrome/browser/common/cancelable_request.cc

Issue 10958031: Move cancelable_request.cc/h to chrome/browser/common. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
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/cancelable_request.h" 5 #include "chrome/browser/common/cancelable_request.h"
6 6
7 CancelableRequestProvider::CancelableRequestProvider() 7 CancelableRequestProvider::CancelableRequestProvider()
8 : next_handle_(1) { 8 : next_handle_(1) {
9 } 9 }
10 10
11 CancelableRequestProvider::Handle CancelableRequestProvider::AddRequest( 11 CancelableRequestProvider::Handle CancelableRequestProvider::AddRequest(
12 CancelableRequestBase* request, 12 CancelableRequestBase* request,
13 CancelableRequestConsumerBase* consumer) { 13 CancelableRequestConsumerBase* consumer) {
14 Handle handle; 14 Handle handle;
15 { 15 {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Execute the callback. 131 // Execute the callback.
132 forwarded_call.Run(); 132 forwarded_call.Run();
133 } 133 }
134 134
135 // Notify the provider that the request is complete. The provider will 135 // Notify the provider that the request is complete. The provider will
136 // notify the consumer for us. Note that it is possible for the callback to 136 // notify the consumer for us. Note that it is possible for the callback to
137 // cancel this request; we must check canceled again. 137 // cancel this request; we must check canceled again.
138 if (!canceled_.IsSet()) 138 if (!canceled_.IsSet())
139 NotifyCompleted(); 139 NotifyCompleted();
140 } 140 }
OLDNEW
« no previous file with comments | « chrome/browser/common/cancelable_request.h ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698