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

Unified Diff: content/browser/cancelable_request.h

Issue 7065052: Improve large tab strip by leveraging touch icons when present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resynced (again) Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_constants.cc ('k') | ui/gfx/favicon_size.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/cancelable_request.h
diff --git a/content/browser/cancelable_request.h b/content/browser/cancelable_request.h
index df27cbce26421ede756289a3353571666dca0cb7..18819ede172f7180906722cffbbd54d14c868120 100644
--- a/content/browser/cancelable_request.h
+++ b/content/browser/cancelable_request.h
@@ -244,6 +244,9 @@ class CancelableRequestConsumerTSimple : public CancelableRequestConsumerBase {
// Cancels all requests outstanding.
void CancelAllRequests();
+ // Cancels all requests outstanding matching the client data.
+ void CancelAllRequestsForClientData(T client_data);
+
// Returns the handle for the first request that has the specified client data
// (in |handle|). Returns true if there is a request for the specified client
// data, false otherwise.
@@ -349,8 +352,9 @@ void CancelableRequestConsumerTSimple<T>::CancelAllRequests() {
// without acquiring the provider lock (http://crbug.com/85970).
PendingRequestList copied_requests(pending_requests_);
for (typename PendingRequestList::iterator i = copied_requests.begin();
- i != copied_requests.end(); ++i)
+ i != copied_requests.end(); ++i) {
i->first.provider->CancelRequest(i->first.handle);
+ }
copied_requests.clear();
// That should have cleared all the pending items.
@@ -358,6 +362,18 @@ void CancelableRequestConsumerTSimple<T>::CancelAllRequests() {
}
template<class T>
+void CancelableRequestConsumerTSimple<T>::CancelAllRequestsForClientData(
+ T client_data) {
+ PendingRequestList copied_requests(pending_requests_);
+ for (typename PendingRequestList::const_iterator i = copied_requests.begin();
+ i != copied_requests.end(); ++i) {
+ if (i->second == client_data)
+ i->first.provider->CancelRequest(i->first.handle);
+ }
+ copied_requests.clear();
+}
+
+template<class T>
bool CancelableRequestConsumerTSimple<T>::GetFirstHandleForClientData(
T client_data,
CancelableRequestProvider::Handle* handle) {
« no previous file with comments | « chrome/common/chrome_constants.cc ('k') | ui/gfx/favicon_size.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698