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

Unified Diff: chrome/browser/cocoa/preferences_window_controller.mm

Issue 99238: Add notification (and unit test) for closing prefs window so it can be cleane... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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
Index: chrome/browser/cocoa/preferences_window_controller.mm
===================================================================
--- chrome/browser/cocoa/preferences_window_controller.mm (revision 14958)
+++ chrome/browser/cocoa/preferences_window_controller.mm (working copy)
@@ -7,7 +7,8 @@
#include "base/mac_util.h"
#include "chrome/common/pref_service.h"
-PreferencesWindowController* gPrefWindowSingleton = nil;
+NSString* const kUserDoneEditingPrefsNotification =
+ @"kUserDoneEditingPrefsNotification";
@implementation PreferencesWindowController
@@ -42,8 +43,9 @@
// Called when the window is being closed. Send out a notification that the
// user is done editing preferences.
- (void)windowWillClose:(NSNotification *)notification {
- // TODO(pinkerton): send notification. Write unit test that makes sure
- // we receive it.
+ [[NSNotificationCenter defaultCenter]
+ postNotificationName:kUserDoneEditingPrefsNotification
+ object:self];
}
@end
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.h ('k') | chrome/browser/cocoa/preferences_window_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698