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

Side by Side Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 2588273002: Add UMA metrics for pop-up blocked page action on desktop (Closed)
Patch Set: format fix, remove #if directive Created 4 years 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/content_settings/tab_specific_content_settings.h" 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED, 353 chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED,
354 content::Source<WebContents>(web_contents()), 354 content::Source<WebContents>(web_contents()),
355 content::NotificationService::NoDetails()); 355 content::NotificationService::NoDetails());
356 356
357 if (type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) { 357 if (type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) {
358 content_settings::RecordMixedScriptAction( 358 content_settings::RecordMixedScriptAction(
359 content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD); 359 content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD);
360 } else if (type == CONTENT_SETTINGS_TYPE_PLUGINS) { 360 } else if (type == CONTENT_SETTINGS_TYPE_PLUGINS) {
361 content_settings::RecordPluginsAction( 361 content_settings::RecordPluginsAction(
362 content_settings::PLUGINS_ACTION_DISPLAYED_BLOCKED_ICON_IN_OMNIBOX); 362 content_settings::PLUGINS_ACTION_DISPLAYED_BLOCKED_ICON_IN_OMNIBOX);
363 } else if (type == CONTENT_SETTINGS_TYPE_POPUPS) {
364 content_settings::RecordPopupsAction(
365 content_settings::POPUPS_ACTION_DISPLAYED_BLOCKED_ICON_IN_OMNIBOX);
363 } 366 }
364 } 367 }
365 } 368 }
366 369
367 void TabSpecificContentSettings::OnContentAllowed(ContentSettingsType type) { 370 void TabSpecificContentSettings::OnContentAllowed(ContentSettingsType type) {
368 DCHECK(type != CONTENT_SETTINGS_TYPE_GEOLOCATION) 371 DCHECK(type != CONTENT_SETTINGS_TYPE_GEOLOCATION)
369 << "Geolocation settings handled by OnGeolocationPermissionSet"; 372 << "Geolocation settings handled by OnGeolocationPermissionSet";
370 DCHECK(type != CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC && 373 DCHECK(type != CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC &&
371 type != CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA) 374 type != CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA)
372 << "Media stream settings handled by OnMediaStreamPermissionSet"; 375 << "Media stream settings handled by OnMediaStreamPermissionSet";
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 static_cast<MicrophoneCameraStateFlags>( 913 static_cast<MicrophoneCameraStateFlags>(
911 TabSpecificContentSettings::MICROPHONE_ACCESSED | 914 TabSpecificContentSettings::MICROPHONE_ACCESSED |
912 TabSpecificContentSettings::MICROPHONE_BLOCKED | 915 TabSpecificContentSettings::MICROPHONE_BLOCKED |
913 TabSpecificContentSettings::CAMERA_ACCESSED | 916 TabSpecificContentSettings::CAMERA_ACCESSED |
914 TabSpecificContentSettings::CAMERA_BLOCKED); 917 TabSpecificContentSettings::CAMERA_BLOCKED);
915 OnMediaStreamPermissionSet( 918 OnMediaStreamPermissionSet(
916 web_contents()->GetLastCommittedURL(), 919 web_contents()->GetLastCommittedURL(),
917 media_blocked, 920 media_blocked,
918 std::string(), std::string(), std::string(), std::string()); 921 std::string(), std::string(), std::string(), std::string());
919 } 922 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698