| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #import "chrome/browser/cocoa/content_settings_dialog_controller.h" | 5 #import "chrome/browser/cocoa/content_settings_dialog_controller.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // TODO(thakis): Autosave window pos. | 118 // TODO(thakis): Autosave window pos. |
| 119 | 119 |
| 120 [g_instance selectTab:settingsType]; | 120 [g_instance selectTab:settingsType]; |
| 121 [g_instance showWindow:nil]; | 121 [g_instance showWindow:nil]; |
| 122 [g_instance closeExceptionsSheet]; | 122 [g_instance closeExceptionsSheet]; |
| 123 return g_instance; | 123 return g_instance; |
| 124 } | 124 } |
| 125 | 125 |
| 126 - (id)initWithProfile:(Profile*)profile { | 126 - (id)initWithProfile:(Profile*)profile { |
| 127 DCHECK(profile); | 127 DCHECK(profile); |
| 128 disableCookiePrompt_ = CommandLine::ForCurrentProcess()->HasSwitch( | 128 disableCookiePrompt_ = !CommandLine::ForCurrentProcess()->HasSwitch( |
| 129 switches::kDisableCookiePrompt); | 129 switches::kEnableCookiePrompt); |
| 130 NSString* nibpath = | 130 NSString* nibpath = |
| 131 [mac_util::MainAppBundle() pathForResource:@"ContentSettings" | 131 [mac_util::MainAppBundle() pathForResource:@"ContentSettings" |
| 132 ofType:@"nib"]; | 132 ofType:@"nib"]; |
| 133 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { | 133 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { |
| 134 profile_ = profile; | 134 profile_ = profile; |
| 135 | 135 |
| 136 observer_.reset( | 136 observer_.reset( |
| 137 new ContentSettingsDialogControllerInternal::PrefObserverBridge(self)); | 137 new ContentSettingsDialogControllerInternal::PrefObserverBridge(self)); |
| 138 clearSiteDataOnExit_.Init(prefs::kClearSiteDataOnExit, | 138 clearSiteDataOnExit_.Init(prefs::kClearSiteDataOnExit, |
| 139 profile_->GetPrefs(), observer_.get()); | 139 profile_->GetPrefs(), observer_.get()); |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 [self willChangeValueForKey:@"geolocationSettingIndex"]; | 534 [self willChangeValueForKey:@"geolocationSettingIndex"]; |
| 535 [self didChangeValueForKey:@"geolocationSettingIndex"]; | 535 [self didChangeValueForKey:@"geolocationSettingIndex"]; |
| 536 } | 536 } |
| 537 if (*prefName == prefs::kDesktopNotificationDefaultContentSetting) { | 537 if (*prefName == prefs::kDesktopNotificationDefaultContentSetting) { |
| 538 [self willChangeValueForKey:@"notificationsSettingIndex"]; | 538 [self willChangeValueForKey:@"notificationsSettingIndex"]; |
| 539 [self didChangeValueForKey:@"notificationsSettingIndex"]; | 539 [self didChangeValueForKey:@"notificationsSettingIndex"]; |
| 540 } | 540 } |
| 541 } | 541 } |
| 542 | 542 |
| 543 @end | 543 @end |
| OLD | NEW |