summaryrefslogtreecommitdiffstats
path: root/webkit/database
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-27 22:27:41 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-27 22:27:41 +0000
commit142dd7564146e19d03fa4a947f9eefeda769727f (patch)
treec6ae9a0e792b1c59cf1f6e77494223dfb5c834e9 /webkit/database
parente70ccebc9ab3e2012d81e53ac4ce7c87b8a25249 (diff)
downloadchromium_src-142dd7564146e19d03fa4a947f9eefeda769727f.zip
chromium_src-142dd7564146e19d03fa4a947f9eefeda769727f.tar.gz
chromium_src-142dd7564146e19d03fa4a947f9eefeda769727f.tar.bz2
Get rid of the clear_on_exit constructor parameter on DatabaseTracker since it's not necessary anymore (it's now set on destruction).
BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9475019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/database')
-rw-r--r--webkit/database/database_quota_client_unittest.cc2
-rw-r--r--webkit/database/database_tracker.cc3
-rw-r--r--webkit/database/database_tracker.h1
-rw-r--r--webkit/database/database_tracker_unittest.cc28
4 files changed, 15 insertions, 19 deletions
diff --git a/webkit/database/database_quota_client_unittest.cc b/webkit/database/database_quota_client_unittest.cc
index b070046..ee62722 100644
--- a/webkit/database/database_quota_client_unittest.cc
+++ b/webkit/database/database_quota_client_unittest.cc
@@ -27,7 +27,7 @@ static const quota::StorageType kPerm = quota::kStorageTypePersistent;
class MockDatabaseTracker : public DatabaseTracker {
public:
MockDatabaseTracker()
- : DatabaseTracker(FilePath(), false, false, NULL, NULL, NULL),
+ : DatabaseTracker(FilePath(), false, NULL, NULL, NULL),
delete_called_count_(0),
async_delete_(false) {}
diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc
index 2264997..8ffa7b1 100644
--- a/webkit/database/database_tracker.cc
+++ b/webkit/database/database_tracker.cc
@@ -93,13 +93,12 @@ OriginInfo::OriginInfo(const string16& origin, int64 total_size)
DatabaseTracker::DatabaseTracker(
const FilePath& profile_path,
bool is_incognito,
- bool clear_local_state_on_exit,
quota::SpecialStoragePolicy* special_storage_policy,
quota::QuotaManagerProxy* quota_manager_proxy,
base::MessageLoopProxy* db_tracker_thread)
: is_initialized_(false),
is_incognito_(is_incognito),
- clear_local_state_on_exit_(clear_local_state_on_exit),
+ clear_local_state_on_exit_(false),
save_session_state_(false),
shutting_down_(false),
profile_path_(profile_path),
diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h
index 340cdcc..709e662 100644
--- a/webkit/database/database_tracker.h
+++ b/webkit/database/database_tracker.h
@@ -91,7 +91,6 @@ class DatabaseTracker
DatabaseTracker(const FilePath& profile_path,
bool is_incognito,
- bool clear_local_state_on_exit,
quota::SpecialStoragePolicy* special_storage_policy,
quota::QuotaManagerProxy* quota_manager_proxy,
base::MessageLoopProxy* db_tracker_thread);
diff --git a/webkit/database/database_tracker_unittest.cc b/webkit/database/database_tracker_unittest.cc
index 88babea..14d72a8 100644
--- a/webkit/database/database_tracker_unittest.cc
+++ b/webkit/database/database_tracker_unittest.cc
@@ -191,7 +191,7 @@ class DatabaseTracker_TestHelper_Test {
new quota::MockSpecialStoragePolicy;
special_storage_policy->AddProtected(GURL(kOrigin2Url));
scoped_refptr<DatabaseTracker> tracker(
- new DatabaseTracker(temp_dir.path(), incognito_mode, false,
+ new DatabaseTracker(temp_dir.path(), incognito_mode,
special_storage_policy, NULL, NULL));
// Create and open three databases.
@@ -296,7 +296,7 @@ class DatabaseTracker_TestHelper_Test {
new quota::MockSpecialStoragePolicy;
special_storage_policy->AddProtected(GURL(kOrigin2Url));
scoped_refptr<DatabaseTracker> tracker(
- new DatabaseTracker(temp_dir.path(), incognito_mode, false,
+ new DatabaseTracker(temp_dir.path(), incognito_mode,
special_storage_policy, NULL, NULL));
// Add two observers.
@@ -446,7 +446,7 @@ class DatabaseTracker_TestHelper_Test {
scoped_refptr<TestQuotaManagerProxy> test_quota_proxy(
new TestQuotaManagerProxy);
scoped_refptr<DatabaseTracker> tracker(
- new DatabaseTracker(temp_dir.path(), false /* incognito */, false,
+ new DatabaseTracker(temp_dir.path(), false /* incognito */,
NULL, test_quota_proxy, NULL));
EXPECT_TRUE(test_quota_proxy->registered_client_);
@@ -548,9 +548,10 @@ class DatabaseTracker_TestHelper_Test {
special_storage_policy->AddProtected(GURL(kOrigin2Url));
scoped_refptr<DatabaseTracker> tracker(
new DatabaseTracker(
- temp_dir.path(), false, true,
+ temp_dir.path(), false,
special_storage_policy, NULL,
base::MessageLoopProxy::current()));
+ tracker->SetClearLocalStateOnExit(true);
// Open three new databases.
tracker->DatabaseOpened(kOrigin1, kDB1, kDescription, 0,
@@ -610,7 +611,7 @@ class DatabaseTracker_TestHelper_Test {
new quota::MockSpecialStoragePolicy;
special_storage_policy->AddProtected(GURL(kOrigin2Url));
scoped_refptr<DatabaseTracker> tracker(
- new DatabaseTracker(temp_dir.path(), false, false,
+ new DatabaseTracker(temp_dir.path(), false,
special_storage_policy, NULL, NULL));
// Get all data for all origins.
@@ -648,8 +649,7 @@ class DatabaseTracker_TestHelper_Test {
special_storage_policy->AddSessionOnly(GURL(kOrigin2Url));
scoped_refptr<DatabaseTracker> tracker(
new DatabaseTracker(
- temp_dir.path(), false, false /*clear_local_state_on_exit*/,
- special_storage_policy, NULL,
+ temp_dir.path(), false, special_storage_policy, NULL,
base::MessageLoopProxy::current()));
// Open two new databases.
@@ -686,8 +686,7 @@ class DatabaseTracker_TestHelper_Test {
// At this point, the database tracker should be gone. Create a new one.
scoped_refptr<DatabaseTracker> tracker(
- new DatabaseTracker(temp_dir.path(), false, false,
- NULL, NULL, NULL));
+ new DatabaseTracker(temp_dir.path(), false, NULL, NULL, NULL));
// Get all data for all origins.
std::vector<OriginInfo> origins_info;
@@ -727,9 +726,9 @@ class DatabaseTracker_TestHelper_Test {
special_storage_policy->AddSessionOnly(GURL(kOrigin2Url));
scoped_refptr<DatabaseTracker> tracker(
new DatabaseTracker(
- temp_dir.path(), false, true /*clear_local_state_on_exit*/,
- special_storage_policy, NULL,
+ temp_dir.path(), false, special_storage_policy, NULL,
base::MessageLoopProxy::current()));
+ tracker->SetClearLocalStateOnExit(true);
tracker->SaveSessionState();
// Open two new databases.
@@ -766,8 +765,7 @@ class DatabaseTracker_TestHelper_Test {
// At this point, the database tracker should be gone. Create a new one.
scoped_refptr<DatabaseTracker> tracker(
- new DatabaseTracker(temp_dir.path(), false, false,
- NULL, NULL, NULL));
+ new DatabaseTracker(temp_dir.path(), false, NULL, NULL, NULL));
// Get all data for all origins.
std::vector<OriginInfo> origins_info;
@@ -796,7 +794,7 @@ class DatabaseTracker_TestHelper_Test {
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
scoped_refptr<DatabaseTracker> tracker(
new DatabaseTracker(temp_dir.path(), kUseInMemoryTrackerDatabase,
- false, NULL, NULL, NULL));
+ NULL, NULL, NULL));
// Starts off with no databases.
std::vector<OriginInfo> infos;
@@ -842,7 +840,7 @@ class DatabaseTracker_TestHelper_Test {
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
scoped_refptr<DatabaseTracker> tracker(
new DatabaseTracker(temp_dir.path(), kUseInMemoryTrackerDatabase,
- false, NULL, NULL, NULL));
+ NULL, NULL, NULL));
// Setup to observe OnScheduledForDelete notifications.
TestObserver observer(false, true);