| Index: chrome/browser/ui/cocoa/clear_browsing_data_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/clear_browsing_data_controller.mm b/chrome/browser/ui/cocoa/clear_browsing_data_controller.mm
|
| index d59e89efcb8bd585649828b59da328b65e5afb4d..c0c927e3c93ab50a47631d29aa22c72f8c0de1f5 100644
|
| --- a/chrome/browser/ui/cocoa/clear_browsing_data_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/clear_browsing_data_controller.mm
|
| @@ -5,9 +5,9 @@
|
| #import "chrome/browser/ui/cocoa/clear_browsing_data_controller.h"
|
|
|
| #include "app/l10n_util.h"
|
| +#include "base/lazy_instance.h"
|
| #include "base/mac_util.h"
|
| #include "base/scoped_nsobject.h"
|
| -#include "base/singleton.h"
|
| #include "chrome/browser/browsing_data_remover.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| @@ -41,6 +41,9 @@ namespace {
|
|
|
| typedef std::map<Profile*, ClearBrowsingDataController*> ProfileControllerMap;
|
|
|
| +static base::LazyInstance<ProfileControllerMap> g_profile_controller_map(
|
| + base::LINKER_INITIALIZED);
|
| +
|
| } // namespace
|
|
|
| @implementation ClearBrowsingDataController
|
| @@ -74,7 +77,7 @@ typedef std::map<Profile*, ClearBrowsingDataController*> ProfileControllerMap;
|
| // 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()) {
|
| @@ -205,7 +208,7 @@ typedef std::map<Profile*, ClearBrowsingDataController*> ProfileControllerMap;
|
| }
|
|
|
| - (void)closeDialog {
|
| - 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);
|
|
|