| Index: chrome/browser/cocoa/preferences_window_controller.mm
|
| diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm
|
| index 357824dc818fd898c256e6124a0883789754ae74..f04a8bed22fd0b7826c3aa125ddff30200da0f70 100644
|
| --- a/chrome/browser/cocoa/preferences_window_controller.mm
|
| +++ b/chrome/browser/cocoa/preferences_window_controller.mm
|
| @@ -32,6 +32,7 @@
|
| #include "chrome/browser/net/url_fixer_upper.h"
|
| #include "chrome/browser/options_window.h"
|
| #include "chrome/browser/profile.h"
|
| +#include "chrome/browser/host_content_settings_map.h"
|
| #include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
| #include "chrome/browser/session_startup_pref.h"
|
| #include "chrome/browser/shell_integration.h"
|
| @@ -1422,6 +1423,38 @@ const int kDisabledIndex = 1;
|
| chrome_browser_net::EnableDnsPrefetch(value ? true : false);
|
| }
|
|
|
| +- (BOOL)blockImages {
|
| + return profile_->GetHostContentSettingsMap()->GetDefaultContentSetting(
|
| + CONTENT_SETTINGS_TYPE_IMAGES) != CONTENT_SETTING_ALLOW;
|
| +}
|
| +
|
| +- (void)setBlockImages:(BOOL)value {
|
| +// profile_->GetHostContentSettingsMap()->SetDefaultContentSetting(
|
| +// content_type_,
|
| +// CONTENT_SETTINGS_TYPE_IMAGES,
|
| +// value ? CONTENT_SETTING_BLOCK : CONTENT_SETTING_ALLOW);
|
| + profile_->GetHostContentSettingsMap()->SetDefaultContentSetting(
|
| + CONTENT_SETTINGS_TYPE_IMAGES,
|
| + value ? CONTENT_SETTING_BLOCK : CONTENT_SETTING_ALLOW);
|
| +// profile_->GetHostContentSettingsMap()->SetDefaultContentSetting(
|
| +// CONTENT_SETTINGS_TYPE_PLUGINS,
|
| +// value ? CONTENT_SETTING_BLOCK : CONTENT_SETTING_ALLOW);
|
| +
|
| +// blockImages_.SetValue(value ? true : false);
|
| +}
|
| +
|
| +- (BOOL)blockJavaScript {
|
| + return profile_->GetHostContentSettingsMap()->GetDefaultContentSetting(
|
| + CONTENT_SETTINGS_TYPE_JAVASCRIPT) != CONTENT_SETTING_ALLOW;
|
| +}
|
| +
|
| +- (void)setBlockJavaScript:(BOOL)value {
|
| + profile_->GetHostContentSettingsMap()->SetDefaultContentSetting(
|
| + CONTENT_SETTINGS_TYPE_JAVASCRIPT,
|
| + value ? CONTENT_SETTING_BLOCK : CONTENT_SETTING_ALLOW);
|
| +}
|
| +
|
| +
|
| // Returns whether the safe browsing checkbox should be checked based on the
|
| // preference.
|
| - (BOOL)safeBrowsing {
|
|
|