| OLD | NEW |
| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 : ContentSettingTitleLinkAndCustomModel(delegate, | 989 : ContentSettingTitleLinkAndCustomModel(delegate, |
| 990 web_contents, | 990 web_contents, |
| 991 profile, | 991 profile, |
| 992 CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) { | 992 CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) { |
| 993 content_settings::RecordMixedScriptAction( | 993 content_settings::RecordMixedScriptAction( |
| 994 content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_BUBBLE); | 994 content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_BUBBLE); |
| 995 set_custom_link_enabled(true); | 995 set_custom_link_enabled(true); |
| 996 } | 996 } |
| 997 | 997 |
| 998 void ContentSettingMixedScriptBubbleModel::OnCustomLinkClicked() { | 998 void ContentSettingMixedScriptBubbleModel::OnCustomLinkClicked() { |
| 999 content_settings::RecordMixedScriptAction( | |
| 1000 content_settings::MIXED_SCRIPT_ACTION_CLICKED_ALLOW); | |
| 1001 DCHECK(web_contents()); | 999 DCHECK(web_contents()); |
| 1002 web_contents()->SendToAllFrames( | 1000 web_contents()->SendToAllFrames( |
| 1003 new ChromeViewMsg_SetAllowRunningInsecureContent(MSG_ROUTING_NONE, true)); | 1001 new ChromeViewMsg_SetAllowRunningInsecureContent(MSG_ROUTING_NONE, true)); |
| 1004 web_contents()->GetMainFrame()->Send(new ChromeViewMsg_ReloadFrame( | 1002 web_contents()->GetMainFrame()->Send(new ChromeViewMsg_ReloadFrame( |
| 1005 web_contents()->GetMainFrame()->GetRoutingID())); | 1003 web_contents()->GetMainFrame()->GetRoutingID())); |
| 1004 |
| 1005 content_settings::RecordMixedScriptActionWithRAPPOR( |
| 1006 content_settings::MIXED_SCRIPT_ACTION_CLICKED_ALLOW, |
| 1007 web_contents()->GetLastCommittedURL()); |
| 1006 } | 1008 } |
| 1007 | 1009 |
| 1008 ContentSettingRPHBubbleModel::ContentSettingRPHBubbleModel( | 1010 ContentSettingRPHBubbleModel::ContentSettingRPHBubbleModel( |
| 1009 Delegate* delegate, | 1011 Delegate* delegate, |
| 1010 WebContents* web_contents, | 1012 WebContents* web_contents, |
| 1011 Profile* profile, | 1013 Profile* profile, |
| 1012 ProtocolHandlerRegistry* registry) | 1014 ProtocolHandlerRegistry* registry) |
| 1013 : ContentSettingTitleAndLinkModel(delegate, | 1015 : ContentSettingTitleAndLinkModel(delegate, |
| 1014 web_contents, | 1016 web_contents, |
| 1015 profile, | 1017 profile, |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) { | 1307 if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) { |
| 1306 DCHECK_EQ(web_contents_, | 1308 DCHECK_EQ(web_contents_, |
| 1307 content::Source<WebContents>(source).ptr()); | 1309 content::Source<WebContents>(source).ptr()); |
| 1308 web_contents_ = NULL; | 1310 web_contents_ = NULL; |
| 1309 } else { | 1311 } else { |
| 1310 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); | 1312 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); |
| 1311 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr()); | 1313 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr()); |
| 1312 profile_ = NULL; | 1314 profile_ = NULL; |
| 1313 } | 1315 } |
| 1314 } | 1316 } |
| OLD | NEW |