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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings_bubble_controller.mm

Issue 11567040: [Mac] Website settings: Fix DCHECK that was checking the wrong condition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "chrome/browser/ui/cocoa/website_settings_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/website_settings_bubble_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #import <AppKit/AppKit.h> 9 #import <AppKit/AppKit.h>
10 10
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 1083
1084 [connectionStatusIcon_ setImage:WebsiteSettingsUI::GetConnectionIcon( 1084 [connectionStatusIcon_ setImage:WebsiteSettingsUI::GetConnectionIcon(
1085 identityInfo.connection_status).ToNSImage()]; 1085 identityInfo.connection_status).ToNSImage()];
1086 [connectionStatusDescriptionField_ setStringValue: 1086 [connectionStatusDescriptionField_ setStringValue:
1087 base::SysUTF8ToNSString(identityInfo.connection_status_description)]; 1087 base::SysUTF8ToNSString(identityInfo.connection_status_description)];
1088 1088
1089 [self performLayout]; 1089 [self performLayout];
1090 } 1090 }
1091 1091
1092 - (void)setCookieInfo:(const CookieInfoList&)cookieInfoList { 1092 - (void)setCookieInfo:(const CookieInfoList&)cookieInfoList {
1093 // The contents of the permissions view can cause the whole window to get
1094 // bigger, but currently permissions are always set before cookie info.
1095 // Check to make sure that's still the case.
1096 DCHECK_GT([[permissionsView_ subviews] count], 0U);
1097
1093 [cookiesView_ setSubviews:[NSArray array]]; 1098 [cookiesView_ setSubviews:[NSArray array]];
1094 NSPoint controlOrigin = NSMakePoint(kFramePadding, 0); 1099 NSPoint controlOrigin = NSMakePoint(kFramePadding, 0);
1095 1100
1096 string16 sectionTitle = l10n_util::GetStringUTF16( 1101 string16 sectionTitle = l10n_util::GetStringUTF16(
1097 IDS_WEBSITE_SETTINGS_TITLE_SITE_DATA); 1102 IDS_WEBSITE_SETTINGS_TITLE_SITE_DATA);
1098 NSTextField* header = [self addText:sectionTitle 1103 NSTextField* header = [self addText:sectionTitle
1099 withSize:[NSFont smallSystemFontSize] 1104 withSize:[NSFont smallSystemFontSize]
1100 bold:YES 1105 bold:YES
1101 toView:cookiesView_ 1106 toView:cookiesView_
1102 atPoint:controlOrigin]; 1107 atPoint:controlOrigin];
(...skipping 10 matching lines...) Expand all
1113 } 1118 }
1114 1119
1115 controlOrigin.y += kPermissionsTabSpacing; 1120 controlOrigin.y += kPermissionsTabSpacing;
1116 [cookiesView_ setFrameSize: 1121 [cookiesView_ setFrameSize:
1117 NSMakeSize(NSWidth([cookiesView_ frame]), controlOrigin.y)]; 1122 NSMakeSize(NSWidth([cookiesView_ frame]), controlOrigin.y)];
1118 1123
1119 [self performLayout]; 1124 [self performLayout];
1120 } 1125 }
1121 1126
1122 - (void)setPermissionInfo:(const PermissionInfoList&)permissionInfoList { 1127 - (void)setPermissionInfo:(const PermissionInfoList&)permissionInfoList {
1123 // The contents of the permissions view can cause the whole window to get
1124 // bigger, but currently permissions are always set before cookie info.
1125 // Check to make sure that's still the case.
1126 DCHECK_EQ(0U, [[cookiesView_ subviews] count]);
1127
1128 [permissionsView_ setSubviews:[NSArray array]]; 1128 [permissionsView_ setSubviews:[NSArray array]];
1129 NSPoint controlOrigin = NSMakePoint(kFramePadding, 0); 1129 NSPoint controlOrigin = NSMakePoint(kFramePadding, 0);
1130 1130
1131 string16 sectionTitle = l10n_util::GetStringUTF16( 1131 string16 sectionTitle = l10n_util::GetStringUTF16(
1132 IDS_WEBSITE_SETTINGS_TITLE_SITE_PERMISSIONS); 1132 IDS_WEBSITE_SETTINGS_TITLE_SITE_PERMISSIONS);
1133 NSTextField* header = [self addText:sectionTitle 1133 NSTextField* header = [self addText:sectionTitle
1134 withSize:[NSFont smallSystemFontSize] 1134 withSize:[NSFont smallSystemFontSize]
1135 bold:YES 1135 bold:YES
1136 toView:permissionsView_ 1136 toView:permissionsView_
1137 atPoint:controlOrigin]; 1137 atPoint:controlOrigin];
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 [bubble_controller_ setPermissionInfo:permission_info_list]; 1232 [bubble_controller_ setPermissionInfo:permission_info_list];
1233 } 1233 }
1234 1234
1235 void WebsiteSettingsUIBridge::SetFirstVisit(const string16& first_visit) { 1235 void WebsiteSettingsUIBridge::SetFirstVisit(const string16& first_visit) {
1236 [bubble_controller_ setFirstVisit:first_visit]; 1236 [bubble_controller_ setFirstVisit:first_visit];
1237 } 1237 }
1238 1238
1239 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { 1239 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) {
1240 [bubble_controller_ setSelectedTab:tab_id]; 1240 [bubble_controller_ setSelectedTab:tab_id];
1241 } 1241 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698