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

Unified Diff: content/browser/cancelable_request.cc

Issue 6994005: Fix password automation hooks to get pyauto test testSavePassword working. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disabling a single pyauto passwords test. Created 9 years, 7 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
Index: content/browser/cancelable_request.cc
diff --git a/content/browser/cancelable_request.cc b/content/browser/cancelable_request.cc
index 5e36d89dfbeaf8734dcd41482b8e85a6e6c8a41b..c557ecf5bfe8b9ca36fb52d0373caa0e3e322cf0 100644
--- a/content/browser/cancelable_request.cc
+++ b/content/browser/cancelable_request.cc
@@ -54,6 +54,7 @@ void CancelableRequestProvider::CancelRequestLocked(
item->second->consumer()->OnRequestRemoved(this, item->first);
item->second->set_canceled();
+ completed_requests_[item->first] = pending_requests_[item->first];
pending_requests_.erase(item);
}
@@ -73,6 +74,7 @@ void CancelableRequestProvider::RequestCompleted(Handle handle) {
// else the consumer might be gone).
DCHECK(!i->second->canceled());
+ completed_requests_[i->first] = pending_requests_[i->first];
pending_requests_.erase(i);
}
@@ -80,6 +82,11 @@ void CancelableRequestProvider::RequestCompleted(Handle handle) {
consumer->OnRequestRemoved(this, handle);
}
+bool CancelableRequestProvider::IsRequestCompleted(Handle handle) {
+ CancelableRequestMap::iterator i = completed_requests_.find(handle);
+ return i != completed_requests_.end();
+}
+
// MSVC doesn't like complex extern templates and DLLs.
#if !defined(COMPILER_MSVC)
// Emit our most common CancelableRequestConsumer.
« chrome/test/functional/passwords.py ('K') | « content/browser/cancelable_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698