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

Side by Side Diff: content/browser/plugin_data_remover_impl.cc

Issue 10310021: Fix the PpapiPluginProcessHost::BrokerClient implementation in PluginDataRemoverImpl::Context. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « no previous file | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/plugin_data_remover_impl.h" 5 #include "content/browser/plugin_data_remover_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/sequenced_task_runner_helpers.h" 9 #include "base/sequenced_task_runner_helpers.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 virtual void OnError() OVERRIDE { 152 virtual void OnError() OVERRIDE {
153 LOG(ERROR) << "Couldn't open plugin channel"; 153 LOG(ERROR) << "Couldn't open plugin channel";
154 SignalDone(); 154 SignalDone();
155 // Balancing the AddRef call. 155 // Balancing the AddRef call.
156 Release(); 156 Release();
157 } 157 }
158 158
159 // PpapiPluginProcessHost::BrokerClient implementation. 159 // PpapiPluginProcessHost::BrokerClient implementation.
160 virtual void GetPpapiChannelInfo(base::ProcessHandle* renderer_handle, 160 virtual void GetPpapiChannelInfo(base::ProcessHandle* renderer_handle,
161 int* renderer_id) OVERRIDE { 161 int* renderer_id) OVERRIDE {
162 *renderer_handle = base::kNullProcessHandle;
162 *renderer_id = 0; 163 *renderer_id = 0;
163 } 164 }
164 165
165 virtual void OnPpapiChannelOpened( 166 virtual void OnPpapiChannelOpened(
166 base::ProcessHandle plugin_process_handle, 167 base::ProcessHandle /* plugin_process_handle */,
167 const IPC::ChannelHandle& channel_handle, 168 const IPC::ChannelHandle& channel_handle,
168 int /* child_id */) OVERRIDE { 169 int /* child_id */) OVERRIDE {
169 if (plugin_process_handle != base::kNullProcessHandle) 170 if (!channel_handle.name.empty())
170 ConnectToChannel(channel_handle, true); 171 ConnectToChannel(channel_handle, true);
171 172
172 // Balancing the AddRef call. 173 // Balancing the AddRef call.
173 Release(); 174 Release();
174 } 175 }
175 176
176 // IPC::Channel::Listener methods. 177 // IPC::Channel::Listener methods.
177 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { 178 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
178 IPC_BEGIN_MESSAGE_MAP(Context, message) 179 IPC_BEGIN_MESSAGE_MAP(Context, message)
179 IPC_MESSAGE_HANDLER(PluginHostMsg_ClearSiteDataResult, 180 IPC_MESSAGE_HANDLER(PluginHostMsg_ClearSiteDataResult,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 298
298 base::WaitableEvent* PluginDataRemoverImpl::StartRemoving( 299 base::WaitableEvent* PluginDataRemoverImpl::StartRemoving(
299 base::Time begin_time) { 300 base::Time begin_time) {
300 DCHECK(!context_.get()); 301 DCHECK(!context_.get());
301 context_ = new Context(begin_time, browser_context_); 302 context_ = new Context(begin_time, browser_context_);
302 context_->Init(mime_type_); 303 context_->Init(mime_type_);
303 return context_->event(); 304 return context_->event();
304 } 305 }
305 306
306 } // namespace content 307 } // namespace content
OLDNEW
« 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