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

Unified Diff: components/plugins/renderer/loadable_plugin_placeholder.cc

Issue 1341563002: Plugin Power Saver: Improve origin handling esp. with OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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: components/plugins/renderer/loadable_plugin_placeholder.cc
diff --git a/components/plugins/renderer/loadable_plugin_placeholder.cc b/components/plugins/renderer/loadable_plugin_placeholder.cc
index e07b7fd3a03e8967b7ade6709784cc3bddf0eb83..339f58321de1cbabfc3b1f6fbfe51cdd10ece5d6 100644
--- a/components/plugins/renderer/loadable_plugin_placeholder.cc
+++ b/components/plugins/renderer/loadable_plugin_placeholder.cc
@@ -29,6 +29,9 @@
#include "third_party/WebKit/public/web/WebScriptSource.h"
#include "third_party/WebKit/public/web/WebSerializedScriptValue.h"
#include "third_party/WebKit/public/web/WebView.h"
+#include "url/gurl.h"
+#include "url/origin.h"
+
using base::UserMetricsAction;
using content::PluginInstanceThrottler;
using content::RenderThread;
@@ -45,7 +48,7 @@ void LoadablePluginPlaceholder::BlockForPowerSaverPoster() {
is_blocked_for_power_saver_poster_ = true;
render_frame()->RegisterPeripheralPlugin(
- GURL(GetPluginParams().url).GetOrigin(),
+ url::Origin(GURL(GetPluginParams().url)),
base::Bind(&LoadablePluginPlaceholder::MarkPluginEssential,
weak_factory_.GetWeakPtr(),
PluginInstanceThrottler::UNTHROTTLE_METHOD_BY_WHITELIST));

Powered by Google App Engine
This is Rietveld 408576698