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

Unified Diff: chrome/browser/ui/cocoa/custom_frame_view.mm

Issue 1101923002: mac: Suppress a clang warning in CustomFrameView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch to UNAVAILABLE_ATTRIBUTE. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/custom_frame_view.mm
diff --git a/chrome/browser/ui/cocoa/custom_frame_view.mm b/chrome/browser/ui/cocoa/custom_frame_view.mm
index 08ae9d42d2656c09fc156a3129b9543d98cd44ca..a745822fd502a9ce933ce18b2ec957f71a3e91dc 100644
--- a/chrome/browser/ui/cocoa/custom_frame_view.mm
+++ b/chrome/browser/ui/cocoa/custom_frame_view.mm
@@ -23,6 +23,12 @@
@interface CustomFrameView : NSView
+// Clang emits a warning if designated initializers don't call the super
+// initializer, even if the method raises an exception.
+// http://www.crbug.com/479019.
+- (id)initWithFrame:(NSRect)frame UNAVAILABLE_ATTRIBUTE;
+- (id)initWithCoder:(NSCoder*)coder UNAVAILABLE_ATTRIBUTE;
+
@end
@implementation CustomFrameView
@@ -77,12 +83,6 @@
}
}
-// TODO(erikchen): Clang throws a warning if a designated initializer doesn't
-// call the super initializer, even if the method raises an exception. These
-// pragmas shouldn't be necessary.
-// http://www.crbug.com/479019.
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wobjc-designated-initializers"
- (id)initWithFrame:(NSRect)frame {
// This class is not for instantiating.
[self doesNotRecognizeSelector:_cmd];
@@ -94,7 +94,6 @@
[self doesNotRecognizeSelector:_cmd];
return nil;
}
-#pragma clang diagnostic pop
// Override to move the fullscreen button to the left of the profile avatar.
- (NSPoint)_fullScreenButtonOrigin {
« 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