*
* The file contains the definition of FWebCtrlWebStorageManager class.
*/
+#include <pthread.h>
#include <unique_ptr.h>
#include <FBaseColIList.h>
#include <FBaseSysLog.h>
WebStorageManager::WebStorageManager(void)
: __pWebStorageManagerImpl(null)
{
- result r = E_SUCCESS;
-
std::unique_ptr<_WebStorageManagerImpl> pWebStorageManagerImpl(new (std::nothrow) _WebStorageManagerImpl());
SysTryReturnVoidResult(NID_WEB_CTRL, pWebStorageManagerImpl.get(), E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
WebStorageManager::~WebStorageManager(void)
{
+ delete __pWebStorageManagerImpl;
+ __pWebStorageManagerImpl = null;
}
ClearLastResult();
result r = E_SUCCESS;
-
+
r = _AccessController::CheckUserPrivilege(_PRV_WEB_PRIVACY);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
{
SysAssertf(__pWebStorageManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
- ClearLastResult();
result r = E_SUCCESS;
r = _AccessController::CheckUserPrivilege(_PRV_WEB_PRIVACY);
r = __pWebStorageManagerImpl->SetQuotaForOrigin(storageType, origin, quota);
SysTryReturnResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
+ return E_SUCCESS;
}
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, 0, E_PRIVILEGE_DENIED, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
quota = __pWebStorageManagerImpl->GetQuotaForOrigin(storageType, origin);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, 0, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturn(NID_WEB_CTRL, GetLastResult() == E_SUCCESS, 0, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
return quota;
}
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, 0, E_PRIVILEGE_DENIED, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
usage = __pWebStorageManagerImpl->GetQuotaForOrigin(storageType, origin);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, 0, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ SysTryReturn(NID_WEB_CTRL, GetLastResult() == E_SUCCESS, 0, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
return usage;
}
{
SysAssertf(__pWebStorageManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
- ClearLastResult();
result r = E_SUCCESS;
r = _AccessController::CheckUserPrivilege(_PRV_WEB_PRIVACY);
r = __pWebStorageManagerImpl->Remove(storageType, origin);
SysTryReturnResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
+ return E_SUCCESS;
}
{
SysAssertf(__pWebStorageManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
- ClearLastResult();
result r = E_SUCCESS;
r = _AccessController::CheckUserPrivilege(_PRV_WEB_PRIVACY);
r = __pWebStorageManagerImpl->RemoveAll(storageType);
SysTryReturnResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- return r;
+ return E_SUCCESS;
}
-}}} // Tizen::Web::Controls
\ No newline at end of file
+}}} // Tizen::Web::Controls