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

Unified Diff: content/browser/plugin_content_origin_whitelist.cc

Issue 2667753005: Convert PluginContentOriginWhitelist to use the new navigation callbacks. (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/browser/plugin_content_origin_whitelist.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/plugin_content_origin_whitelist.cc
diff --git a/content/browser/plugin_content_origin_whitelist.cc b/content/browser/plugin_content_origin_whitelist.cc
index c492fe8f9342eb2675d48b372ad2732537d69615..f94ad0b1e3587687e04b19e1234f91c7209684ad 100644
--- a/content/browser/plugin_content_origin_whitelist.cc
+++ b/content/browser/plugin_content_origin_whitelist.cc
@@ -5,7 +5,7 @@
#include "content/browser/plugin_content_origin_whitelist.h"
#include "content/common/frame_messages.h"
-#include "content/public/browser/navigation_details.h"
+#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
@@ -40,13 +40,16 @@ bool PluginContentOriginWhitelist::OnMessageReceived(
return handled;
}
-void PluginContentOriginWhitelist::DidNavigateMainFrame(
- const LoadCommittedDetails& details,
- const FrameNavigateParams& params) {
- if (details.is_navigation_to_different_page()) {
- // We expect RenderFrames to clear their replicated whitelist independently.
- whitelist_.clear();
+void PluginContentOriginWhitelist::DidFinishNavigation(
+ NavigationHandle* navigation_handle) {
+ if (!navigation_handle->IsInMainFrame() ||
+ !navigation_handle->HasCommitted() ||
+ navigation_handle->IsSamePage()) {
+ return;
}
+
+ // We expect RenderFrames to clear their replicated whitelist independently.
+ whitelist_.clear();
}
void PluginContentOriginWhitelist::OnPluginContentOriginAllowed(
« no previous file with comments | « content/browser/plugin_content_origin_whitelist.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698