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

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.h

Issue 2180723002: Add revocation metrics from OIB and content setting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@revocation-reporter
Patch Set: Rebase Created 4 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
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_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/scoped_observer.h" 14 #include "base/scoped_observer.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/pepper_flash_settings_manager.h" 16 #include "chrome/browser/pepper_flash_settings_manager.h"
17 #include "chrome/browser/ui/webui/options/options_ui.h" 17 #include "chrome/browser/ui/webui/options/options_ui.h"
18 #include "chrome/browser/ui/webui/options/pepper_flash_content_settings_utils.h" 18 #include "chrome/browser/ui/webui/options/pepper_flash_content_settings_utils.h"
19 #include "components/content_settings/core/browser/content_settings_observer.h" 19 #include "components/content_settings/core/browser/content_settings_observer.h"
20 #include "components/content_settings/core/common/content_settings.h" 20 #include "components/content_settings/core/common/content_settings.h"
21 #include "components/content_settings/core/common/content_settings_types.h" 21 #include "components/content_settings/core/common/content_settings_types.h"
22 #include "components/prefs/pref_change_registrar.h" 22 #include "components/prefs/pref_change_registrar.h"
23 #include "content/public/browser/host_zoom_map.h" 23 #include "content/public/browser/host_zoom_map.h"
24 #include "content/public/browser/notification_observer.h" 24 #include "content/public/browser/notification_observer.h"
25 #include "content/public/browser/notification_registrar.h" 25 #include "content/public/browser/notification_registrar.h"
26 26
27 class HostContentSettingsMap; 27 class HostContentSettingsMap;
28 class Profile;
28 class ProtocolHandlerRegistry; 29 class ProtocolHandlerRegistry;
29 30
30 namespace options { 31 namespace options {
31 32
32 class ContentSettingsHandler : public OptionsPageUIHandler, 33 class ContentSettingsHandler : public OptionsPageUIHandler,
33 public content_settings::Observer, 34 public content_settings::Observer,
34 public content::NotificationObserver, 35 public content::NotificationObserver,
35 public PepperFlashSettingsManager::Client { 36 public PepperFlashSettingsManager::Client {
36 public: 37 public:
37 struct ChooserTypeNameEntry; 38 struct ChooserTypeNameEntry;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // Called to decide whether a given pattern is valid, or if it should be 229 // Called to decide whether a given pattern is valid, or if it should be
229 // rejected. Called while the user is editing an exception pattern. 230 // rejected. Called while the user is editing an exception pattern.
230 void CheckExceptionPatternValidity(const base::ListValue* args); 231 void CheckExceptionPatternValidity(const base::ListValue* args);
231 232
232 // Utility functions --------------------------------------------------------- 233 // Utility functions ---------------------------------------------------------
233 234
234 // Applies content settings whitelists to reduce breakage / user confusion. 235 // Applies content settings whitelists to reduce breakage / user confusion.
235 void ApplyWhitelist(ContentSettingsType content_type, 236 void ApplyWhitelist(ContentSettingsType content_type,
236 ContentSetting default_setting); 237 ContentSetting default_setting);
237 238
238 // Gets the HostContentSettingsMap for the normal profile. 239 // Gets the normal profile.
239 HostContentSettingsMap* GetContentSettingsMap(); 240 Profile* GetProfile();
240 241
241 // Gets the HostContentSettingsMap for the incognito profile, or NULL if there 242 // Gets the incognito profile, or nullptr if there is no active incognito
242 // is no active incognito session. 243 // session.
243 HostContentSettingsMap* GetOTRContentSettingsMap(); 244 Profile* GetOTRProfile();
244 245
245 // Gets the ProtocolHandlerRegistry for the normal profile. 246 // Gets the ProtocolHandlerRegistry for the normal profile.
246 ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); 247 ProtocolHandlerRegistry* GetProtocolHandlerRegistry();
247 248
248 void RefreshFlashMediaSettings(); 249 void RefreshFlashMediaSettings();
249 250
250 // Fills in |exceptions| with Values for the given |type| from |map|. 251 // Fills in |exceptions| with Values for the given |type| from |map|.
251 void GetChooserExceptionsFromProfile(bool incognito, 252 void GetChooserExceptionsFromProfile(bool incognito,
252 const ChooserTypeNameEntry& type, 253 const ChooserTypeNameEntry& type,
253 base::ListValue* exceptions); 254 base::ListValue* exceptions);
(...skipping 23 matching lines...) Expand all
277 std::unique_ptr<content::HostZoomMap::Subscription> 278 std::unique_ptr<content::HostZoomMap::Subscription>
278 signin_host_zoom_map_subscription_; 279 signin_host_zoom_map_subscription_;
279 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; 280 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_;
280 281
281 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); 282 DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler);
282 }; 283 };
283 284
284 } // namespace options 285 } // namespace options
285 286
286 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_ 287 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CONTENT_SETTINGS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings.cc ('k') | chrome/browser/ui/webui/options/content_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698