Code cleanup

This commit is contained in:
Tatsuhiro Tsujikawa 2012-09-25 22:00:56 +09:00
parent 41cb774374
commit c16cebbc9a
2 changed files with 5 additions and 9 deletions

View File

@ -47,9 +47,10 @@
namespace aria2 {
const std::string AuthConfigFactory::ANONYMOUS("anonymous");
const std::string AuthConfigFactory::ARIA2USER_AT("ARIA2USER@");
namespace {
const std::string AUTH_DEFAULT_USER("anonymous");
const std::string AUTH_DEFAULT_PASSWD("ARIA2USER@");
} // namespace
AuthConfigFactory::AuthConfigFactory() {}
@ -160,8 +161,7 @@ AuthResolverHandle AuthConfigFactory::createFtpAuthResolver
resolver->setUserDefinedAuthConfig
(createAuthConfig(op->get(PREF_FTP_USER), op->get(PREF_FTP_PASSWD)));
SharedHandle<AuthConfig> defaultAuthConfig
(new AuthConfig(AuthConfigFactory::ANONYMOUS,
AuthConfigFactory::ARIA2USER_AT));
(new AuthConfig(AUTH_DEFAULT_USER, AUTH_DEFAULT_PASSWD));
resolver->setDefaultAuthConfig(defaultAuthConfig);
return resolver;
}

View File

@ -129,10 +129,6 @@ public:
// given basicCred. Otherwise, insert given basicCred to
// basicCreds_.
void updateBasicCred(const SharedHandle<BasicCred>& basicCred);
static const std::string ANONYMOUS;
static const std::string ARIA2USER_AT;
};
typedef SharedHandle<AuthConfigFactory> AuthConfigFactoryHandle;