| Index: content/browser/web_contents/web_contents_impl.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
| index 0ef81c6f8e121997fd50d10168b1af10b2f250c9..3c67f27c005191ee5cebfe887ce7c8d3749c888e 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -2306,19 +2306,15 @@ void WebContentsImpl::OnRequestPpapiBrokerPermission(
|
| int request_id,
|
| const GURL& url,
|
| const FilePath& plugin_path) {
|
| - base::Callback<void(bool)> callback =
|
| - base::Bind(&WebContentsImpl::OnPpapiBrokerPermissionResult,
|
| - base::Unretained(this), request_id);
|
| - ObserverListBase<WebContentsObserver>::Iterator it(observers_);
|
| - WebContentsObserver* observer;
|
| - while ((observer = it.GetNext()) != NULL) {
|
| - if (observer->RequestPpapiBrokerPermission(this, url, plugin_path,
|
| - callback))
|
| - return;
|
| + if (!delegate_) {
|
| + OnPpapiBrokerPermissionResult(request_id, false);
|
| + return;
|
| }
|
|
|
| - // Fall back to allowing the request if no observer handled it.
|
| - OnPpapiBrokerPermissionResult(request_id, true);
|
| + delegate_->RequestPpapiBrokerPermission(
|
| + this, url, plugin_path,
|
| + base::Bind(&WebContentsImpl::OnPpapiBrokerPermissionResult,
|
| + base::Unretained(this), request_id));
|
| }
|
|
|
| void WebContentsImpl::OnPpapiBrokerPermissionResult(int request_id,
|
|
|