diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-02 06:59:09 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-02 06:59:09 +0000 |
commit | e34c85d80d946862ae594ee720a2baf6e62746d5 (patch) | |
tree | 2de970a953485b1cbe89f787a9476618271008c4 /net/http/http_auth_handler.h | |
parent | 96fbab401bc5dcfe7fab1f5b99c1629f05fde5ab (diff) | |
download | chromium_src-e34c85d80d946862ae594ee720a2baf6e62746d5.zip chromium_src-e34c85d80d946862ae594ee720a2baf6e62746d5.tar.gz chromium_src-e34c85d80d946862ae594ee720a2baf6e62746d5.tar.bz2 |
Minor refactorings:
- Change scheme from a (const char*) to a (std::string). This is in response to an earlier comment.
Background:
It used to be a (const char*) to avoid allocating a string object since all the callers initialize it with a string literal.
- Change the initial value of nonce_count_ from 1 to 0. This doesn't functionally change anything (we just change to a pre-increment rather than post-increment), but I prefer the the start-at-zero style.
Review URL: http://codereview.chromium.org/12846
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6208 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_handler.h')
-rw-r--r-- | net/http/http_auth_handler.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/http/http_auth_handler.h b/net/http/http_auth_handler.h index 3e74420..ef3b102 100644 --- a/net/http/http_auth_handler.h +++ b/net/http/http_auth_handler.h @@ -29,12 +29,12 @@ class HttpAuthHandler : public base::RefCounted<HttpAuthHandler> { HttpAuth::Target target); // Lowercase name of the auth scheme - std::string scheme() const { + const std::string& scheme() const { return scheme_; } // The realm value that was parsed during Init(). - std::string realm() const { + const std::string& realm() const { return realm_; } @@ -62,7 +62,7 @@ class HttpAuthHandler : public base::RefCounted<HttpAuthHandler> { std::string::const_iterator challenge_end) = 0; // The lowercase auth-scheme {"basic", "digest", "ntlm", ...} - const char* scheme_; + std::string scheme_; // The realm. std::string realm_; |