diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-11 19:34:47 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-11 19:34:47 +0000 |
commit | 9ea9ca45885eeb653d041a7f828ee8880ae4926a (patch) | |
tree | f811d8c7c0417ceac57b6c950d065faea3ab0593 /chrome/browser/cocoa/preferences_window_controller.mm | |
parent | cbc9ed60c4959214cbbcff09035534e29eaed0db (diff) | |
download | chromium_src-9ea9ca45885eeb653d041a7f828ee8880ae4926a.zip chromium_src-9ea9ca45885eeb653d041a7f828ee8880ae4926a.tar.gz chromium_src-9ea9ca45885eeb653d041a7f828ee8880ae4926a.tar.bz2 |
Move all the PrefObserverBridges into namespaces (like is already done with ToolbarController's) so we stop violating the ODR and things start working properly.
BUG=http://crbug.com/37898
TEST=as in bug
Review URL: http://codereview.chromium.org/887002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41306 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/preferences_window_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/preferences_window_controller.mm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm index 139e453..fcc3fd7 100644 --- a/chrome/browser/cocoa/preferences_window_controller.mm +++ b/chrome/browser/cocoa/preferences_window_controller.mm @@ -395,6 +395,8 @@ CGFloat AutoSizeUnderTheHoodContent(NSView* view, animate:(BOOL)animate; @end +namespace PreferencesWindowControllerInternal { + // A C++ class registered for changes in preferences. Bridges the // notification back to the PWC. class PrefObserverBridge : public NotificationObserver, @@ -516,6 +518,7 @@ void PersonalDataManagerObserver::ShowAutoFillDialog( ::ShowAutoFillDialog(personal_data_manager, profiles, credit_cards, profile); } +} // namespace PreferencesWindowControllerInternal @implementation PreferencesWindowController @@ -531,7 +534,8 @@ void PersonalDataManagerObserver::ShowAutoFillDialog( initialPage_ = initialPage; prefs_ = profile->GetPrefs(); DCHECK(prefs_); - observer_.reset(new PrefObserverBridge(self)); + observer_.reset( + new PreferencesWindowControllerInternal::PrefObserverBridge(self)); // Set up the model for the custom home page table. The KVO observation // tells us when the number of items in the array changes. The normal @@ -1279,13 +1283,15 @@ const int kDisabledIndex = 1; if (personalDataManager->IsDataLoaded()) { // |personalDataManager| data is loaded, we can proceed with the dialog. - PersonalDataManagerObserver::ShowAutoFillDialog(personalDataManager, - profile_); + PreferencesWindowControllerInternal:: + PersonalDataManagerObserver::ShowAutoFillDialog(personalDataManager, + profile_); } else { // |personalDataManager| data is NOT loaded, so we load it here, installing // our observer. personalDataManagerObserver_.reset( - new PersonalDataManagerObserver(personalDataManager, profile_)); + new PreferencesWindowControllerInternal::PersonalDataManagerObserver( + personalDataManager, profile_)); personalDataManager->SetObserver(personalDataManagerObserver_.get()); } } |