| Index: chrome/browser/ui/browser.cc
 | 
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
 | 
| index 6782c0a371f64e858cea45a4531b5c1724089d9f..b6f856c53fb2a253890a0cf38d90314452b072c5 100644
 | 
| --- a/chrome/browser/ui/browser.cc
 | 
| +++ b/chrome/browser/ui/browser.cc
 | 
| @@ -64,6 +64,7 @@
 | 
|  #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h"
 | 
|  #include "chrome/browser/intents/web_intents_util.h"
 | 
|  #include "chrome/browser/lifetime/application_lifetime.h"
 | 
| +#include "chrome/browser/media/media_stream_devices_controller.h"
 | 
|  #include "chrome/browser/net/url_fixer_upper.h"
 | 
|  #include "chrome/browser/notifications/notification_ui_manager.h"
 | 
|  #include "chrome/browser/platform_util.h"
 | 
| @@ -3699,20 +3700,27 @@ void Browser::RequestMediaAccessPermission(
 | 
|    TabContents* tab = TabContents::FromWebContents(web_contents);
 | 
|    DCHECK(tab);
 | 
|  
 | 
| -  InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper();
 | 
| -  InfoBarDelegate* old_infobar = NULL;
 | 
| -  for (size_t i = 0; i < infobar_helper->infobar_count() && !old_infobar; ++i) {
 | 
| -    old_infobar =
 | 
| -        infobar_helper->GetInfoBarDelegateAt(i)->AsMediaStreamInfoBarDelegate();
 | 
| -  }
 | 
| +  scoped_ptr<MediaStreamDevicesController>
 | 
| +      controller(new MediaStreamDevicesController(tab->profile(),
 | 
| +                                                  request,
 | 
| +                                                  callback));
 | 
| +  if (!controller->DismissInfoBarAndTakeActionOnSettings()) {
 | 
| +    InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper();
 | 
| +    InfoBarDelegate* old_infobar = NULL;
 | 
| +    for (size_t i = 0; i < infobar_helper->infobar_count(); ++i) {
 | 
| +      old_infobar = infobar_helper->GetInfoBarDelegateAt(i)->
 | 
| +          AsMediaStreamInfoBarDelegate();
 | 
| +      if (old_infobar)
 | 
| +        break;
 | 
| +    }
 | 
|  
 | 
| -  InfoBarDelegate* infobar = new MediaStreamInfoBarDelegate(infobar_helper,
 | 
| -                                                            request,
 | 
| -                                                            callback);
 | 
| -  if (old_infobar)
 | 
| -    infobar_helper->ReplaceInfoBar(old_infobar, infobar);
 | 
| -  else
 | 
| -    infobar_helper->AddInfoBar(infobar);
 | 
| +    InfoBarDelegate* infobar =
 | 
| +        new MediaStreamInfoBarDelegate(infobar_helper, controller.release());
 | 
| +    if (old_infobar)
 | 
| +      infobar_helper->ReplaceInfoBar(old_infobar, infobar);
 | 
| +    else
 | 
| +      infobar_helper->AddInfoBar(infobar);
 | 
| +  }
 | 
|  }
 | 
|  
 | 
|  ///////////////////////////////////////////////////////////////////////////////
 | 
| 
 |