| 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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 } | 965 } |
| 966 | 966 |
| 967 // The value. | 967 // The value. |
| 968 Type value; | 968 Type value; |
| 969 | 969 |
| 970 protected: | 970 protected: |
| 971 virtual ~CancelableRequest1() {} | 971 virtual ~CancelableRequest1() {} |
| 972 }; | 972 }; |
| 973 | 973 |
| 974 #endif // CONTENT_BROWSER_CANCELABLE_REQUEST_H_ | 974 #endif // CONTENT_BROWSER_CANCELABLE_REQUEST_H_ |
| OLD | NEW |