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

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

Issue 659573003: Log mixed script shield events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Give the MixedScriptAction enum a name. 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
« no previous file with comments | « no previous file | chrome/browser/content_settings/tab_specific_content_settings.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 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ 6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // Fields describing the current mic/camera state. If a page has attempted to 48 // Fields describing the current mic/camera state. If a page has attempted to
49 // access a device, the XXX_ACCESSED bit will be set. If access was blocked, 49 // access a device, the XXX_ACCESSED bit will be set. If access was blocked,
50 // XXX_BLOCKED will be set. 50 // XXX_BLOCKED will be set.
51 typedef uint32_t MicrophoneCameraState; 51 typedef uint32_t MicrophoneCameraState;
52 static const MicrophoneCameraState MICROPHONE_CAMERA_NOT_ACCESSED = 0; 52 static const MicrophoneCameraState MICROPHONE_CAMERA_NOT_ACCESSED = 0;
53 static const MicrophoneCameraState MICROPHONE_ACCESSED = 1 << 0; 53 static const MicrophoneCameraState MICROPHONE_ACCESSED = 1 << 0;
54 static const MicrophoneCameraState MICROPHONE_BLOCKED = 1 << 1; 54 static const MicrophoneCameraState MICROPHONE_BLOCKED = 1 << 1;
55 static const MicrophoneCameraState CAMERA_ACCESSED = 1 << 2; 55 static const MicrophoneCameraState CAMERA_ACCESSED = 1 << 2;
56 static const MicrophoneCameraState CAMERA_BLOCKED = 1 << 3; 56 static const MicrophoneCameraState CAMERA_BLOCKED = 1 << 3;
57 57
58 // UMA statistics for the mixed content shield
59 enum MixedScriptAction {
60 MIXEDSCRIPT_DISPLAYED_SHIELD = 0,
61 MIXEDSCRIPT_DISPLAYED_BUBBLE,
62 MIXEDSCRIPT_CLICKED_ALLOW,
63 MIXEDSCRIPT_CLICKED_LEARN_MORE,
64 MIXEDSCRIPT_NUM_ACTIONS
Ilya Sherman 2014/10/16 22:20:35 FYI, the typical style is, if the enum name is Foo
lgarron 2014/10/16 22:24:30 Man, apparently I can't get nuttin' right, even if
65 };
66
67 static void RecordMixedScriptAction(MixedScriptAction action);
68
58 // Classes that want to be notified about site data events must implement 69 // Classes that want to be notified about site data events must implement
59 // this abstract class and add themselves as observer to the 70 // this abstract class and add themselves as observer to the
60 // |TabSpecificContentSettings|. 71 // |TabSpecificContentSettings|.
61 class SiteDataObserver { 72 class SiteDataObserver {
62 public: 73 public:
63 explicit SiteDataObserver( 74 explicit SiteDataObserver(
64 TabSpecificContentSettings* tab_specific_content_settings); 75 TabSpecificContentSettings* tab_specific_content_settings);
65 virtual ~SiteDataObserver(); 76 virtual ~SiteDataObserver();
66 77
67 // Called whenever site data is accessed. 78 // Called whenever site data is accessed.
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 std::string media_stream_requested_audio_device_; 456 std::string media_stream_requested_audio_device_;
446 std::string media_stream_requested_video_device_; 457 std::string media_stream_requested_video_device_;
447 458
448 // Observer to watch for content settings changed. 459 // Observer to watch for content settings changed.
449 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; 460 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_;
450 461
451 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); 462 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings);
452 }; 463 };
453 464
454 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ 465 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/tab_specific_content_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698