| OLD | NEW | 
|    1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2010 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 class 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 to not outlive either of the objects involved in the | 
|    9 // transaction. |    9 // transaction. | 
|   10 // |   10 // | 
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   89 #include <map> |   89 #include <map> | 
|   90 #include <vector> |   90 #include <vector> | 
|   91  |   91  | 
|   92 #include "base/basictypes.h" |   92 #include "base/basictypes.h" | 
|   93 #include "base/callback.h" |   93 #include "base/callback.h" | 
|   94 #include "base/cancellation_flag.h" |   94 #include "base/cancellation_flag.h" | 
|   95 #include "base/lock.h" |   95 #include "base/lock.h" | 
|   96 #include "base/logging.h" |   96 #include "base/logging.h" | 
|   97 #include "base/message_loop.h" |   97 #include "base/message_loop.h" | 
|   98 #include "base/ref_counted.h" |   98 #include "base/ref_counted.h" | 
 |   99 #include "base/scoped_ptr.h" | 
|   99 #include "base/task.h" |  100 #include "base/task.h" | 
|  100  |  101  | 
|  101 class CancelableRequestBase; |  102 class CancelableRequestBase; | 
|  102 class CancelableRequestConsumerBase; |  103 class CancelableRequestConsumerBase; | 
|  103  |  104  | 
|  104 // CancelableRequestProvider -------------------------------------------------- |  105 // CancelableRequestProvider -------------------------------------------------- | 
|  105 // |  106 // | 
|  106 // This class is threadsafe. Requests may be added or canceled from any thread, |  107 // This class is threadsafe. Requests may be added or canceled from any thread, | 
|  107 // but a task must only be canceled from the same thread it was initially run |  108 // but a task must only be canceled from the same thread it was initially run | 
|  108 // on. |  109 // on. | 
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  557   } |  558   } | 
|  558  |  559  | 
|  559   // The value. |  560   // The value. | 
|  560   Type value; |  561   Type value; | 
|  561  |  562  | 
|  562  protected: |  563  protected: | 
|  563   virtual ~CancelableRequest1() {} |  564   virtual ~CancelableRequest1() {} | 
|  564 }; |  565 }; | 
|  565  |  566  | 
|  566 #endif  // CHROME_BROWSER_CANCELABLE_REQUEST_H__ |  567 #endif  // CHROME_BROWSER_CANCELABLE_REQUEST_H__ | 
| OLD | NEW |