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

Unified Diff: chrome/renderer/chrome_content_renderer_client.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, 8 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 | « no previous file | chrome/renderer/net/net_error_helper.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 426578977b830fb2221dc6e2690b8413206c0081..bee495085f3ec23b12579034ec58910e76e57dc7 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -91,6 +91,7 @@
#include "ppapi/c/private/ppb_pdf.h"
#include "ppapi/shared_impl/ppapi_switches.h"
#include "third_party/WebKit/public/platform/URLConversion.h"
+#include "third_party/WebKit/public/platform/WebCachePolicy.h"
#include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
@@ -159,9 +160,11 @@ using autofill::PasswordGenerationAgent;
using base::ASCIIToUTF16;
using base::UserMetricsAction;
using blink::WebCache;
+using blink::WebCachePolicy;
using blink::WebConsoleMessage;
using blink::WebDataSource;
using blink::WebDocument;
+using blink::WebFrame;
using blink::WebLocalFrame;
using blink::WebPlugin;
using blink::WebPluginParams;
@@ -551,7 +554,7 @@ SkBitmap* ChromeContentRendererClient::GetSadWebViewBitmap() {
bool ChromeContentRendererClient::OverrideCreatePlugin(
content::RenderFrame* render_frame,
- blink::WebLocalFrame* frame,
+ WebLocalFrame* frame,
const WebPluginParams& params,
WebPlugin** plugin) {
std::string orig_mime_type = params.mimeType.utf8();
@@ -624,7 +627,7 @@ void ChromeContentRendererClient::DeferMediaLoad(
#if defined(ENABLE_PLUGINS)
WebPlugin* ChromeContentRendererClient::CreatePlugin(
content::RenderFrame* render_frame,
- blink::WebLocalFrame* frame,
+ WebLocalFrame* frame,
const WebPluginParams& original_params,
const ChromeViewHostMsg_GetPluginInfo_Output& output) {
const WebPluginInfo& info = output.plugin;
@@ -1046,8 +1049,8 @@ bool ChromeContentRendererClient::ShouldSuppressErrorPage(
void ChromeContentRendererClient::GetNavigationErrorStrings(
content::RenderFrame* render_frame,
- const blink::WebURLRequest& failed_request,
- const blink::WebURLError& error,
+ const WebURLRequest& failed_request,
+ const WebURLError& error,
std::string* error_html,
base::string16* error_description) {
const GURL failed_url = error.unreachableURL;
@@ -1055,7 +1058,7 @@ void ChromeContentRendererClient::GetNavigationErrorStrings(
bool is_post = base::EqualsASCII(
base::StringPiece16(failed_request.httpMethod()), "POST");
bool is_ignoring_cache =
- failed_request.getCachePolicy() == blink::WebURLRequest::BypassingCache;
+ failed_request.getCachePolicy() == WebCachePolicy::BypassingCache;
if (error_html) {
NetErrorHelper::Get(render_frame)
->GetErrorHTML(error, is_post, is_ignoring_cache, error_html);
@@ -1092,7 +1095,7 @@ bool ChromeContentRendererClient::AllowPopup() {
#endif
}
-bool ChromeContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
+bool ChromeContentRendererClient::ShouldFork(WebLocalFrame* frame,
const GURL& url,
const std::string& http_method,
bool is_initial_navigation,
@@ -1140,13 +1143,13 @@ bool ChromeContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
}
bool ChromeContentRendererClient::WillSendRequest(
- blink::WebFrame* frame,
+ WebFrame* frame,
ui::PageTransition transition_type,
const GURL& url,
const GURL& first_party_for_cookies,
GURL* new_url) {
- // Check whether the request should be allowed. If not allowed, we reset the
hiroshige 2016/04/07 06:30:32 nit: spaces here shouldn't be removed?
Takashi Toyoshima 2016/04/08 04:41:48 Oh, thanks! It seems "git cl format" was confused.
- // URL to something invalid to prevent the request and cause an error.
+// Check whether the request should be allowed. If not allowed, we reset the
+// URL to something invalid to prevent the request and cause an error.
#if defined(ENABLE_EXTENSIONS)
if (ChromeExtensionsRendererClient::GetInstance()->WillSendRequest(
frame, transition_type, url, new_url)) {
@@ -1294,7 +1297,7 @@ bool ChromeContentRendererClient::ShouldGatherSiteIsolationStats() const {
blink::WebWorkerContentSettingsClientProxy*
ChromeContentRendererClient::CreateWorkerContentSettingsClientProxy(
content::RenderFrame* render_frame,
- blink::WebFrame* frame) {
+ WebFrame* frame) {
return new WorkerContentSettingsClientProxy(render_frame, frame);
}
@@ -1377,7 +1380,7 @@ ChromeContentRendererClient::CreateAppBannerClient(
}
void ChromeContentRendererClient::AddImageContextMenuProperties(
- const blink::WebURLResponse& response,
+ const WebURLResponse& response,
std::map<std::string, std::string>* properties) {
DCHECK(properties);
WebString header_key(ASCIIToUTF16(
« no previous file with comments | « no previous file | chrome/renderer/net/net_error_helper.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698