mirror of https://github.com/aria2/aria2
Code cleanup
parent
41cb774374
commit
c16cebbc9a
|
@ -47,9 +47,10 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
const std::string AuthConfigFactory::ANONYMOUS("anonymous");
|
namespace {
|
||||||
|
const std::string AUTH_DEFAULT_USER("anonymous");
|
||||||
const std::string AuthConfigFactory::ARIA2USER_AT("ARIA2USER@");
|
const std::string AUTH_DEFAULT_PASSWD("ARIA2USER@");
|
||||||
|
} // namespace
|
||||||
|
|
||||||
AuthConfigFactory::AuthConfigFactory() {}
|
AuthConfigFactory::AuthConfigFactory() {}
|
||||||
|
|
||||||
|
@ -160,8 +161,7 @@ AuthResolverHandle AuthConfigFactory::createFtpAuthResolver
|
||||||
resolver->setUserDefinedAuthConfig
|
resolver->setUserDefinedAuthConfig
|
||||||
(createAuthConfig(op->get(PREF_FTP_USER), op->get(PREF_FTP_PASSWD)));
|
(createAuthConfig(op->get(PREF_FTP_USER), op->get(PREF_FTP_PASSWD)));
|
||||||
SharedHandle<AuthConfig> defaultAuthConfig
|
SharedHandle<AuthConfig> defaultAuthConfig
|
||||||
(new AuthConfig(AuthConfigFactory::ANONYMOUS,
|
(new AuthConfig(AUTH_DEFAULT_USER, AUTH_DEFAULT_PASSWD));
|
||||||
AuthConfigFactory::ARIA2USER_AT));
|
|
||||||
resolver->setDefaultAuthConfig(defaultAuthConfig);
|
resolver->setDefaultAuthConfig(defaultAuthConfig);
|
||||||
return resolver;
|
return resolver;
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,10 +129,6 @@ public:
|
||||||
// given basicCred. Otherwise, insert given basicCred to
|
// given basicCred. Otherwise, insert given basicCred to
|
||||||
// basicCreds_.
|
// basicCreds_.
|
||||||
void updateBasicCred(const SharedHandle<BasicCred>& basicCred);
|
void updateBasicCred(const SharedHandle<BasicCred>& basicCred);
|
||||||
|
|
||||||
static const std::string ANONYMOUS;
|
|
||||||
|
|
||||||
static const std::string ARIA2USER_AT;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SharedHandle<AuthConfigFactory> AuthConfigFactoryHandle;
|
typedef SharedHandle<AuthConfigFactory> AuthConfigFactoryHandle;
|
||||||
|
|
Loading…
Reference in New Issue