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

Unified Diff: content/browser/cancelable_request.h

Issue 6646051: Fix DCHECK, memory leak, and refactor PasswordStore to use CancelableRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix spacing. Created 9 years, 9 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/test/live_sync/live_passwords_sync_test.h ('k') | content/browser/cancelable_request.cc » ('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 9dc86d32da4119b7641472285205b992243b2adf..a27747f394b971df5cc876c401ea68826d47379a 100644
--- a/content/browser/cancelable_request.h
+++ b/content/browser/cancelable_request.h
@@ -127,7 +127,16 @@ class CancelableRequestProvider {
// handle must be for a valid pending (not yet complete or cancelled) request.
void CancelRequest(Handle handle);
+ // Provide factory method so Handle can be treated as opaque.
+ static Handle InvalidHandle();
+
+ // Provide validity method so Handle can be treated as opaque.
+ static bool HandleIsValid(Handle handle);
+
protected:
+ static const Handle kFirstHandle;
James Hawkins 2011/03/22 22:59:49 Can these be private?
Sheridan Rawlins 2011/03/23 00:39:52 Done.
+ static const Handle kInvalidHandle;
+
// Adds a new request and initializes it. This is called by a derived class
// to add a new request. The request's Init() will be called (which is why
// the consumer is required. The handle to the new request is returned.
« no previous file with comments | « chrome/test/live_sync/live_passwords_sync_test.h ('k') | content/browser/cancelable_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698