diff options
author | pilgrim@chromium.org <pilgrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-13 00:52:34 +0000 |
---|---|---|
committer | pilgrim@chromium.org <pilgrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-13 00:52:34 +0000 |
commit | 45c6f6872735c63916e122feba77523f3904e169 (patch) | |
tree | 3efb18ec96663b6b228cf2b69221f0fb5006df00 /webkit | |
parent | f698c16804ddd48594a2840424767cb5e4b0754c (diff) | |
download | chromium_src-45c6f6872735c63916e122feba77523f3904e169.zip chromium_src-45c6f6872735c63916e122feba77523f3904e169.tar.gz chromium_src-45c6f6872735c63916e122feba77523f3904e169.tar.bz2 |
Rename some appcache types in preparation for moving to content namespace
BUG=338338
TBR=darin@chromium.org
Review URL: https://codereview.chromium.org/330053004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/browser/appcache/appcache_database.cc | 5 | ||||
-rw-r--r-- | webkit/browser/appcache/appcache_group.cc | 2 | ||||
-rw-r--r-- | webkit/browser/appcache/appcache_group.h | 8 | ||||
-rw-r--r-- | webkit/browser/appcache/appcache_host.cc | 15 | ||||
-rw-r--r-- | webkit/browser/appcache/appcache_host.h | 4 | ||||
-rw-r--r-- | webkit/browser/appcache/appcache_update_job.cc | 72 | ||||
-rw-r--r-- | webkit/browser/appcache/appcache_update_job.h | 10 | ||||
-rw-r--r-- | webkit/common/appcache/appcache_interfaces.cc | 13 | ||||
-rw-r--r-- | webkit/common/appcache/appcache_interfaces.h | 43 |
9 files changed, 90 insertions, 82 deletions
diff --git a/webkit/browser/appcache/appcache_database.cc b/webkit/browser/appcache/appcache_database.cc index 1fde2a7..c000451 100644 --- a/webkit/browser/appcache/appcache_database.cc +++ b/webkit/browser/appcache/appcache_database.cc @@ -951,7 +951,8 @@ void AppCacheDatabase::ReadNamespaceRecords( NamespaceRecordVector* intercepts, NamespaceRecordVector* fallbacks) { while (statement->Step()) { - NamespaceType type = static_cast<NamespaceType>(statement->ColumnInt(2)); + AppCacheNamespaceType type = static_cast<AppCacheNamespaceType>( + statement->ColumnInt(2)); NamespaceRecordVector* records = (type == FALLBACK_NAMESPACE) ? fallbacks : intercepts; records->push_back(NamespaceRecord()); @@ -970,7 +971,7 @@ void AppCacheDatabase::ReadNamespaceRecord( // Note: quick and dirty storage for the 'executable' bit w/o changing // schemas, we use the high bit of 'type' field. - record->namespace_.type = static_cast<NamespaceType> + record->namespace_.type = static_cast<AppCacheNamespaceType> (type_with_executable_bit & 0x7ffffff); record->namespace_.is_executable = (type_with_executable_bit & 0x80000000) != 0; diff --git a/webkit/browser/appcache/appcache_group.cc b/webkit/browser/appcache/appcache_group.cc index c62eaea..f5ad43d 100644 --- a/webkit/browser/appcache/appcache_group.cc +++ b/webkit/browser/appcache/appcache_group.cc @@ -240,7 +240,7 @@ void AppCacheGroup::HostDestructionImminent(AppCacheHost* host) { restart_update_task_.Cancel(); } -void AppCacheGroup::SetUpdateStatus(UpdateStatus status) { +void AppCacheGroup::SetUpdateAppCacheStatus(UpdateAppCacheStatus status) { if (status == update_status_) return; diff --git a/webkit/browser/appcache/appcache_group.h b/webkit/browser/appcache/appcache_group.h index 04bbd10..68cdb2a 100644 --- a/webkit/browser/appcache/appcache_group.h +++ b/webkit/browser/appcache/appcache_group.h @@ -48,7 +48,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheGroup virtual ~UpdateObserver() {} }; - enum UpdateStatus { + enum UpdateAppCacheStatus { IDLE, CHECKING, DOWNLOADING, @@ -80,7 +80,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheGroup void AddNewlyDeletableResponseIds(std::vector<int64>* response_ids); - UpdateStatus update_status() const { return update_status_; } + UpdateAppCacheStatus update_status() const { return update_status_; } // Starts an update via update() javascript API. void StartUpdate() { @@ -117,7 +117,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheGroup static const int kUpdateRestartDelayMs = 1000; AppCacheUpdateJob* update_job() { return update_job_; } - void SetUpdateStatus(UpdateStatus status); + void SetUpdateAppCacheStatus(UpdateAppCacheStatus status); void NotifyContentBlocked(); @@ -134,7 +134,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheGroup const int64 group_id_; const GURL manifest_url_; base::Time creation_time_; - UpdateStatus update_status_; + UpdateAppCacheStatus update_status_; bool is_obsolete_; bool is_being_deleted_; std::vector<int64> newly_deletable_response_ids_; diff --git a/webkit/browser/appcache/appcache_host.cc b/webkit/browser/appcache/appcache_host.cc index 7f69137..bcd9c7d 100644 --- a/webkit/browser/appcache/appcache_host.cc +++ b/webkit/browser/appcache/appcache_host.cc @@ -20,7 +20,7 @@ namespace { void FillCacheInfo(const AppCache* cache, const GURL& manifest_url, - Status status, AppCacheInfo* info) { + AppCacheStatus status, AppCacheInfo* info) { info->manifest_url = manifest_url; info->status = status; @@ -117,11 +117,12 @@ void AppCacheHost::SelectCache(const GURL& document_url, frontend_->OnEventRaised(host_ids, CHECKING_EVENT); frontend_->OnErrorEventRaised( host_ids, - ErrorDetails("Cache creation was blocked by the content policy", - POLICY_ERROR, - GURL(), - 0, - false /*is_cross_origin*/)); + AppCacheErrorDetails( + "Cache creation was blocked by the content policy", + POLICY_ERROR, + GURL(), + 0, + false /*is_cross_origin*/)); frontend_->OnContentBlocked(host_id_, manifest_url); return; } @@ -312,7 +313,7 @@ void AppCacheHost::GetResourceList( associated_cache_->ToResourceInfoVector(resource_infos); } -Status AppCacheHost::GetStatus() { +AppCacheStatus AppCacheHost::GetStatus() { // 6.9.8 Application cache API AppCache* cache = associated_cache(); if (!cache) diff --git a/webkit/browser/appcache/appcache_host.h b/webkit/browser/appcache/appcache_host.h index 9ca13ad..8ce8141 100644 --- a/webkit/browser/appcache/appcache_host.h +++ b/webkit/browser/appcache/appcache_host.h @@ -48,7 +48,7 @@ class AppCache; class AppCacheFrontend; class AppCacheRequestHandler; -typedef base::Callback<void(Status, void*)> GetStatusCallback; +typedef base::Callback<void(AppCacheStatus, void*)> GetStatusCallback; typedef base::Callback<void(bool, void*)> StartUpdateCallback; typedef base::Callback<void(bool, void*)> SwapCacheCallback; @@ -183,7 +183,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheHost friend class content::AppCacheRequestHandlerTest; friend class content::AppCacheUpdateJobTest; - Status GetStatus(); + AppCacheStatus GetStatus(); void LoadSelectedCache(int64 cache_id); void LoadOrCreateGroup(const GURL& manifest_url); diff --git a/webkit/browser/appcache/appcache_update_job.cc b/webkit/browser/appcache/appcache_update_job.cc index 16ee1c9..3266f5e 100644 --- a/webkit/browser/appcache/appcache_update_job.cc +++ b/webkit/browser/appcache/appcache_update_job.cc @@ -58,7 +58,7 @@ class HostNotifier { } } - void SendNotifications(EventID event_id) { + void SendNotifications(AppCacheEventID event_id) { for (NotifyHostMap::iterator it = hosts_to_notify.begin(); it != hosts_to_notify.end(); ++it) { AppCacheFrontend* frontend = it->first; @@ -76,7 +76,7 @@ class HostNotifier { } } - void SendErrorNotifications(const ErrorDetails& details) { + void SendErrorNotifications(const AppCacheErrorDetails& details) { DCHECK(!details.message.empty()); for (NotifyHostMap::iterator it = hosts_to_notify.begin(); it != hosts_to_notify.end(); ++it) { @@ -369,7 +369,7 @@ AppCacheUpdateJob::~AppCacheUpdateJob() { DCHECK(master_entry_fetches_.empty()); if (group_) - group_->SetUpdateStatus(AppCacheGroup::IDLE); + group_->SetUpdateAppCacheStatus(AppCacheGroup::IDLE); } void AppCacheUpdateJob::StartUpdate(AppCacheHost* host, @@ -398,7 +398,7 @@ void AppCacheUpdateJob::StartUpdate(AppCacheHost* host, } // Notify host (if any) if already checking or downloading. - AppCacheGroup::UpdateStatus update_status = group_->update_status(); + AppCacheGroup::UpdateAppCacheStatus update_status = group_->update_status(); if (update_status == AppCacheGroup::CHECKING || update_status == AppCacheGroup::DOWNLOADING) { if (host) { @@ -417,7 +417,7 @@ void AppCacheUpdateJob::StartUpdate(AppCacheHost* host, // Begin update process for the group. MadeProgress(); - group_->SetUpdateStatus(AppCacheGroup::CHECKING); + group_->SetUpdateAppCacheStatus(AppCacheGroup::CHECKING); if (group_->HasCache()) { update_type_ = UPGRADE_ATTEMPT; NotifyAllAssociatedHosts(CHECKING_EVENT); @@ -443,9 +443,10 @@ AppCacheResponseWriter* AppCacheUpdateJob::CreateResponseWriter() { return writer; } -void AppCacheUpdateJob::HandleCacheFailure(const ErrorDetails& error_details, - ResultType result, - const GURL& failed_resource_url) { +void AppCacheUpdateJob::HandleCacheFailure( + const AppCacheErrorDetails& error_details, + ResultType result, + const GURL& failed_resource_url) { // 6.9.4 cache failure steps 2-8. DCHECK(internal_state_ != CACHE_FAILURE); DCHECK(!error_details.message.empty()); @@ -524,7 +525,7 @@ void AppCacheUpdateJob::HandleManifestFetchCompleted( const char* kFormatString = "Manifest fetch failed (%d) %s"; std::string message = FormatUrlErrorMessage( kFormatString, manifest_url_, fetcher->result(), response_code); - HandleCacheFailure(ErrorDetails(message, + HandleCacheFailure(AppCacheErrorDetails(message, appcache::MANIFEST_ERROR, manifest_url_, response_code, @@ -538,7 +539,7 @@ void AppCacheUpdateJob::OnGroupMadeObsolete(AppCacheGroup* group, bool success, int response_code) { DCHECK(master_entry_fetches_.empty()); - CancelAllMasterEntryFetches(ErrorDetails( + CancelAllMasterEntryFetches(AppCacheErrorDetails( "The cache has been made obsolete, " "the manifest file returned 404 or 410", appcache::MANIFEST_ERROR, @@ -552,11 +553,12 @@ void AppCacheUpdateJob::OnGroupMadeObsolete(AppCacheGroup* group, MaybeCompleteUpdate(); } else { // Treat failure to mark group obsolete as a cache failure. - HandleCacheFailure(ErrorDetails("Failed to mark the cache as obsolete", - UNKNOWN_ERROR, - GURL(), - 0, - false /*is_cross_origin*/), + HandleCacheFailure(AppCacheErrorDetails( + "Failed to mark the cache as obsolete", + UNKNOWN_ERROR, + GURL(), + 0, + false /*is_cross_origin*/), DB_ERROR, GURL()); } @@ -586,7 +588,7 @@ void AppCacheUpdateJob::ContinueHandleManifestFetchCompleted(bool changed) { const std::string message = base::StringPrintf(kFormatString, manifest_url_.spec().c_str()); HandleCacheFailure( - ErrorDetails( + AppCacheErrorDetails( message, SIGNATURE_ERROR, GURL(), 0, false /*is_cross_origin*/), MANIFEST_ERROR, GURL()); @@ -619,7 +621,7 @@ void AppCacheUpdateJob::ContinueHandleManifestFetchCompleted(bool changed) { LogConsoleMessageToAll(message); } - group_->SetUpdateStatus(AppCacheGroup::DOWNLOADING); + group_->SetUpdateAppCacheStatus(AppCacheGroup::DOWNLOADING); NotifyAllAssociatedHosts(DOWNLOADING_EVENT); FetchUrls(); FetchMasterEntries(); @@ -678,19 +680,20 @@ void AppCacheUpdateJob::HandleUrlFetchCompleted(URLFetcher* fetcher) { switch (result) { case DISKCACHE_ERROR: HandleCacheFailure( - ErrorDetails( + AppCacheErrorDetails( message, UNKNOWN_ERROR, GURL(), 0, is_cross_origin), result, url); break; case NETWORK_ERROR: HandleCacheFailure( - ErrorDetails(message, RESOURCE_ERROR, url, 0, is_cross_origin), + AppCacheErrorDetails(message, RESOURCE_ERROR, url, 0, + is_cross_origin), result, url); break; default: - HandleCacheFailure(ErrorDetails(message, + HandleCacheFailure(AppCacheErrorDetails(message, RESOURCE_ERROR, url, response_code, @@ -784,7 +787,7 @@ void AppCacheUpdateJob::HandleMasterEntryFetchCompleted( std::string message = FormatUrlErrorMessage( kFormatString, request->url(), fetcher->result(), response_code); host_notifier.SendErrorNotifications( - ErrorDetails(message, + AppCacheErrorDetails(message, appcache::MANIFEST_ERROR, request->url(), response_code, @@ -799,7 +802,7 @@ void AppCacheUpdateJob::HandleMasterEntryFetchCompleted( // Section 6.9.4, step 22.3. if (update_type_ == CACHE_ATTEMPT && pending_master_entries_.empty()) { - HandleCacheFailure(ErrorDetails(message, + HandleCacheFailure(AppCacheErrorDetails(message, appcache::MANIFEST_ERROR, request->url(), response_code, @@ -847,7 +850,7 @@ void AppCacheUpdateJob::HandleManifestRefetchCompleted( << " response code: " << response_code; ScheduleUpdateRetry(kRerunDelayMs); if (response_code == 200) { - HandleCacheFailure(ErrorDetails("Manifest changed during update", + HandleCacheFailure(AppCacheErrorDetails("Manifest changed during update", CHANGED_ERROR, GURL(), 0, @@ -858,7 +861,7 @@ void AppCacheUpdateJob::HandleManifestRefetchCompleted( const char* kFormatString = "Manifest re-fetch failed (%d) %s"; std::string message = FormatUrlErrorMessage( kFormatString, manifest_url_, fetcher->result(), response_code); - HandleCacheFailure(ErrorDetails(message, + HandleCacheFailure(AppCacheErrorDetails(message, appcache::MANIFEST_ERROR, GURL(), response_code, @@ -880,7 +883,7 @@ void AppCacheUpdateJob::OnManifestInfoWriteComplete(int result) { base::Unretained(this))); } else { HandleCacheFailure( - ErrorDetails("Failed to write the manifest headers to storage", + AppCacheErrorDetails("Failed to write the manifest headers to storage", UNKNOWN_ERROR, GURL(), 0, @@ -900,7 +903,7 @@ void AppCacheUpdateJob::OnManifestDataWriteComplete(int result) { StoreGroupAndCache(); } else { HandleCacheFailure( - ErrorDetails("Failed to write the manifest data to storage", + AppCacheErrorDetails("Failed to write the manifest data to storage", UNKNOWN_ERROR, GURL(), 0, @@ -942,7 +945,7 @@ void AppCacheUpdateJob::OnGroupAndNewestCacheStored(AppCacheGroup* group, inprogress_cache_ = newest_cache; ResultType result = DB_ERROR; - ErrorReason reason = UNKNOWN_ERROR; + AppCacheErrorReason reason = UNKNOWN_ERROR; std::string message("Failed to commit new cache to storage"); if (would_exceed_quota) { message.append(", would exceed quota"); @@ -950,19 +953,20 @@ void AppCacheUpdateJob::OnGroupAndNewestCacheStored(AppCacheGroup* group, reason = appcache::QUOTA_ERROR; } HandleCacheFailure( - ErrorDetails(message, reason, GURL(), 0, false /*is_cross_origin*/), + AppCacheErrorDetails(message, reason, GURL(), 0, + false /*is_cross_origin*/), result, GURL()); } } void AppCacheUpdateJob::NotifySingleHost(AppCacheHost* host, - EventID event_id) { + AppCacheEventID event_id) { std::vector<int> ids(1, host->host_id()); host->frontend()->OnEventRaised(ids, event_id); } -void AppCacheUpdateJob::NotifyAllAssociatedHosts(EventID event_id) { +void AppCacheUpdateJob::NotifyAllAssociatedHosts(AppCacheEventID event_id) { HostNotifier host_notifier; AddAllAssociatedHostsToNotifier(&host_notifier); host_notifier.SendNotifications(event_id); @@ -980,7 +984,7 @@ void AppCacheUpdateJob::NotifyAllFinalProgress() { NotifyAllProgress(GURL()); } -void AppCacheUpdateJob::NotifyAllError(const ErrorDetails& details) { +void AppCacheUpdateJob::NotifyAllError(const AppCacheErrorDetails& details) { HostNotifier host_notifier; AddAllAssociatedHostsToNotifier(&host_notifier); host_notifier.SendErrorNotifications(details); @@ -1044,7 +1048,7 @@ void AppCacheUpdateJob::CheckIfManifestChanged() { // Use a local variable because service_ is reset in HandleCacheFailure. AppCacheServiceImpl* service = service_; HandleCacheFailure( - ErrorDetails("Manifest entry not found in existing cache", + AppCacheErrorDetails("Manifest entry not found in existing cache", UNKNOWN_ERROR, GURL(), 0, @@ -1291,7 +1295,7 @@ void AppCacheUpdateJob::FetchMasterEntries() { } void AppCacheUpdateJob::CancelAllMasterEntryFetches( - const ErrorDetails& error_details) { + const AppCacheErrorDetails& error_details) { // For now, cancel all in-progress fetches for master entries and pretend // all master entries fetches have completed. // TODO(jennb): Delete this when update no longer fetches master entries @@ -1596,7 +1600,7 @@ void AppCacheUpdateJob::DeleteSoon() { // Break the connection with the group so the group cannot call delete // on this object after we've posted a task to delete ourselves. - group_->SetUpdateStatus(AppCacheGroup::IDLE); + group_->SetUpdateAppCacheStatus(AppCacheGroup::IDLE); group_ = NULL; base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); diff --git a/webkit/browser/appcache/appcache_update_job.h b/webkit/browser/appcache/appcache_update_job.h index cf96409..3384d9a 100644 --- a/webkit/browser/appcache/appcache_update_job.h +++ b/webkit/browser/appcache/appcache_update_job.h @@ -187,7 +187,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheUpdateJob virtual void OnServiceReinitialized( AppCacheStorageReference* old_storage) OVERRIDE; - void HandleCacheFailure(const ErrorDetails& details, + void HandleCacheFailure(const AppCacheErrorDetails& details, ResultType result, const GURL& failed_resource_url); @@ -204,11 +204,11 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheUpdateJob void StoreGroupAndCache(); - void NotifySingleHost(AppCacheHost* host, EventID event_id); - void NotifyAllAssociatedHosts(EventID event_id); + void NotifySingleHost(AppCacheHost* host, AppCacheEventID event_id); + void NotifyAllAssociatedHosts(AppCacheEventID event_id); void NotifyAllProgress(const GURL& url); void NotifyAllFinalProgress(); - void NotifyAllError(const ErrorDetails& detals); + void NotifyAllError(const AppCacheErrorDetails& detals); void LogConsoleMessageToAll(const std::string& message); void AddAllAssociatedHostsToNotifier(HostNotifier* notifier); @@ -236,7 +236,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheUpdateJob void AddMasterEntryToFetchList(AppCacheHost* host, const GURL& url, bool is_new); void FetchMasterEntries(); - void CancelAllMasterEntryFetches(const ErrorDetails& details); + void CancelAllMasterEntryFetches(const AppCacheErrorDetails& details); // Asynchronously loads the entry from the newest complete cache if the // HTTP caching semantics allow. diff --git a/webkit/common/appcache/appcache_interfaces.cc b/webkit/common/appcache/appcache_interfaces.cc index 154d064..2889976 100644 --- a/webkit/common/appcache/appcache_interfaces.cc +++ b/webkit/common/appcache/appcache_interfaces.cc @@ -49,16 +49,16 @@ AppCacheResourceInfo::AppCacheResourceInfo() AppCacheResourceInfo::~AppCacheResourceInfo() { } -ErrorDetails::ErrorDetails() +AppCacheErrorDetails::AppCacheErrorDetails() : message(), reason(UNKNOWN_ERROR), url(), status(0), is_cross_origin(false) {} -ErrorDetails::ErrorDetails( +AppCacheErrorDetails::AppCacheErrorDetails( std::string in_message, - ErrorReason in_reason, + AppCacheErrorReason in_reason, GURL in_url, int in_status, bool in_is_cross_origin) @@ -68,7 +68,7 @@ ErrorDetails::ErrorDetails( status(in_status), is_cross_origin(in_is_cross_origin) {} -ErrorDetails::~ErrorDetails() {} +AppCacheErrorDetails::~AppCacheErrorDetails() {} Namespace::Namespace() : type(FALLBACK_NAMESPACE), @@ -77,7 +77,8 @@ Namespace::Namespace() } Namespace::Namespace( - NamespaceType type, const GURL& url, const GURL& target, bool is_pattern) + AppCacheNamespaceType type, const GURL& url, const GURL& target, + bool is_pattern) : type(type), namespace_url(url), target_url(target), @@ -86,7 +87,7 @@ Namespace::Namespace( } Namespace::Namespace( - NamespaceType type, const GURL& url, const GURL& target, + AppCacheNamespaceType type, const GURL& url, const GURL& target, bool is_pattern, bool is_executable) : type(type), namespace_url(url), diff --git a/webkit/common/appcache/appcache_interfaces.h b/webkit/common/appcache/appcache_interfaces.h index c99eb87..13d34ba 100644 --- a/webkit/common/appcache/appcache_interfaces.h +++ b/webkit/common/appcache/appcache_interfaces.h @@ -28,7 +28,7 @@ static const int64 kNoCacheId = 0; static const int64 kNoResponseId = 0; static const int64 kUnknownCacheId = -1; -enum Status { +enum AppCacheStatus { UNCACHED, IDLE, CHECKING, @@ -38,7 +38,7 @@ enum Status { STATUS_LAST = OBSOLETE }; -enum EventID { +enum AppCacheEventID { CHECKING_EVENT, ERROR_EVENT, NO_UPDATE_EVENT, @@ -51,20 +51,20 @@ enum EventID { }; // Temporarily renumber them in wierd way, to help remove LOG_TIP from WebKit -enum LogLevel { +enum AppCacheLogLevel { LOG_DEBUG = 4, LOG_INFO = 1, LOG_WARNING = 2, LOG_ERROR = 3, }; -enum NamespaceType { +enum AppCacheNamespaceType { FALLBACK_NAMESPACE, INTERCEPT_NAMESPACE, NETWORK_NAMESPACE }; -enum ErrorReason { +enum AppCacheErrorReason { MANIFEST_ERROR, SIGNATURE_ERROR, RESOURCE_ERROR, @@ -86,7 +86,7 @@ struct WEBKIT_STORAGE_COMMON_EXPORT AppCacheInfo { base::Time last_access_time; int64 cache_id; int64 group_id; - Status status; + AppCacheStatus status; int64 size; bool is_complete; }; @@ -109,17 +109,17 @@ struct WEBKIT_STORAGE_COMMON_EXPORT AppCacheResourceInfo { int64 response_id; }; -struct WEBKIT_STORAGE_COMMON_EXPORT ErrorDetails { - ErrorDetails(); - ErrorDetails(std::string message, - ErrorReason reason, +struct WEBKIT_STORAGE_COMMON_EXPORT AppCacheErrorDetails { + AppCacheErrorDetails(); + AppCacheErrorDetails(std::string message, + AppCacheErrorReason reason, GURL url, int status, bool is_cross_origin); - ~ErrorDetails(); + ~AppCacheErrorDetails(); std::string message; - ErrorReason reason; + AppCacheErrorReason reason; GURL url; int status; bool is_cross_origin; @@ -129,15 +129,15 @@ typedef std::vector<AppCacheResourceInfo> AppCacheResourceInfoVector; struct WEBKIT_STORAGE_COMMON_EXPORT Namespace { Namespace(); // Type is set to FALLBACK_NAMESPACE by default. - Namespace(NamespaceType type, const GURL& url, const GURL& target, + Namespace(AppCacheNamespaceType type, const GURL& url, const GURL& target, bool is_pattern); - Namespace(NamespaceType type, const GURL& url, const GURL& target, + Namespace(AppCacheNamespaceType type, const GURL& url, const GURL& target, bool is_pattern, bool is_executable); ~Namespace(); bool IsMatch(const GURL& url) const; - NamespaceType type; + AppCacheNamespaceType type; GURL namespace_url; GURL target_url; bool is_pattern; @@ -152,17 +152,18 @@ class WEBKIT_STORAGE_COMMON_EXPORT AppCacheFrontend { virtual void OnCacheSelected( int host_id, const appcache::AppCacheInfo& info) = 0; virtual void OnStatusChanged(const std::vector<int>& host_ids, - Status status) = 0; + AppCacheStatus status) = 0; virtual void OnEventRaised(const std::vector<int>& host_ids, - EventID event_id) = 0; + AppCacheEventID event_id) = 0; virtual void OnProgressEventRaised(const std::vector<int>& host_ids, const GURL& url, int num_total, int num_complete) = 0; - virtual void OnErrorEventRaised(const std::vector<int>& host_ids, - const appcache::ErrorDetails& details) = 0; + virtual void OnErrorEventRaised( + const std::vector<int>& host_ids, + const appcache::AppCacheErrorDetails& details) = 0; virtual void OnContentBlocked(int host_id, const GURL& manifest_url) = 0; - virtual void OnLogMessage(int host_id, LogLevel log_level, + virtual void OnLogMessage(int host_id, AppCacheLogLevel log_level, const std::string& message) = 0; virtual ~AppCacheFrontend() {} }; @@ -186,7 +187,7 @@ class WEBKIT_STORAGE_COMMON_EXPORT AppCacheBackend { int64 appcache_id) = 0; virtual void MarkAsForeignEntry(int host_id, const GURL& document_url, int64 cache_document_was_loaded_from) = 0; - virtual Status GetStatus(int host_id) = 0; + virtual AppCacheStatus GetStatus(int host_id) = 0; virtual bool StartUpdate(int host_id) = 0; virtual bool SwapCache(int host_id) = 0; virtual void GetResourceList( |