summaryrefslogtreecommitdiff
path: root/src/NetrcAuthResolver.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-26 21:45:29 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-26 21:45:29 +0900
commitd485c8e76758c68ce55e9554d339eaf715ae7bca (patch)
tree51ecc085110b4598159f980105f51eb87eaeceb0 /src/NetrcAuthResolver.h
parenta4cf50914dc5c5ca1a363b9f63a34eeb3c17cee4 (diff)
Rewrite AuthConfig objects using std::unique_ptr
Diffstat (limited to 'src/NetrcAuthResolver.h')
-rw-r--r--src/NetrcAuthResolver.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/NetrcAuthResolver.h b/src/NetrcAuthResolver.h
index a92b5dff..d9b74acd 100644
--- a/src/NetrcAuthResolver.h
+++ b/src/NetrcAuthResolver.h
@@ -43,24 +43,19 @@ class Netrc;
class NetrcAuthResolver : public AbstractAuthResolver {
private:
- std::shared_ptr<Netrc> netrc_;
+ Netrc* netrc_;
bool ignoreDefault_;
- std::shared_ptr<AuthConfig> findNetrcAuthenticator
+ std::unique_ptr<AuthConfig> findNetrcAuthenticator
(const std::string& hostname) const;
public:
NetrcAuthResolver();
- virtual std::shared_ptr<AuthConfig> resolveAuthConfig
+ virtual std::unique_ptr<AuthConfig> resolveAuthConfig
(const std::string& hostname);
- void setNetrc(const std::shared_ptr<Netrc>& netrc);
-
- const std::shared_ptr<Netrc>& getNetrc() const
- {
- return netrc_;
- }
+ void setNetrc(Netrc* netrc);
// Ignores default token of netrc
void ignoreDefault();