summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorcramya@chromium.org <cramya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-11 20:48:55 +0000
committercramya@chromium.org <cramya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-11 20:48:55 +0000
commitff402386115448de1e4cbcf6fd62251b91ababa6 (patch)
tree08f555aec6d0d32a2a537890153c4676b99958fa /content
parent3f05e9167ba720356bdcf866d7456e3c3e53056d (diff)
downloadchromium_src-ff402386115448de1e4cbcf6fd62251b91ababa6.zip
chromium_src-ff402386115448de1e4cbcf6fd62251b91ababa6.tar.gz
chromium_src-ff402386115448de1e4cbcf6fd62251b91ababa6.tar.bz2
Clear browsing data clears data for type kStorageTypeTemporary but not for kStorageTypeSyncable.
This bug is visible in Android for mail.google.com Even after Clearing all the data, the syncable data was left behind. This CL should fix this bug. BUG=180249 Review URL: https://chromiumcodereview.appspot.com/13357004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193738 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/quota_dispatcher_host.cc3
-rw-r--r--content/browser/storage_partition_impl.cc10
-rw-r--r--content/public/browser/storage_partition.h3
3 files changed, 15 insertions, 1 deletions
diff --git a/content/browser/renderer_host/quota_dispatcher_host.cc b/content/browser/renderer_host/quota_dispatcher_host.cc
index 9ba96d2..1d98d93 100644
--- a/content/browser/renderer_host/quota_dispatcher_host.cc
+++ b/content/browser/renderer_host/quota_dispatcher_host.cc
@@ -109,7 +109,8 @@ class QuotaDispatcherHost::RequestQuotaDispatcher
void Start() {
DCHECK(type_ == quota::kStorageTypeTemporary ||
- type_ == quota::kStorageTypePersistent);
+ type_ == quota::kStorageTypePersistent ||
+ type_ == quota::kStorageTypeSyncable);
if (type_ == quota::kStorageTypePersistent) {
quota_manager()->GetPersistentHostQuota(
host_,
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index 44da402..ab0e7a5 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -75,6 +75,11 @@ void ClearOriginOnIOThread(
origins,
quota::kStorageTypePersistent);
}
+ if (storage_mask & StoragePartition::kQuotaManagedSyncableStorage) {
+ ClearQuotaManagedOriginsOnIOThread(quota_manager,
+ origins,
+ quota::kStorageTypeSyncable);
+ }
}
void ClearAllDataOnIOThread(
@@ -103,6 +108,11 @@ void ClearAllDataOnIOThread(
quota::kStorageTypePersistent, base::Time(),
base::Bind(&ClearQuotaManagedOriginsOnIOThread, quota_manager));
}
+ if (storage_mask & StoragePartition::kQuotaManagedSyncableStorage) {
+ quota_manager->GetOriginsModifiedSince(
+ quota::kStorageTypeSyncable, base::Time(),
+ base::Bind(&ClearQuotaManagedOriginsOnIOThread, quota_manager));
+ }
}
void ClearedShaderCacheOnIOThread(base::Closure callback) {
diff --git a/content/public/browser/storage_partition.h b/content/public/browser/storage_partition.h
index c9cd3df..bd7f90c 100644
--- a/content/public/browser/storage_partition.h
+++ b/content/public/browser/storage_partition.h
@@ -72,6 +72,9 @@ class StoragePartition {
// Local shader storage.
kShaderStorage = 1 << 5,
+ // Corresponds to quota::kStorageTypeSyncable.
+ kQuotaManagedSyncableStorage = 1 << 6,
+
kAllStorage = -1,
};