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

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: 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 #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 {
60 MIXEDSCRIPT_DISPLAYED_SHIELD = 0,
61 MIXEDSCRIPT_DISPLAYED_BUBBLE,
62 MIXEDSCRIPT_CLICKED_ALLOW,
63 MIXEDSCRIPT_CLICKED_LEARN_MORE,
64 MIXEDSCRIPT_CONTENT_NUM_EVENTS
65 };
66
58 // Classes that want to be notified about site data events must implement 67 // Classes that want to be notified about site data events must implement
59 // this abstract class and add themselves as observer to the 68 // this abstract class and add themselves as observer to the
60 // |TabSpecificContentSettings|. 69 // |TabSpecificContentSettings|.
61 class SiteDataObserver { 70 class SiteDataObserver {
62 public: 71 public:
63 explicit SiteDataObserver( 72 explicit SiteDataObserver(
64 TabSpecificContentSettings* tab_specific_content_settings); 73 TabSpecificContentSettings* tab_specific_content_settings);
65 virtual ~SiteDataObserver(); 74 virtual ~SiteDataObserver();
66 75
67 // Called whenever site data is accessed. 76 // 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_; 454 std::string media_stream_requested_audio_device_;
446 std::string media_stream_requested_video_device_; 455 std::string media_stream_requested_video_device_;
447 456
448 // Observer to watch for content settings changed. 457 // Observer to watch for content settings changed.
449 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; 458 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_;
450 459
451 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); 460 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings);
452 }; 461 };
453 462
454 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ 463 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698