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

Side by Side Diff: chrome/renderer/content_settings_observer.h

Issue 7558024: Add UMA metrics for blocked plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ 5 #ifndef CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
6 #define CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ 6 #define CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 24 matching lines...) Expand all
35 static void SetDefaultContentSettings(const ContentSettings& settings); 35 static void SetDefaultContentSettings(const ContentSettings& settings);
36 36
37 // Returns the setting for the given type. 37 // Returns the setting for the given type.
38 ContentSetting GetContentSetting(ContentSettingsType type); 38 ContentSetting GetContentSetting(ContentSettingsType type);
39 39
40 // Sends an IPC notification that the specified content type was blocked. 40 // Sends an IPC notification that the specified content type was blocked.
41 // If the content type requires it, |resource_identifier| names the specific 41 // If the content type requires it, |resource_identifier| names the specific
42 // resource that was blocked (the plugin path in the case of plugins), 42 // resource that was blocked (the plugin path in the case of plugins),
43 // otherwise it's the empty string. 43 // otherwise it's the empty string.
44 void DidBlockContentType(ContentSettingsType settings_type, 44 void DidBlockContentType(ContentSettingsType settings_type,
45 const std::string& resource_identifier); 45 const std::string& resource_identifier,
46 ContentSetting setting);
46 47
47 // These correspond to WebKit::WebPermissionClient methods. 48 // These correspond to WebKit::WebPermissionClient methods.
48 bool AllowDatabase(WebKit::WebFrame* frame, 49 bool AllowDatabase(WebKit::WebFrame* frame,
49 const WebKit::WebString& name, 50 const WebKit::WebString& name,
50 const WebKit::WebString& display_name, 51 const WebKit::WebString& display_name,
51 unsigned long estimated_size); 52 unsigned long estimated_size);
52 bool AllowFileSystem(WebKit::WebFrame* frame); 53 bool AllowFileSystem(WebKit::WebFrame* frame);
53 bool AllowImages(WebKit::WebFrame* frame, bool enabled_per_settings); 54 bool AllowImages(WebKit::WebFrame* frame, bool enabled_per_settings);
54 bool AllowIndexedDB(WebKit::WebFrame* frame, 55 bool AllowIndexedDB(WebKit::WebFrame* frame,
55 const WebKit::WebString& name, 56 const WebKit::WebString& name,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // Caches the result of AllowStorage. 95 // Caches the result of AllowStorage.
95 typedef std::pair<GURL, bool> StoragePermissionsKey; 96 typedef std::pair<GURL, bool> StoragePermissionsKey;
96 std::map<StoragePermissionsKey, bool> cached_storage_permissions_; 97 std::map<StoragePermissionsKey, bool> cached_storage_permissions_;
97 98
98 bool plugins_temporarily_allowed_; 99 bool plugins_temporarily_allowed_;
99 100
100 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); 101 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver);
101 }; 102 };
102 103
103 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ 104 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698