Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm

Issue 2660333004: Revert of Migrate external protocol prefs from local state to profiles (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/ui/external_protocol_dialog_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm b/chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm
index 6951e76b616aa8c6ee0632f4ff03f1e7fdcdf762..a53e0652846dca5870726db36da295577c14b9e1 100644
--- a/chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/external_protocol_dialog_cocoa.mm
@@ -7,7 +7,6 @@
#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"
@@ -95,15 +94,9 @@
NOTREACHED();
}
- content::WebContents* web_contents =
- tab_util::GetWebContentsByID(render_process_host_id_, routing_id_);
-
// Set the "don't warn me again" info.
if ([[alert_ suppressionButton] state] == NSOnState) {
- Profile* profile =
- Profile::FromBrowserContext(web_contents->GetBrowserContext());
-
- ExternalProtocolHandler::SetBlockState(url_.scheme(), blockState, profile);
+ ExternalProtocolHandler::SetBlockState(url_.scheme(), blockState);
ExternalProtocolHandler::RecordMetrics(true);
} else {
ExternalProtocolHandler::RecordMetrics(false);
@@ -113,6 +106,9 @@
UMA_HISTOGRAM_LONG_TIMES("clickjacking.launch_url",
base::Time::Now() - creation_time_);
+ content::WebContents* web_contents =
+ tab_util::GetWebContentsByID(render_process_host_id_, routing_id_);
+
ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url_, web_contents);
}
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/ui/external_protocol_dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698