summaryrefslogtreecommitdiffstats
path: root/webkit/browser
diff options
context:
space:
mode:
authortzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 07:54:36 +0000
committertzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 07:54:36 +0000
commit558a25e45352fd4dc3a674f6051cab34851b3f34 (patch)
tree292e76f666cfc5bed7db37e5c2c9ce675186c56d /webkit/browser
parent00756baa49d8c4d8c70a34b78cc7dc7da0e22559 (diff)
downloadchromium_src-558a25e45352fd4dc3a674f6051cab34851b3f34.zip
chromium_src-558a25e45352fd4dc3a674f6051cab34851b3f34.tar.gz
chromium_src-558a25e45352fd4dc3a674f6051cab34851b3f34.tar.bz2
[Quota][Clean up] Drop non-informative StorageType parameter on GetOriginsForType callback
The caller of GetOriginsForType should know the StorageType, so this parameter will not add any information to the callback. Historically this was useful when we'd used old callbacks. BUG=220029 TEST=should not break existing tests Review URL: https://chromiumcodereview.appspot.com/15925005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202805 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/browser')
-rw-r--r--webkit/browser/database/database_quota_client.cc15
-rw-r--r--webkit/browser/database/database_quota_client_unittest.cc5
-rw-r--r--webkit/browser/fileapi/file_system_quota_client.cc15
-rw-r--r--webkit/browser/fileapi/file_system_quota_client_unittest.cc5
4 files changed, 14 insertions, 26 deletions
diff --git a/webkit/browser/database/database_quota_client.cc b/webkit/browser/database/database_quota_client.cc
index a1ea780..5902d1a 100644
--- a/webkit/browser/database/database_quota_client.cc
+++ b/webkit/browser/database/database_quota_client.cc
@@ -66,9 +66,8 @@ void GetOriginsForHostOnDBThread(
void DidGetOrigins(
const QuotaClient::GetOriginsCallback& callback,
- std::set<GURL>* origins_ptr,
- quota::StorageType type) {
- callback.Run(*origins_ptr, type);
+ std::set<GURL>* origins_ptr) {
+ callback.Run(*origins_ptr);
}
void DidDeleteOriginData(
@@ -151,7 +150,7 @@ void DatabaseQuotaClient::GetOriginsForType(
// All databases are in the temp namespace for now.
if (type != quota::kStorageTypeTemporary) {
- callback.Run(std::set<GURL>(), type);
+ callback.Run(std::set<GURL>());
return;
}
@@ -163,8 +162,7 @@ void DatabaseQuotaClient::GetOriginsForType(
base::Unretained(origins_ptr)),
base::Bind(&DidGetOrigins,
callback,
- base::Owned(origins_ptr),
- type));
+ base::Owned(origins_ptr)));
}
void DatabaseQuotaClient::GetOriginsForHost(
@@ -176,7 +174,7 @@ void DatabaseQuotaClient::GetOriginsForHost(
// All databases are in the temp namespace for now.
if (type != quota::kStorageTypeTemporary) {
- callback.Run(std::set<GURL>(), type);
+ callback.Run(std::set<GURL>());
return;
}
@@ -189,8 +187,7 @@ void DatabaseQuotaClient::GetOriginsForHost(
host),
base::Bind(&DidGetOrigins,
callback,
- base::Owned(origins_ptr),
- type));
+ base::Owned(origins_ptr)));
}
void DatabaseQuotaClient::DeleteOriginData(
diff --git a/webkit/browser/database/database_quota_client_unittest.cc b/webkit/browser/database/database_quota_client_unittest.cc
index 8e508ac..abb7f21 100644
--- a/webkit/browser/database/database_quota_client_unittest.cc
+++ b/webkit/browser/database/database_quota_client_unittest.cc
@@ -192,10 +192,8 @@ class DatabaseQuotaClientTest : public testing::Test {
usage_ = usage;
}
- void OnGetOriginsComplete(const std::set<GURL>& origins,
- quota::StorageType type) {
+ void OnGetOriginsComplete(const std::set<GURL>& origins) {
origins_ = origins;
- type_ = type;
}
void OnDeleteOriginDataComplete(quota::QuotaStatusCode status) {
@@ -205,7 +203,6 @@ class DatabaseQuotaClientTest : public testing::Test {
base::MessageLoop message_loop_;
int64 usage_;
std::set<GURL> origins_;
- quota::StorageType type_;
quota::QuotaStatusCode delete_status_;
scoped_refptr<MockDatabaseTracker> mock_tracker_;
base::WeakPtrFactory<DatabaseQuotaClientTest> weak_factory_;
diff --git a/webkit/browser/fileapi/file_system_quota_client.cc b/webkit/browser/fileapi/file_system_quota_client.cc
index eaa2a19..e983955 100644
--- a/webkit/browser/fileapi/file_system_quota_client.cc
+++ b/webkit/browser/fileapi/file_system_quota_client.cc
@@ -60,9 +60,8 @@ void GetOriginsForHostOnFileThread(
void DidGetOrigins(
const quota::QuotaClient::GetOriginsCallback& callback,
- std::set<GURL>* origins_ptr,
- StorageType storage_type) {
- callback.Run(*origins_ptr, storage_type);
+ std::set<GURL>* origins_ptr) {
+ callback.Run(*origins_ptr);
}
quota::QuotaStatusCode DeleteOriginOnFileThread(
@@ -137,7 +136,7 @@ void FileSystemQuotaClient::GetOriginsForType(
if (is_incognito_) {
// We don't support FileSystem in incognito mode yet.
std::set<GURL> origins;
- callback.Run(origins, storage_type);
+ callback.Run(origins);
return;
}
@@ -150,8 +149,7 @@ void FileSystemQuotaClient::GetOriginsForType(
base::Unretained(origins_ptr)),
base::Bind(&DidGetOrigins,
callback,
- base::Owned(origins_ptr),
- storage_type));
+ base::Owned(origins_ptr)));
}
void FileSystemQuotaClient::GetOriginsForHost(
@@ -163,7 +161,7 @@ void FileSystemQuotaClient::GetOriginsForHost(
if (is_incognito_) {
// We don't support FileSystem in incognito mode yet.
std::set<GURL> origins;
- callback.Run(origins, storage_type);
+ callback.Run(origins);
return;
}
@@ -177,8 +175,7 @@ void FileSystemQuotaClient::GetOriginsForHost(
base::Unretained(origins_ptr)),
base::Bind(&DidGetOrigins,
callback,
- base::Owned(origins_ptr),
- storage_type));
+ base::Owned(origins_ptr)));
}
void FileSystemQuotaClient::DeleteOriginData(
diff --git a/webkit/browser/fileapi/file_system_quota_client_unittest.cc b/webkit/browser/fileapi/file_system_quota_client_unittest.cc
index 3c0e1a7..2f7bb39 100644
--- a/webkit/browser/fileapi/file_system_quota_client_unittest.cc
+++ b/webkit/browser/fileapi/file_system_quota_client_unittest.cc
@@ -234,10 +234,8 @@ class FileSystemQuotaClientTest : public testing::Test {
usage_ = usage;
}
- void OnGetOrigins(const std::set<GURL>& origins,
- quota::StorageType type) {
+ void OnGetOrigins(const std::set<GURL>& origins) {
origins_ = origins;
- type_ = type;
}
void OnGetAdditionalUsage(int64 usage_unused) {
@@ -255,7 +253,6 @@ class FileSystemQuotaClientTest : public testing::Test {
int64 usage_;
int additional_callback_count_;
std::set<GURL> origins_;
- quota::StorageType type_;
quota::QuotaStatusCode deletion_status_;
DISALLOW_COPY_AND_ASSIGN(FileSystemQuotaClientTest);