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

Unified Diff: content/browser/renderer_host/render_message_filter.cc

Issue 8175005: When "Clear site data on exit" is checked, only pass the private mode flag to Flash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use constant Created 9 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 09589540c029ab90602e47532d8b8487501f3499..090d97a68735dbb7b71b0f8b909a08799ac27a7a 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -52,6 +52,7 @@
#include "webkit/glue/webkit_glue.h"
#include "webkit/plugins/npapi/plugin_group.h"
#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/plugins/plugin_constants.h"
#include "webkit/plugins/webplugininfo.h"
#if defined(OS_MACOSX)
@@ -191,7 +192,17 @@ class RenderMessageFilter::OpenChannelToNpapiPluginCallback
}
virtual bool OffTheRecord() OVERRIDE {
- return filter()->OffTheRecord();
+ if (filter()->OffTheRecord())
+ return true;
+ if (content::GetContentClient()->browser()->AllowSaveLocalState(context_))
+ return false;
+
+ // For now, only disallow storing data for Flash <http://crbug.com/97319>.
+ for (size_t i = 0; i < info_.mime_types.size(); ++i) {
+ if (info_.mime_types[i].mime_type == kFlashPluginSwfMimeType)
+ return true;
+ }
+ return false;
}
virtual void SetPluginInfo(const webkit::WebPluginInfo& info) OVERRIDE {
@@ -374,9 +385,7 @@ void RenderMessageFilter::OnDestruct() const {
}
bool RenderMessageFilter::OffTheRecord() const {
- return incognito_ ||
- !content::GetContentClient()->browser()->AllowSaveLocalState(
- resource_context_);
+ return incognito_;
}
void RenderMessageFilter::OnMsgCreateWindow(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698