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

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

Issue 659573003: Log mixed script shield events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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) 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/browser_content_setting_bubble_model_delegate.h" 5 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h"
6 6
7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
7 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_dialogs.h" 10 #include "chrome/browser/ui/browser_dialogs.h"
9 #include "chrome/browser/ui/browser_tabstrip.h" 11 #include "chrome/browser/ui/browser_tabstrip.h"
10 #include "chrome/browser/ui/chrome_pages.h" 12 #include "chrome/browser/ui/chrome_pages.h"
11 #include "chrome/common/url_constants.h" 13 #include "chrome/common/url_constants.h"
12 #include "components/google/core/browser/google_util.h" 14 #include "components/google/core/browser/google_util.h"
13 15
14 // The URL for when the user clicks "learn more" on the mixed scripting page 16 // The URL for when the user clicks "learn more" on the mixed scripting page
15 // icon bubble. 17 // icon bubble.
16 const char kInsecureScriptHelpUrl[] = 18 const char kInsecureScriptHelpUrl[] =
(...skipping 11 matching lines...) Expand all
28 content::WebContents* web_contents) { 30 content::WebContents* web_contents) {
29 chrome::ShowCollectedCookiesDialog(web_contents); 31 chrome::ShowCollectedCookiesDialog(web_contents);
30 } 32 }
31 33
32 void BrowserContentSettingBubbleModelDelegate::ShowContentSettingsPage( 34 void BrowserContentSettingBubbleModelDelegate::ShowContentSettingsPage(
33 ContentSettingsType type) { 35 ContentSettingsType type) {
34 switch (type) { 36 switch (type) {
35 case CONTENT_SETTINGS_TYPE_MIXEDSCRIPT: 37 case CONTENT_SETTINGS_TYPE_MIXEDSCRIPT:
36 // We don't (yet?) implement user-settable exceptions for mixed script 38 // We don't (yet?) implement user-settable exceptions for mixed script
37 // blocking, so bounce to an explanatory page for now. 39 // blocking, so bounce to an explanatory page for now.
40 UMA_HISTOGRAM_ENUMERATION("ContentSettings.MixedScript",
41 TabSpecificContentSettings::MIXEDSCRIPT_CLICKED_LEARN_MORE,
42 TabSpecificContentSettings::MIXEDSCRIPT_CONTENT_NUM_EVENTS);
38 chrome::AddSelectedTabWithURL(browser_, 43 chrome::AddSelectedTabWithURL(browser_,
39 GURL(kInsecureScriptHelpUrl), 44 GURL(kInsecureScriptHelpUrl),
40 ui::PAGE_TRANSITION_LINK); 45 ui::PAGE_TRANSITION_LINK);
41 return; 46 return;
42 case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS: 47 case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS:
43 chrome::ShowSettingsSubPage(browser_, chrome::kHandlerSettingsSubPage); 48 chrome::ShowSettingsSubPage(browser_, chrome::kHandlerSettingsSubPage);
44 return; 49 return;
45 default: 50 default:
46 chrome::ShowContentSettings(browser_, type); 51 chrome::ShowContentSettings(browser_, type);
47 return; 52 return;
48 } 53 }
49 } 54 }
50 55
51 void BrowserContentSettingBubbleModelDelegate::ShowLearnMorePage( 56 void BrowserContentSettingBubbleModelDelegate::ShowLearnMorePage(
52 ContentSettingsType type) { 57 ContentSettingsType type) {
53 if (type != CONTENT_SETTINGS_TYPE_PLUGINS) 58 if (type != CONTENT_SETTINGS_TYPE_PLUGINS)
54 return; 59 return;
55 chrome::AddSelectedTabWithURL(browser_, 60 chrome::AddSelectedTabWithURL(browser_,
56 GURL(chrome::kBlockedPluginLearnMoreURL), 61 GURL(chrome::kBlockedPluginLearnMoreURL),
57 ui::PAGE_TRANSITION_LINK); 62 ui::PAGE_TRANSITION_LINK);
58 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698