| Index: chrome/browser/ui/browser.cc
|
| ===================================================================
|
| --- chrome/browser/ui/browser.cc (revision 147078)
|
| +++ chrome/browser/ui/browser.cc (working copy)
|
| @@ -37,7 +37,6 @@
|
| #include "chrome/browser/character_encoding.h"
|
| #include "chrome/browser/chrome_page_zoom.h"
|
| #include "chrome/browser/content_settings/host_content_settings_map.h"
|
| -#include "chrome/browser/content_settings/tab_specific_content_settings.h"
|
| #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
|
| #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h"
|
| #include "chrome/browser/debugger/devtools_toggle_action.h"
|
| @@ -853,8 +852,7 @@
|
| const std::string& protocol,
|
| const GURL& url,
|
| const string16& title,
|
| - bool user_gesture,
|
| - BrowserWindow* window) {
|
| + bool user_gesture) {
|
| TabContents* tab_contents = TabContents::FromWebContents(web_contents);
|
| if (!tab_contents || tab_contents->profile()->IsOffTheRecord())
|
| return;
|
| @@ -864,24 +862,12 @@
|
|
|
| ProtocolHandlerRegistry* registry =
|
| tab_contents->profile()->GetProtocolHandlerRegistry();
|
| - TabSpecificContentSettings* content_settings =
|
| - tab_contents->content_settings();
|
|
|
| - if (!user_gesture && window) {
|
| - content_settings->set_pending_protocol_handler(handler);
|
| - content_settings->set_previous_protocol_handler(
|
| - registry->GetHandlerFor(handler.protocol()));
|
| - window->GetLocationBar()->UpdateContentSettingsIcons();
|
| + // TODO(gbillock): Replace this policy with one that shows the content
|
| + // settings icon.
|
| + if (!user_gesture)
|
| return;
|
| - }
|
|
|
| - // Make sure content-setting icon is turned off in case the page does
|
| - // ungestured and gestured RPH calls.
|
| - if (window) {
|
| - content_settings->ClearPendingProtocolHandler();
|
| - window->GetLocationBar()->UpdateContentSettingsIcons();
|
| - }
|
| -
|
| if (!registry->SilentlyHandleRegisterHandlerRequest(handler)) {
|
| content::RecordAction(
|
| UserMetricsAction("RegisterProtocolHandler.InfoBar_Shown"));
|
| @@ -1602,7 +1588,7 @@
|
| const string16& title,
|
| bool user_gesture) {
|
| RegisterProtocolHandlerHelper(
|
| - web_contents, protocol, url, title, user_gesture, window());
|
| + web_contents, protocol, url, title, user_gesture);
|
| }
|
|
|
| void Browser::RegisterIntentHandler(
|
|
|