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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/FetchContext.h

Issue 2676163002: Refactor the forPreload flag to mean speculative preload. (Closed)
Patch Set: Review comments Created 3 years, 10 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
Index: third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
diff --git a/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h b/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
index ffc6869eb58647e2242e800f4aa9c16df9579f6a..3858b9b1c20103fb835c304e258287e6c10d7003 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
@@ -124,23 +124,23 @@ class PLATFORM_EXPORT FetchContext
virtual bool shouldLoadNewResource(Resource::Type) const { return false; }
// Called when a resource load is first requested, which may not be when the
// load actually begins.
- // TODO(toyoshim): Consider to use enum. See https://crbug.com/675883.
+ enum class LoggingPolicy { SuppressLogging, Log };
Charlie Harrison 2017/02/06 19:54:16 This is much better, but I wonder if we can clarif
Yoav Weiss 2017/02/06 23:15:49 done
virtual void willStartLoadingResource(unsigned long identifier,
ResourceRequest&,
Resource::Type,
const AtomicString& fetchInitiatorName,
- bool forPreload);
+ LoggingPolicy);
virtual void didLoadResource(Resource*);
virtual void addResourceTiming(const ResourceTimingInfo&);
virtual bool allowImage(bool, const KURL&) const { return false; }
- // TODO(toyoshim): Consider to use enum. See https://crbug.com/675883.
+ enum class ReportingPolicy { SuppressReporting, Report };
virtual ResourceRequestBlockedReason canRequest(
Resource::Type,
const ResourceRequest&,
const KURL&,
const ResourceLoaderOptions&,
- bool forPreload,
+ ReportingPolicy,
FetchRequest::OriginRestriction) const {
return ResourceRequestBlockedReason::Other;
}

Powered by Google App Engine
This is Rietveld 408576698