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

Side by Side Diff: content/plugin/plugin_channel.cc

Issue 252743007: Remove kLogPluginMessages flag as part of flag cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « content/plugin/plugin_channel.h ('k') | content/public/common/content_switches.h » ('j') | 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/plugin/plugin_channel.h" 5 #include "content/plugin/plugin_channel.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/process/process_handle.h" 9 #include "base/process/process_handle.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 return true; 238 return true;
239 } 239 }
240 240
241 PluginChannel::PluginChannel() 241 PluginChannel::PluginChannel()
242 : renderer_id_(-1), 242 : renderer_id_(-1),
243 in_send_(0), 243 in_send_(0),
244 incognito_(false), 244 incognito_(false),
245 filter_(new MessageFilter()), 245 filter_(new MessageFilter()),
246 npp_(new struct _NPP) { 246 npp_(new struct _NPP) {
247 set_send_unblocking_only_during_unblock_dispatch(); 247 set_send_unblocking_only_during_unblock_dispatch();
248 const CommandLine* command_line = CommandLine::ForCurrentProcess();
249 log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages);
250 248
251 // Register |npp_| as the default owner for any object we receive via IPC, 249 // Register |npp_| as the default owner for any object we receive via IPC,
252 // and register it with WebBindings as a valid owner. 250 // and register it with WebBindings as a valid owner.
253 SetDefaultNPObjectOwner(npp_.get()); 251 SetDefaultNPObjectOwner(npp_.get());
254 WebBindings::registerObjectOwner(npp_.get()); 252 WebBindings::registerObjectOwner(npp_.get());
255 } 253 }
256 254
257 bool PluginChannel::OnControlMessageReceived(const IPC::Message& msg) { 255 bool PluginChannel::OnControlMessageReceived(const IPC::Message& msg) {
258 bool handled = true; 256 bool handled = true;
259 IPC_BEGIN_MESSAGE_MAP(PluginChannel, msg) 257 IPC_BEGIN_MESSAGE_MAP(PluginChannel, msg)
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 void PluginChannel::OnDidAbortLoading(int render_view_id) { 337 void PluginChannel::OnDidAbortLoading(int render_view_id) {
340 for (size_t i = 0; i < plugin_stubs_.size(); ++i) { 338 for (size_t i = 0; i < plugin_stubs_.size(); ++i) {
341 if (plugin_stubs_[i]->webplugin()->host_render_view_routing_id() == 339 if (plugin_stubs_[i]->webplugin()->host_render_view_routing_id() ==
342 render_view_id) { 340 render_view_id) {
343 plugin_stubs_[i]->delegate()->instance()->CloseStreams(); 341 plugin_stubs_[i]->delegate()->instance()->CloseStreams();
344 } 342 }
345 } 343 }
346 } 344 }
347 345
348 } // namespace content 346 } // namespace content
OLDNEW
« no previous file with comments | « content/plugin/plugin_channel.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698