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

Unified Diff: net/http/http_auth_cache.h

Issue 6191001: Cleanup: Use AUTH_SCHEME enum instead of a string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Merge with trunk Created 9 years, 11 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 | « net/http/http_auth.cc ('k') | net/http/http_auth_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_cache.h
===================================================================
--- net/http/http_auth_cache.h (revision 71164)
+++ net/http/http_auth_cache.h (working copy)
@@ -13,6 +13,7 @@
#include "base/ref_counted.h"
#include "base/string16.h"
#include "googleurl/src/gurl.h"
+#include "net/http/http_auth.h"
namespace net {
@@ -42,10 +43,11 @@
// scheme |scheme|.
// |origin| - the {scheme, host, port} of the server.
// |realm| - case sensitive realm string.
- // |scheme| - case sensitive authentication scheme, should be lower-case.
+ // |scheme| - the authentication scheme (i.e. basic, negotiate).
// returns - the matched entry or NULL.
- Entry* Lookup(const GURL& origin, const std::string& realm,
- const std::string& scheme);
+ Entry* Lookup(const GURL& origin,
+ const std::string& realm,
+ HttpAuth::Scheme scheme);
// Find the entry on server |origin| whose protection space includes
// |path|. This uses the assumption in RFC 2617 section 2 that deeper
@@ -62,7 +64,7 @@
// paths list.
// |origin| - the {scheme, host, port} of the server.
// |realm| - the auth realm for the challenge.
- // |scheme| - the authentication scheme for the challenge.
+ // |scheme| - the authentication scheme (i.e. basic, negotiate).
// |username| - login information for the realm.
// |password| - login information for the realm.
// |path| - absolute path for a resource contained in the protection
@@ -70,7 +72,7 @@
// returns - the entry that was just added/updated.
Entry* Add(const GURL& origin,
const std::string& realm,
- const std::string& scheme,
+ HttpAuth::Scheme scheme,
const std::string& auth_challenge,
const string16& username,
const string16& password,
@@ -80,13 +82,13 @@
// if one exists AND if the cached identity matches (|username|, |password|).
// |origin| - the {scheme, host, port} of the server.
// |realm| - case sensitive realm string.
- // |scheme| - authentication scheme
+ // |scheme| - the authentication scheme (i.e. basic, negotiate).
// |username| - condition to match.
// |password| - condition to match.
// returns - true if an entry was removed.
bool Remove(const GURL& origin,
const std::string& realm,
- const std::string& scheme,
+ HttpAuth::Scheme scheme,
const string16& username,
const string16& password);
@@ -97,7 +99,7 @@
// cache, false otherwise.
bool UpdateStaleChallenge(const GURL& origin,
const std::string& realm,
- const std::string& scheme,
+ HttpAuth::Scheme scheme,
const std::string& auth_challenge);
private:
@@ -119,8 +121,8 @@
return realm_;
}
- // The authentication scheme string of the challenge
- const std::string scheme() const {
+ // The authentication scheme of the challenge.
+ const HttpAuth::Scheme scheme() const {
return scheme_;
}
@@ -161,10 +163,10 @@
// Returns true if |dir| is contained within the realm's protection space.
bool HasEnclosingPath(const std::string& dir);
- // |origin_| contains the {scheme, host, port} of the server.
+ // |origin_| contains the {protocol, host, port} of the server.
GURL origin_;
std::string realm_;
- std::string scheme_;
+ HttpAuth::Scheme scheme_;
// Identity.
std::string auth_challenge_;
« no previous file with comments | « net/http/http_auth.cc ('k') | net/http/http_auth_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698