| Index: content/renderer/webplugin_delegate_proxy.cc
|
| diff --git a/content/renderer/webplugin_delegate_proxy.cc b/content/renderer/webplugin_delegate_proxy.cc
|
| index 8772324dce5fa12b3e18bcb2a393e468d6f59987..55f2cd54e78558d609d1c56b0bfc5d5dac897dff 100644
|
| --- a/content/renderer/webplugin_delegate_proxy.cc
|
| +++ b/content/renderer/webplugin_delegate_proxy.cc
|
| @@ -73,6 +73,28 @@ using WebKit::WebInputEvent;
|
| using WebKit::WebString;
|
| using WebKit::WebView;
|
|
|
| +namespace {
|
| +
|
| +class ScopedLogLevel {
|
| + public:
|
| + ScopedLogLevel(int level);
|
| + ~ScopedLogLevel();
|
| +
|
| + private:
|
| + int old_level_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ScopedLogLevel);
|
| +};
|
| +
|
| +ScopedLogLevel::ScopedLogLevel(int level)
|
| + : old_level_(logging::GetMinLogLevel()) {
|
| + logging::SetMinLogLevel(level);
|
| +}
|
| +
|
| +ScopedLogLevel::~ScopedLogLevel() {
|
| + logging::SetMinLogLevel(old_level_);
|
| +}
|
| +
|
| // Proxy for WebPluginResourceClient. The object owns itself after creation,
|
| // deleting itself after its callback has been called.
|
| class ResourceClientProxy : public webkit::npapi::WebPluginResourceClient {
|
| @@ -169,6 +191,8 @@ class ResourceClientProxy : public webkit::npapi::WebPluginResourceClient {
|
| bool multibyte_response_expected_;
|
| };
|
|
|
| +} // namespace
|
| +
|
| WebPluginDelegateProxy::WebPluginDelegateProxy(
|
| const std::string& mime_type,
|
| const base::WeakPtr<RenderViewImpl>& render_view)
|
| @@ -319,11 +343,15 @@ bool WebPluginDelegateProxy::Initialize(
|
| #endif
|
|
|
| int instance_id;
|
| - bool result = channel_host->Send(new PluginMsg_CreateInstance(
|
| - mime_type_, &instance_id));
|
| - if (!result) {
|
| - LOG(ERROR) << "Couldn't send PluginMsg_CreateInstance";
|
| - return false;
|
| + {
|
| + // TODO(bauerb): Debugging for http://crbug.com/141055.
|
| + ScopedLogLevel log_level(-2); // Equivalent to --v=2
|
| + bool result = channel_host->Send(new PluginMsg_CreateInstance(
|
| + mime_type_, &instance_id));
|
| + if (!result) {
|
| + LOG(ERROR) << "Couldn't send PluginMsg_CreateInstance";
|
| + return false;
|
| + }
|
| }
|
|
|
| channel_host_ = channel_host;
|
| @@ -356,7 +384,7 @@ bool WebPluginDelegateProxy::Initialize(
|
|
|
| plugin_ = plugin;
|
|
|
| - result = false;
|
| + bool result = false;
|
| IPC::Message* msg = new PluginMsg_Init(instance_id_, params, &result);
|
| Send(msg);
|
|
|
|
|