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

Side by Side Diff: chrome/browser/cocoa/content_settings_dialog_controller.mm

Issue 3030033: Flip the default for the cookie prompt to disabled. (Closed)
Patch Set: Created 10 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) 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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/content_exceptions_window_controller.mm ('k') | chrome/browser/content_setting_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698