diff options
author | pilgrim@chromium.org <pilgrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-22 19:58:31 +0000 |
---|---|---|
committer | pilgrim@chromium.org <pilgrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-22 20:01:57 +0000 |
commit | cd501a7565dd6054a120fbfe62d45b2299cfcc3b (patch) | |
tree | efe35c31d00f40b2fa9e6dbafd5f9f694f47367e /webkit/browser/fileapi/quota | |
parent | 604e202d3548b701900c3771f9517103bb91486c (diff) | |
download | chromium_src-cd501a7565dd6054a120fbfe62d45b2299cfcc3b.zip chromium_src-cd501a7565dd6054a120fbfe62d45b2299cfcc3b.tar.gz chromium_src-cd501a7565dd6054a120fbfe62d45b2299cfcc3b.tar.bz2 |
Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single storage namespace
As discussed here:
https://groups.google.com/a/chromium.org/forum/#!topic/storage-dev/aQall8GOrS4
BUG=338338
TBR=cevans
NOTRY=true
Review URL: https://codereview.chromium.org/492873002
Cr-Commit-Position: refs/heads/master@{#291485}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/browser/fileapi/quota')
12 files changed, 42 insertions, 40 deletions
diff --git a/webkit/browser/fileapi/quota/open_file_handle.cc b/webkit/browser/fileapi/quota/open_file_handle.cc index 27f50b1..b8c0b29 100644 --- a/webkit/browser/fileapi/quota/open_file_handle.cc +++ b/webkit/browser/fileapi/quota/open_file_handle.cc @@ -7,7 +7,7 @@ #include "webkit/browser/fileapi/quota/open_file_handle_context.h" #include "webkit/browser/fileapi/quota/quota_reservation.h" -namespace fileapi { +namespace storage { OpenFileHandle::~OpenFileHandle() { DCHECK(sequence_checker_.CalledOnValidSequencedThread()); @@ -52,4 +52,4 @@ OpenFileHandle::OpenFileHandle(QuotaReservation* reservation, DCHECK(sequence_checker_.CalledOnValidSequencedThread()); } -} // namespace fileapi +} // namespace storage diff --git a/webkit/browser/fileapi/quota/open_file_handle.h b/webkit/browser/fileapi/quota/open_file_handle.h index 2bd7e93..1f25b96 100644 --- a/webkit/browser/fileapi/quota/open_file_handle.h +++ b/webkit/browser/fileapi/quota/open_file_handle.h @@ -14,7 +14,7 @@ namespace base { class FilePath; } -namespace fileapi { +namespace storage { class QuotaReservation; class OpenFileHandleContext; @@ -65,6 +65,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT OpenFileHandle { DISALLOW_COPY_AND_ASSIGN(OpenFileHandle); }; -} // namespace fileapi +} // namespace storage #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_OPEN_FILE_HANDLE_H_ diff --git a/webkit/browser/fileapi/quota/open_file_handle_context.cc b/webkit/browser/fileapi/quota/open_file_handle_context.cc index 57e284f..33f5bab 100644 --- a/webkit/browser/fileapi/quota/open_file_handle_context.cc +++ b/webkit/browser/fileapi/quota/open_file_handle_context.cc @@ -7,7 +7,7 @@ #include "base/file_util.h" #include "webkit/browser/fileapi/quota/quota_reservation_buffer.h" -namespace fileapi { +namespace storage { OpenFileHandleContext::OpenFileHandleContext( const base::FilePath& platform_path, @@ -69,4 +69,4 @@ OpenFileHandleContext::~OpenFileHandleContext() { reservation_buffer_->DetachOpenFileHandleContext(this); } -} // namespace fileapi +} // namespace storage diff --git a/webkit/browser/fileapi/quota/open_file_handle_context.h b/webkit/browser/fileapi/quota/open_file_handle_context.h index 5b0cbcb9c..b93bf14 100644 --- a/webkit/browser/fileapi/quota/open_file_handle_context.h +++ b/webkit/browser/fileapi/quota/open_file_handle_context.h @@ -15,7 +15,7 @@ #include "webkit/browser/webkit_storage_browser_export.h" #include "webkit/common/fileapi/file_system_types.h" -namespace fileapi { +namespace storage { class QuotaReservationBuffer; @@ -56,6 +56,6 @@ class OpenFileHandleContext : public base::RefCounted<OpenFileHandleContext> { DISALLOW_COPY_AND_ASSIGN(OpenFileHandleContext); }; -} // namespace fileapi +} // namespace storage #endif // WEBKIT_BROWSER_FILEAPI_OPEN_FILE_HANDLE_CONTEXT_H_ diff --git a/webkit/browser/fileapi/quota/quota_backend_impl.cc b/webkit/browser/fileapi/quota/quota_backend_impl.cc index de0b3ac..fe2e11d 100644 --- a/webkit/browser/fileapi/quota/quota_backend_impl.cc +++ b/webkit/browser/fileapi/quota/quota_backend_impl.cc @@ -16,13 +16,13 @@ #include "webkit/browser/quota/quota_manager_proxy.h" #include "webkit/common/fileapi/file_system_util.h" -namespace fileapi { +namespace storage { QuotaBackendImpl::QuotaBackendImpl( base::SequencedTaskRunner* file_task_runner, ObfuscatedFileUtil* obfuscated_file_util, FileSystemUsageCache* file_system_usage_cache, - quota::QuotaManagerProxy* quota_manager_proxy) + storage::QuotaManagerProxy* quota_manager_proxy) : file_task_runner_(file_task_runner), obfuscated_file_util_(obfuscated_file_util), file_system_usage_cache_(file_system_usage_cache), @@ -102,12 +102,14 @@ void QuotaBackendImpl::DecrementDirtyCount(const GURL& origin, void QuotaBackendImpl::DidGetUsageAndQuotaForReserveQuota( const QuotaReservationInfo& info, const ReserveQuotaCallback& callback, - quota::QuotaStatusCode status, int64 usage, int64 quota) { + storage::QuotaStatusCode status, + int64 usage, + int64 quota) { DCHECK(file_task_runner_->RunsTasksOnCurrentThread()); DCHECK(info.origin.is_valid()); DCHECK_LE(0, usage); DCHECK_LE(0, quota); - if (status != quota::kQuotaStatusOk) { + if (status != storage::kQuotaStatusOk) { callback.Run(base::File::FILE_ERROR_FAILED, 0); return; } @@ -136,8 +138,10 @@ void QuotaBackendImpl::ReserveQuotaInternal(const QuotaReservationInfo& info) { DCHECK(info.origin.is_valid()); DCHECK(quota_manager_proxy_); quota_manager_proxy_->NotifyStorageModified( - quota::QuotaClient::kFileSystem, info.origin, - FileSystemTypeToQuotaStorageType(info.type), info.delta); + storage::QuotaClient::kFileSystem, + info.origin, + FileSystemTypeToQuotaStorageType(info.type), + info.delta); } base::File::Error QuotaBackendImpl::GetUsageCachePath( @@ -162,4 +166,4 @@ QuotaBackendImpl::QuotaReservationInfo::QuotaReservationInfo( QuotaBackendImpl::QuotaReservationInfo::~QuotaReservationInfo() { } -} // namespace fileapi +} // namespace storage diff --git a/webkit/browser/fileapi/quota/quota_backend_impl.h b/webkit/browser/fileapi/quota/quota_backend_impl.h index ec4c45a..98c36a0 100644 --- a/webkit/browser/fileapi/quota/quota_backend_impl.h +++ b/webkit/browser/fileapi/quota/quota_backend_impl.h @@ -20,11 +20,11 @@ namespace content { class QuotaBackendImplTest; } -namespace quota { +namespace storage { class QuotaManagerProxy; } -namespace fileapi { +namespace storage { class FileSystemUsageCache; class ObfuscatedFileUtil; @@ -39,7 +39,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT QuotaBackendImpl QuotaBackendImpl(base::SequencedTaskRunner* file_task_runner, ObfuscatedFileUtil* obfuscated_file_util, FileSystemUsageCache* file_system_usage_cache, - quota::QuotaManagerProxy* quota_manager_proxy); + storage::QuotaManagerProxy* quota_manager_proxy); virtual ~QuotaBackendImpl(); // QuotaReservationManager::QuotaBackend overrides. @@ -75,12 +75,11 @@ class WEBKIT_STORAGE_BROWSER_EXPORT QuotaBackendImpl int64 delta; }; - void DidGetUsageAndQuotaForReserveQuota( - const QuotaReservationInfo& info, - const ReserveQuotaCallback& callback, - quota::QuotaStatusCode status, - int64 usage, - int64 quota); + void DidGetUsageAndQuotaForReserveQuota(const QuotaReservationInfo& info, + const ReserveQuotaCallback& callback, + storage::QuotaStatusCode status, + int64 usage, + int64 quota); void ReserveQuotaInternal( const QuotaReservationInfo& info); @@ -95,13 +94,13 @@ class WEBKIT_STORAGE_BROWSER_EXPORT QuotaBackendImpl ObfuscatedFileUtil* obfuscated_file_util_; FileSystemUsageCache* file_system_usage_cache_; - scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; + scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy_; base::WeakPtrFactory<QuotaBackendImpl> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(QuotaBackendImpl); }; -} // namespace fileapi +} // namespace storage #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_BACKEND_IMPL_H_ diff --git a/webkit/browser/fileapi/quota/quota_reservation.cc b/webkit/browser/fileapi/quota/quota_reservation.cc index f199b35..5139d0b 100644 --- a/webkit/browser/fileapi/quota/quota_reservation.cc +++ b/webkit/browser/fileapi/quota/quota_reservation.cc @@ -8,7 +8,7 @@ #include "webkit/browser/fileapi/quota/open_file_handle.h" #include "webkit/browser/fileapi/quota/quota_reservation_buffer.h" -namespace fileapi { +namespace storage { void QuotaReservation::RefreshReservation( int64 size, @@ -124,4 +124,4 @@ bool QuotaReservation::DidUpdateReservedQuota( return true; } -} // namespace fileapi +} // namespace storage diff --git a/webkit/browser/fileapi/quota/quota_reservation.h b/webkit/browser/fileapi/quota/quota_reservation.h index 9233a24..be107d6 100644 --- a/webkit/browser/fileapi/quota/quota_reservation.h +++ b/webkit/browser/fileapi/quota/quota_reservation.h @@ -16,7 +16,7 @@ class GURL; -namespace fileapi { +namespace storage { class QuotaReservationBuffer; class OpenFileHandle; @@ -90,6 +90,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT QuotaReservation DISALLOW_COPY_AND_ASSIGN(QuotaReservation); }; -} // namespace fileapi +} // namespace storage #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_H_ diff --git a/webkit/browser/fileapi/quota/quota_reservation_buffer.cc b/webkit/browser/fileapi/quota/quota_reservation_buffer.cc index 9e44319..cfa567f 100644 --- a/webkit/browser/fileapi/quota/quota_reservation_buffer.cc +++ b/webkit/browser/fileapi/quota/quota_reservation_buffer.cc @@ -9,7 +9,7 @@ #include "webkit/browser/fileapi/quota/open_file_handle_context.h" #include "webkit/browser/fileapi/quota/quota_reservation.h" -namespace fileapi { +namespace storage { QuotaReservationBuffer::QuotaReservationBuffer( base::WeakPtr<QuotaReservationManager> reservation_manager, @@ -102,5 +102,4 @@ bool QuotaReservationBuffer::DecrementDirtyCount( return false; } - -} // namespace fileapi +} // namespace storage diff --git a/webkit/browser/fileapi/quota/quota_reservation_buffer.h b/webkit/browser/fileapi/quota/quota_reservation_buffer.h index 0d87a99..967e1b9 100644 --- a/webkit/browser/fileapi/quota/quota_reservation_buffer.h +++ b/webkit/browser/fileapi/quota/quota_reservation_buffer.h @@ -16,7 +16,7 @@ #include "webkit/browser/webkit_storage_browser_export.h" #include "webkit/common/fileapi/file_system_types.h" -namespace fileapi { +namespace storage { class QuotaReservation; class OpenFileHandle; @@ -73,7 +73,7 @@ class QuotaReservationBuffer : public base::RefCounted<QuotaReservationBuffer> { base::WeakPtr<QuotaReservationManager> reservation_manager_; GURL origin_; - fileapi::FileSystemType type_; + storage::FileSystemType type_; int64 reserved_quota_; @@ -82,6 +82,6 @@ class QuotaReservationBuffer : public base::RefCounted<QuotaReservationBuffer> { DISALLOW_COPY_AND_ASSIGN(QuotaReservationBuffer); }; -} // namespace fileapi +} // namespace storage #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_ diff --git a/webkit/browser/fileapi/quota/quota_reservation_manager.cc b/webkit/browser/fileapi/quota/quota_reservation_manager.cc index efb54b2..6ab2c26 100644 --- a/webkit/browser/fileapi/quota/quota_reservation_manager.cc +++ b/webkit/browser/fileapi/quota/quota_reservation_manager.cc @@ -7,7 +7,7 @@ #include "webkit/browser/fileapi/quota/quota_reservation.h" #include "webkit/browser/fileapi/quota/quota_reservation_buffer.h" -namespace fileapi { +namespace storage { QuotaReservationManager::QuotaReservationManager( scoped_ptr<QuotaBackend> backend) @@ -88,4 +88,4 @@ scoped_refptr<QuotaReservation> QuotaReservationManager::CreateReservation( return GetReservationBuffer(origin, type)->CreateReservation();; } -} // namespace fileapi +} // namespace storage diff --git a/webkit/browser/fileapi/quota/quota_reservation_manager.h b/webkit/browser/fileapi/quota/quota_reservation_manager.h index 6dc66ec..2e19450 100644 --- a/webkit/browser/fileapi/quota/quota_reservation_manager.h +++ b/webkit/browser/fileapi/quota/quota_reservation_manager.h @@ -21,7 +21,7 @@ namespace content { class QuotaReservationManagerTest; } -namespace fileapi { +namespace storage { class QuotaReservation; class QuotaReservationBuffer; @@ -122,6 +122,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT QuotaReservationManager { DISALLOW_COPY_AND_ASSIGN(QuotaReservationManager); }; -} // namespace fileapi +} // namespace storage #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_MANAGER_H_ |