| Index: chrome/browser/autofill/autofill_dialog_controller_mac.mm
|
| diff --git a/chrome/browser/autofill/autofill_dialog_controller_mac.mm b/chrome/browser/autofill/autofill_dialog_controller_mac.mm
|
| index 990ba58c6f08ed9d95275013c49b7f90c7e361c9..ac17b073353d3131cc1c674b84b8c0febe39bd49 100644
|
| --- a/chrome/browser/autofill/autofill_dialog_controller_mac.mm
|
| +++ b/chrome/browser/autofill/autofill_dialog_controller_mac.mm
|
| @@ -5,8 +5,8 @@
|
| #import "chrome/browser/autofill/autofill_dialog_controller_mac.h"
|
| #include "app/l10n_util.h"
|
| #include "app/resource_bundle.h"
|
| +#include "base/lazy_instance.h"
|
| #include "base/mac_util.h"
|
| -#include "base/singleton.h"
|
| #include "base/sys_string_conversions.h"
|
| #import "chrome/browser/autofill/autofill_address_model_mac.h"
|
| #import "chrome/browser/autofill/autofill_address_sheet_controller_mac.h"
|
| @@ -32,6 +32,9 @@ namespace {
|
| // dialog.
|
| typedef std::map<Profile*, AutoFillDialogController*> ProfileControllerMap;
|
|
|
| +static base::LazyInstance<ProfileControllerMap> g_profile_controller_map(
|
| + base::LINKER_INITIALIZED);
|
| +
|
| } // namespace
|
|
|
| // Delegate protocol that needs to be in place for the AutoFillTableView's
|
| @@ -268,7 +271,7 @@ class PreferenceObserver : public NotificationObserver {
|
| [self autorelease];
|
|
|
| // Remove ourself from the map.
|
| - ProfileControllerMap* map = Singleton<ProfileControllerMap>::get();
|
| + ProfileControllerMap* map = g_profile_controller_map.Pointer();
|
| ProfileControllerMap::iterator it = map->find(profile_);
|
| if (it != map->end()) {
|
| map->erase(it);
|
| @@ -633,7 +636,7 @@ class PreferenceObserver : public NotificationObserver {
|
| profile:(Profile*)profile {
|
| profile = profile->GetOriginalProfile();
|
|
|
| - ProfileControllerMap* map = Singleton<ProfileControllerMap>::get();
|
| + ProfileControllerMap* map = g_profile_controller_map.Pointer();
|
| DCHECK(map != NULL);
|
| ProfileControllerMap::iterator it = map->find(profile);
|
| if (it == map->end()) {
|
|
|