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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 1905033002: PlzNavigate: Move navigation-level mixed content checks to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-security-message
Patch Set: Minor changes from nasko@'s comments Created 3 years, 10 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/content_settings/content_setting_bubble_model.h" 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/chrome_notification_types.h" 15 #include "chrome/browser/chrome_notification_types.h"
16 #include "chrome/browser/content_settings/chrome_content_settings_utils.h" 16 #include "chrome/browser/content_settings/chrome_content_settings_utils.h"
17 #include "chrome/browser/content_settings/cookie_settings_factory.h" 17 #include "chrome/browser/content_settings/cookie_settings_factory.h"
18 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 18 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
19 #include "chrome/browser/content_settings/mixed_content_settings_tab_helper.h"
20 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 21 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
20 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" 22 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
21 #include "chrome/browser/infobars/infobar_service.h" 23 #include "chrome/browser/infobars/infobar_service.h"
22 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" 24 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
23 #include "chrome/browser/permissions/permission_uma_util.h" 25 #include "chrome/browser/permissions/permission_uma_util.h"
24 #include "chrome/browser/permissions/permission_util.h" 26 #include "chrome/browser/permissions/permission_util.h"
25 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" 27 #include "chrome/browser/plugins/chrome_plugin_service_filter.h"
26 #include "chrome/browser/plugins/plugin_utils.h" 28 #include "chrome/browser/plugins/plugin_utils.h"
27 #include "chrome/browser/profiles/profile.h" 29 #include "chrome/browser/profiles/profile.h"
28 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 30 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 content_settings::RecordMixedScriptAction( 1055 content_settings::RecordMixedScriptAction(
1054 content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_BUBBLE); 1056 content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_BUBBLE);
1055 set_custom_link_enabled(true); 1057 set_custom_link_enabled(true);
1056 } 1058 }
1057 1059
1058 void ContentSettingMixedScriptBubbleModel::OnCustomLinkClicked() { 1060 void ContentSettingMixedScriptBubbleModel::OnCustomLinkClicked() {
1059 DCHECK(rappor_service()); 1061 DCHECK(rappor_service());
1060 if (!web_contents()) 1062 if (!web_contents())
1061 return; 1063 return;
1062 1064
1065 MixedContentSettingsTabHelper* mixed_content_settings =
1066 MixedContentSettingsTabHelper::FromWebContents(web_contents());
1067 if (mixed_content_settings) {
1068 // Update browser side settings to allow active mixed content.
1069 mixed_content_settings->AllowRunningOfInsecureContent();
1070 }
1071
1072 // Update renderer side settings to allow active mixed content.
1063 web_contents()->ForEachFrame(base::Bind(&::SetAllowRunningInsecureContent)); 1073 web_contents()->ForEachFrame(base::Bind(&::SetAllowRunningInsecureContent));
1064 1074
1065 content_settings::RecordMixedScriptAction( 1075 content_settings::RecordMixedScriptAction(
1066 content_settings::MIXED_SCRIPT_ACTION_CLICKED_ALLOW); 1076 content_settings::MIXED_SCRIPT_ACTION_CLICKED_ALLOW);
1067 1077
1068 rappor::SampleDomainAndRegistryFromGURL( 1078 rappor::SampleDomainAndRegistryFromGURL(
1069 rappor_service(), "ContentSettings.MixedScript.UserClickedAllow", 1079 rappor_service(), "ContentSettings.MixedScript.UserClickedAllow",
1070 web_contents()->GetLastCommittedURL()); 1080 web_contents()->GetLastCommittedURL());
1071 } 1081 }
1072 1082
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 ContentSettingMediaStreamBubbleModel* 1474 ContentSettingMediaStreamBubbleModel*
1465 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { 1475 ContentSettingBubbleModel::AsMediaStreamBubbleModel() {
1466 // In general, bubble models might not inherit from the media bubble model. 1476 // In general, bubble models might not inherit from the media bubble model.
1467 return nullptr; 1477 return nullptr;
1468 } 1478 }
1469 1479
1470 ContentSettingSubresourceFilterBubbleModel* 1480 ContentSettingSubresourceFilterBubbleModel*
1471 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { 1481 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() {
1472 return nullptr; 1482 return nullptr;
1473 } 1483 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698