| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // Adds and removes observers. | 142 // Adds and removes observers. |
| 143 void AddObserver(Observer* observer); | 143 void AddObserver(Observer* observer); |
| 144 void RemoveObserver(Observer* observer); | 144 void RemoveObserver(Observer* observer); |
| 145 | 145 |
| 146 private: | 146 private: |
| 147 struct Request { | 147 struct Request { |
| 148 Request(); | 148 Request(); |
| 149 ~Request(); | 149 ~Request(); |
| 150 | 150 |
| 151 // Timer for discarding the request during a timeout. | 151 // Timer for discarding the request during a timeout. |
| 152 base::OneShotTimer<RequestManager> timeout_timer; | 152 base::OneShotTimer timeout_timer; |
| 153 | 153 |
| 154 // Handler tied to this request. | 154 // Handler tied to this request. |
| 155 scoped_ptr<HandlerInterface> handler; | 155 scoped_ptr<HandlerInterface> handler; |
| 156 | 156 |
| 157 private: | 157 private: |
| 158 DISALLOW_COPY_AND_ASSIGN(Request); | 158 DISALLOW_COPY_AND_ASSIGN(Request); |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 typedef std::map<int, Request*> RequestMap; | 161 typedef std::map<int, Request*> RequestMap; |
| 162 | 162 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 188 base::ObserverList<Observer> observers_; | 188 base::ObserverList<Observer> observers_; |
| 189 base::WeakPtrFactory<RequestManager> weak_ptr_factory_; | 189 base::WeakPtrFactory<RequestManager> weak_ptr_factory_; |
| 190 | 190 |
| 191 DISALLOW_COPY_AND_ASSIGN(RequestManager); | 191 DISALLOW_COPY_AND_ASSIGN(RequestManager); |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 } // namespace file_system_provider | 194 } // namespace file_system_provider |
| 195 } // namespace chromeos | 195 } // namespace chromeos |
| 196 | 196 |
| 197 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_MANAGER_H_ | 197 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_REQUEST_MANAGER_H_ |
| OLD | NEW |