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

Unified Diff: content/child/web_url_request_util.cc

Issue 1858533002: Introduce WebCachePolicy to merge cache policy enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review, minor fixes Created 4 years, 9 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: content/child/web_url_request_util.cc
diff --git a/content/child/web_url_request_util.cc b/content/child/web_url_request_util.cc
index a940ac5f5f76fd1275b14e2c7635c98342aa049f..336a34c24519dda335d66123fff55339566285b0 100644
--- a/content/child/web_url_request_util.cc
+++ b/content/child/web_url_request_util.cc
@@ -14,12 +14,14 @@
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "third_party/WebKit/public/platform/FilePathConversion.h"
+#include "third_party/WebKit/public/platform/WebCachePolicy.h"
#include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
+using blink::WebCachePolicy;
using blink::WebHTTPBody;
using blink::WebString;
using blink::WebURLRequest;
@@ -198,19 +200,19 @@ int GetLoadFlagsForWebURLRequest(const blink::WebURLRequest& request) {
int load_flags = net::LOAD_NORMAL;
GURL url = request.url();
switch (request.getCachePolicy()) {
- case WebURLRequest::ValidatingCacheData:
+ case WebCachePolicy::ValidatingCacheData:
load_flags |= net::LOAD_VALIDATE_CACHE;
break;
- case WebURLRequest::BypassingCache:
+ case WebCachePolicy::BypassingCache:
load_flags |= net::LOAD_BYPASS_CACHE;
break;
- case WebURLRequest::ReturnCacheDataElseLoad:
+ case WebCachePolicy::ReturnCacheDataElseLoad:
load_flags |= net::LOAD_PREFERRING_CACHE;
break;
- case WebURLRequest::ReturnCacheDataDontLoad:
+ case WebCachePolicy::ReturnCacheDataDontLoad:
load_flags |= net::LOAD_ONLY_FROM_CACHE;
break;
- case WebURLRequest::UseProtocolCachePolicy:
+ case WebCachePolicy::UseProtocolCachePolicy:
break;
default:
NOTREACHED();

Powered by Google App Engine
This is Rietveld 408576698