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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/request_manager.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 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
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/install_limiter.h ('k') | chrome/browser/chromeos/first_run/drive_first_run_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698