Index: content/browser/indexed_db/indexed_db_quota_client.cc |
diff --git a/content/browser/indexed_db/indexed_db_quota_client.cc b/content/browser/indexed_db/indexed_db_quota_client.cc |
index 25f9668d0f9d2119233daa3eac4bec02a72fa62a..bbce16c5ef27efd399707888d013b7f278e90271 100644 |
--- a/content/browser/indexed_db/indexed_db_quota_client.cc |
+++ b/content/browser/indexed_db/indexed_db_quota_client.cc |
@@ -26,36 +26,33 @@ quota::QuotaStatusCode DeleteOriginDataOnWebKitThread( |
return quota::kQuotaStatusOk; |
} |
-int64 GetOriginUsageOnWebKitThread( |
- IndexedDBContextImpl* context, |
- const GURL& origin) { |
+int64 GetOriginUsageOnWebKitThread(IndexedDBContextImpl* context, |
+ const GURL& origin) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)); |
return context->GetOriginDiskUsage(origin); |
} |
-void GetAllOriginsOnWebKitThread( |
- IndexedDBContextImpl* context, |
- std::set<GURL>* origins_to_return) { |
+void GetAllOriginsOnWebKitThread(IndexedDBContextImpl* context, |
+ std::set<GURL>* origins_to_return) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)); |
std::vector<GURL> all_origins = context->GetAllOrigins(); |
origins_to_return->insert(all_origins.begin(), all_origins.end()); |
} |
-void DidGetOrigins( |
- const IndexedDBQuotaClient::GetOriginsCallback& callback, |
- const std::set<GURL>* origins) { |
+void DidGetOrigins(const IndexedDBQuotaClient::GetOriginsCallback& callback, |
+ const std::set<GURL>* origins) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
callback.Run(*origins); |
} |
-void GetOriginsForHostOnWebKitThread( |
- IndexedDBContextImpl* context, |
- const std::string& host, |
- std::set<GURL>* origins_to_return) { |
+void GetOriginsForHostOnWebKitThread(IndexedDBContextImpl* context, |
+ const std::string& host, |
+ std::set<GURL>* origins_to_return) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)); |
std::vector<GURL> all_origins = context->GetAllOrigins(); |
for (std::vector<GURL>::const_iterator iter = all_origins.begin(); |
- iter != all_origins.end(); ++iter) { |
+ iter != all_origins.end(); |
+ ++iter) { |
if (host == net::GetHostOrSpecFromURL(*iter)) |
origins_to_return->insert(*iter); |
} |
@@ -69,24 +66,17 @@ IndexedDBQuotaClient::IndexedDBQuotaClient( |
base::MessageLoopProxy* webkit_thread_message_loop, |
IndexedDBContextImpl* indexed_db_context) |
: webkit_thread_message_loop_(webkit_thread_message_loop), |
- indexed_db_context_(indexed_db_context) { |
-} |
+ indexed_db_context_(indexed_db_context) {} |
-IndexedDBQuotaClient::~IndexedDBQuotaClient() { |
-} |
+IndexedDBQuotaClient::~IndexedDBQuotaClient() {} |
-QuotaClient::ID IndexedDBQuotaClient::id() const { |
- return kIndexedDatabase; |
-} |
+QuotaClient::ID IndexedDBQuotaClient::id() const { return kIndexedDatabase; } |
-void IndexedDBQuotaClient::OnQuotaManagerDestroyed() { |
- delete this; |
-} |
+void IndexedDBQuotaClient::OnQuotaManagerDestroyed() { delete this; } |
-void IndexedDBQuotaClient::GetOriginUsage( |
- const GURL& origin_url, |
- quota::StorageType type, |
- const GetUsageCallback& callback) { |
+void IndexedDBQuotaClient::GetOriginUsage(const GURL& origin_url, |
+ quota::StorageType type, |
+ const GetUsageCallback& callback) { |
DCHECK(!callback.is_null()); |
DCHECK(indexed_db_context_.get()); |
@@ -99,9 +89,8 @@ void IndexedDBQuotaClient::GetOriginUsage( |
base::PostTaskAndReplyWithResult( |
webkit_thread_message_loop_, |
FROM_HERE, |
- base::Bind(&GetOriginUsageOnWebKitThread, |
- indexed_db_context_, |
- origin_url), |
+ base::Bind( |
+ &GetOriginUsageOnWebKitThread, indexed_db_context_, origin_url), |
callback); |
} |
@@ -123,9 +112,7 @@ void IndexedDBQuotaClient::GetOriginsForType( |
base::Bind(&GetAllOriginsOnWebKitThread, |
indexed_db_context_, |
base::Unretained(origins_to_return)), |
- base::Bind(&DidGetOrigins, |
- callback, |
- base::Owned(origins_to_return))); |
+ base::Bind(&DidGetOrigins, callback, base::Owned(origins_to_return))); |
} |
void IndexedDBQuotaClient::GetOriginsForHost( |
@@ -148,15 +135,12 @@ void IndexedDBQuotaClient::GetOriginsForHost( |
indexed_db_context_, |
host, |
base::Unretained(origins_to_return)), |
- base::Bind(&DidGetOrigins, |
- callback, |
- base::Owned(origins_to_return))); |
+ base::Bind(&DidGetOrigins, callback, base::Owned(origins_to_return))); |
} |
-void IndexedDBQuotaClient::DeleteOriginData( |
- const GURL& origin, |
- quota::StorageType type, |
- const DeletionCallback& callback) { |
+void IndexedDBQuotaClient::DeleteOriginData(const GURL& origin, |
+ quota::StorageType type, |
+ const DeletionCallback& callback) { |
if (type != quota::kStorageTypeTemporary) { |
callback.Run(quota::kQuotaErrorNotSupported); |
return; |
@@ -165,9 +149,7 @@ void IndexedDBQuotaClient::DeleteOriginData( |
base::PostTaskAndReplyWithResult( |
webkit_thread_message_loop_, |
FROM_HERE, |
- base::Bind(&DeleteOriginDataOnWebKitThread, |
- indexed_db_context_, |
- origin), |
+ base::Bind(&DeleteOriginDataOnWebKitThread, indexed_db_context_, origin), |
callback); |
} |