OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // CancelableRequestProviders and Consumers work together to make requests that | 5 // CancelableRequestProviders and Consumers work together to make requests that |
6 // execute on a background thread in the provider and return data to the | 6 // execute on a background thread in the provider and return data to the |
7 // consumer. These class collaborate to keep a list of open requests and to | 7 // consumer. These classes collaborate to keep a list of open requests and to |
8 // make sure that requests to not outlive either of the objects involved in the | 8 // make sure that requests do not outlive either of the objects involved in the |
9 // transaction. | 9 // transaction. |
10 // | 10 // |
11 // If you do not need to return data to the consumer, do not use this system, | 11 // If you do not need to return data to the consumer, do not use this system, |
12 // just use the regular Task/RunnableMethod stuff. | 12 // just use the regular Task/RunnableMethod stuff. |
13 // | 13 // |
14 // The CancelableRequest object is used internally to each provider to track | 14 // The CancelableRequest object is used internally to each provider to track |
15 // request data and callback information. | 15 // request data and callback information. |
16 // | 16 // |
17 // Example consumer calling |StartRequest| on a frontend service: | 17 // Example consumer calling |StartRequest| on a frontend service: |
18 // | 18 // |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 } | 1004 } |
1005 | 1005 |
1006 // The value. | 1006 // The value. |
1007 Type value; | 1007 Type value; |
1008 | 1008 |
1009 protected: | 1009 protected: |
1010 virtual ~CancelableRequest1() {} | 1010 virtual ~CancelableRequest1() {} |
1011 }; | 1011 }; |
1012 | 1012 |
1013 #endif // CONTENT_BROWSER_CANCELABLE_REQUEST_H_ | 1013 #endif // CONTENT_BROWSER_CANCELABLE_REQUEST_H_ |
OLD | NEW |