[Issue] https://bugs.tizen.org/jira/browse/TT-176
[Problem] Reset browser button didn't work.
[Cause] Not implemented
[Solution] Add function calls that remove necessary items.
[verify] Open some tabs, add some pages to bookmarks.
Then go to the settings and press Reset Broswser.
History, bookmarks, cookies, opened tabs should be deleted.
Change-Id: I592f2897e1d7447c544d2c8fc14847668c8e2059
Signed-off-by: Dariusz Frankiewicz <d.frankiewic@samsung.com>
if (button == OK) {
BROWSER_LOGD("[%s]: OK", __func__);
BROWSER_LOGD("[%s]: Resetting browser", __func__);
+
+ m_webEngine->clearPrivateData();
+ m_historyService->clearAllHistory();
+ m_favoriteService->deleteAllBookmarks();
+
+ // Close all openend tabs
+ std::vector<std::shared_ptr<tizen_browser::basic_webengine::TabContent>> openedTabs = m_webEngine->getTabContents();
+ for (auto it = openedTabs.begin(); it < openedTabs.end(); ++it) {
+ tizen_browser::basic_webengine::TabId id = it->get()->getId();
+ m_currentSession.removeItem(id.toString());
+ m_webEngine->closeTab(id);
+ }
+
+ //TODO: add here any missing functionality that should be cleaned.
}
}