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

Side by Side Diff: chrome/browser/ui/external_protocol_dialog_delegate.cc

Issue 2623033006: [Re-landing] Migrate external protocol prefs from local state to profiles (Closed)
Patch Set: a 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/external_protocol_dialog_delegate.h" 5 #include "chrome/browser/ui/external_protocol_dialog_delegate.h"
6 6
7 #include "chrome/browser/external_protocol/external_protocol_handler.h" 7 #include "chrome/browser/external_protocol/external_protocol_handler.h"
8 #include "chrome/browser/tab_contents/tab_util.h" 8 #include "chrome/browser/tab_contents/tab_util.h"
9 #include "chrome/grit/chromium_strings.h" 9 #include "chrome/grit/chromium_strings.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 content::WebContents* web_contents = tab_util::GetWebContentsByID( 69 content::WebContents* web_contents = tab_util::GetWebContentsByID(
70 render_process_host_id_, render_view_routing_id_); 70 render_process_host_id_, render_view_routing_id_);
71 71
72 ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url, web_contents); 72 ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url, web_contents);
73 } 73 }
74 74
75 void ExternalProtocolDialogDelegate::DoCancel(const GURL& url, 75 void ExternalProtocolDialogDelegate::DoCancel(const GURL& url,
76 bool dont_block) const { 76 bool dont_block) const {
77 if (dont_block) { 77 if (dont_block) {
78 content::WebContents* web_contents = tab_util::GetWebContentsByID(
79 render_process_host_id_, render_view_routing_id_);
80 Profile* profile =
81 Profile::FromBrowserContext(web_contents->GetBrowserContext());
82
78 ExternalProtocolHandler::SetBlockState(url.scheme(), 83 ExternalProtocolHandler::SetBlockState(url.scheme(),
79 ExternalProtocolHandler::BLOCK); 84 ExternalProtocolHandler::BLOCK,
85 profile);
80 } 86 }
81 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698