Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: chrome/test/testing_profile.cc

Issue 545175: Add the ability to save and remove AutoFill profiles from the AutoFillDialog.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/testing_profile.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/testing_profile.cc
===================================================================
--- chrome/test/testing_profile.cc (revision 36778)
+++ chrome/test/testing_profile.cc (working copy)
@@ -134,6 +134,7 @@
TestingProfile::~TestingProfile() {
DestroyHistoryService();
+ DestroyWebDataService();
file_util::Delete(path_, true);
}
@@ -192,6 +193,21 @@
bookmark_bar_model_->Load();
}
+void TestingProfile::CreateWebDataService(bool delete_file) {
+ if (web_data_service_.get())
+ web_data_service_->Shutdown();
+
+ if (delete_file) {
+ FilePath path = GetPath();
+ path = path.Append(chrome::kWebDataFilename);
+ file_util::Delete(path, false);
+ }
+
+ web_data_service_ = new WebDataService;
+ if (web_data_service_.get())
+ web_data_service_->Init(GetPath());
+}
+
void TestingProfile::BlockUntilBookmarkModelLoaded() {
DCHECK(bookmark_bar_model_.get());
if (bookmark_bar_model_->IsLoaded())
@@ -265,3 +281,10 @@
ProfileSyncService* TestingProfile::GetProfileSyncService() {
return profile_sync_service_.get();
}
+
+void TestingProfile::DestroyWebDataService() {
+ if (!web_data_service_.get())
+ return;
+
+ web_data_service_->Shutdown();
+}
« no previous file with comments | « chrome/test/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698