Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: content/child/appcache/web_application_cache_host_impl.cc

Issue 2671643002: Rename WebApplicationCacheHostImpl::IsNewMasterEntry enum to not use YES/NO. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/appcache/web_application_cache_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/appcache/web_application_cache_host_impl.cc
diff --git a/content/child/appcache/web_application_cache_host_impl.cc b/content/child/appcache/web_application_cache_host_impl.cc
index ee079528d2c9e604a38575b1c26186d0cceafae2..97c81cd1b3db298abd102a00342bc3e396638f02 100644
--- a/content/child/appcache/web_application_cache_host_impl.cc
+++ b/content/child/appcache/web_application_cache_host_impl.cc
@@ -65,7 +65,7 @@ WebApplicationCacheHostImpl::WebApplicationCacheHostImpl(
status_(APPCACHE_STATUS_UNCACHED),
is_scheme_supported_(false),
is_get_method_(false),
- is_new_master_entry_(MAYBE),
+ is_new_master_entry_(MAYBE_NEW_ENTRY),
was_select_cache_called_(false) {
DCHECK(client && backend);
// PlzNavigate: The browser passes the ID to be used.
@@ -201,7 +201,7 @@ void WebApplicationCacheHostImpl::selectCacheWithoutManifest() {
status_ = (document_response_.appCacheID() == kAppCacheNoCacheId) ?
APPCACHE_STATUS_UNCACHED : APPCACHE_STATUS_CHECKING;
- is_new_master_entry_ = NO;
+ is_new_master_entry_ = OLD_ENTRY;
michaeln 2017/02/03 00:43:55 would MAYBE, YUP, NOPE be more readable? lgtm
Patti Lor 2017/02/03 01:08:14 Yeah, I was also a bit worried about losing a bit
backend_->SelectCache(host_id_, document_url_,
document_response_.appCacheID(),
GURL());
@@ -221,10 +221,10 @@ bool WebApplicationCacheHostImpl::selectCacheWithManifest(
if (is_scheme_supported_ && is_get_method_ &&
(manifest_gurl.GetOrigin() == document_url_.GetOrigin())) {
status_ = APPCACHE_STATUS_CHECKING;
- is_new_master_entry_ = YES;
+ is_new_master_entry_ = NEW_ENTRY;
} else {
status_ = APPCACHE_STATUS_UNCACHED;
- is_new_master_entry_ = NO;
+ is_new_master_entry_ = OLD_ENTRY;
manifest_gurl = GURL();
}
backend_->SelectCache(
@@ -232,7 +232,7 @@ bool WebApplicationCacheHostImpl::selectCacheWithManifest(
return true;
}
- DCHECK_EQ(NO, is_new_master_entry_);
+ DCHECK_EQ(OLD_ENTRY, is_new_master_entry_);
// 6.9.6 The application cache selection algorithm
// Check for 'foreign' entries.
@@ -264,18 +264,18 @@ void WebApplicationCacheHostImpl::didReceiveResponseForMainResource(
is_scheme_supported_ = IsSchemeSupportedForAppCache(document_url_);
if ((document_response_.appCacheID() != kAppCacheNoCacheId) ||
!is_scheme_supported_ || !is_get_method_)
- is_new_master_entry_ = NO;
+ is_new_master_entry_ = OLD_ENTRY;
}
void WebApplicationCacheHostImpl::didReceiveDataForMainResource(
const char* data, unsigned len) {
- if (is_new_master_entry_ == NO)
+ if (is_new_master_entry_ == OLD_ENTRY)
return;
// TODO(michaeln): write me
}
void WebApplicationCacheHostImpl::didFinishLoadingMainResource(bool success) {
- if (is_new_master_entry_ == NO)
+ if (is_new_master_entry_ == OLD_ENTRY)
return;
// TODO(michaeln): write me
}
« no previous file with comments | « content/child/appcache/web_application_cache_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698