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

Side by Side Diff: content/browser/renderer_host/render_message_filter.cc

Issue 7230052: Make kClearSiteDataOnExit work correctly for Flash in multi-profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/render_message_filter.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_message_filter.h" 5 #include "content/browser/renderer_host/render_message_filter.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 OpenChannelToNpapiPluginCallback(RenderMessageFilter* filter, 118 OpenChannelToNpapiPluginCallback(RenderMessageFilter* filter,
119 IPC::Message* reply_msg) 119 IPC::Message* reply_msg)
120 : RenderMessageCompletionCallback(filter, reply_msg) { 120 : RenderMessageCompletionCallback(filter, reply_msg) {
121 } 121 }
122 122
123 virtual int ID() { 123 virtual int ID() {
124 return filter()->render_process_id(); 124 return filter()->render_process_id();
125 } 125 }
126 126
127 virtual bool OffTheRecord() { 127 virtual bool OffTheRecord() {
128 return filter()->incognito(); 128 return filter()->OffTheRecord();
129 } 129 }
130 130
131 virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info) { 131 virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info) {
132 info_ = info; 132 info_ = info;
133 } 133 }
134 134
135 virtual void OnChannelOpened(const IPC::ChannelHandle& handle) { 135 virtual void OnChannelOpened(const IPC::ChannelHandle& handle) {
136 WriteReplyAndDeleteThis(handle); 136 WriteReplyAndDeleteThis(handle);
137 } 137 }
138 138
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 IPC_MESSAGE_UNHANDLED(handled = false) 371 IPC_MESSAGE_UNHANDLED(handled = false)
372 IPC_END_MESSAGE_MAP_EX() 372 IPC_END_MESSAGE_MAP_EX()
373 373
374 return handled; 374 return handled;
375 } 375 }
376 376
377 void RenderMessageFilter::OnDestruct() const { 377 void RenderMessageFilter::OnDestruct() const {
378 BrowserThread::DeleteOnIOThread::Destruct(this); 378 BrowserThread::DeleteOnIOThread::Destruct(this);
379 } 379 }
380 380
381 bool RenderMessageFilter::OffTheRecord() const {
382 return incognito_ ||
383 !content::GetContentClient()->browser()->AllowSaveLocalState(
384 resource_context_);
385 }
386
381 void RenderMessageFilter::OnMsgCreateWindow( 387 void RenderMessageFilter::OnMsgCreateWindow(
382 const ViewHostMsg_CreateWindow_Params& params, 388 const ViewHostMsg_CreateWindow_Params& params,
383 int* route_id, int64* cloned_session_storage_namespace_id) { 389 int* route_id, int64* cloned_session_storage_namespace_id) {
384 if (!content::GetContentClient()->browser()->CanCreateWindow( 390 if (!content::GetContentClient()->browser()->CanCreateWindow(
385 params.opener_url, params.window_container_type, resource_context_)) { 391 params.opener_url, params.window_container_type, resource_context_)) {
386 *route_id = MSG_ROUTING_NONE; 392 *route_id = MSG_ROUTING_NONE;
387 return; 393 return;
388 } 394 }
389 395
390 *cloned_session_storage_namespace_id = 396 *cloned_session_storage_namespace_id =
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 file_for_transit = base::FileDescriptor(file, true); 858 file_for_transit = base::FileDescriptor(file, true);
853 #endif 859 #endif
854 } 860 }
855 861
856 IPC::Message* reply = new ViewMsg_AsyncOpenFile_ACK( 862 IPC::Message* reply = new ViewMsg_AsyncOpenFile_ACK(
857 routing_id, error_code, file_for_transit, message_id); 863 routing_id, error_code, file_for_transit, message_id);
858 BrowserThread::PostTask( 864 BrowserThread::PostTask(
859 BrowserThread::IO, FROM_HERE, NewRunnableMethod( 865 BrowserThread::IO, FROM_HERE, NewRunnableMethod(
860 this, &RenderMessageFilter::Send, reply)); 866 this, &RenderMessageFilter::Send, reply));
861 } 867 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698