| Index: chrome/browser/ui/cocoa/external_protocol_dialog.mm
|
| diff --git a/chrome/browser/ui/cocoa/external_protocol_dialog.mm b/chrome/browser/ui/cocoa/external_protocol_dialog.mm
|
| index 73781e0fd61e046eb0e25fbd60b2d7498d690f44..f7ca621b301ec31ac704cf3ec95ad3c38484fcdc 100644
|
| --- a/chrome/browser/ui/cocoa/external_protocol_dialog.mm
|
| +++ b/chrome/browser/ui/cocoa/external_protocol_dialog.mm
|
| @@ -7,6 +7,7 @@
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/metrics/histogram_macros.h"
|
| #include "chrome/browser/external_protocol/external_protocol_handler.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/shell_integration.h"
|
| #include "chrome/browser/tab_contents/tab_util.h"
|
| #include "chrome/grit/chromium_strings.h"
|
| @@ -108,7 +109,12 @@ void ExternalProtocolHandler::RunExternalProtocolDialog(
|
|
|
| // Set the "don't warn me again" info.
|
| if ([[alert_ suppressionButton] state] == NSOnState) {
|
| - ExternalProtocolHandler::SetBlockState(url_.scheme(), blockState);
|
| + content::WebContents* web_contents =
|
| + tab_util::GetWebContentsByID(render_process_host_id_, routing_id_);
|
| + Profile* profile =
|
| + Profile::FromBrowserContext(web_contents->GetBrowserContext());
|
| +
|
| + ExternalProtocolHandler::SetBlockState(url_.scheme(), blockState, profile);
|
| ExternalProtocolHandler::RecordMetrics(true);
|
| } else {
|
| ExternalProtocolHandler::RecordMetrics(false);
|
|
|