diff options
-rw-r--r-- | chrome/browser/browser_main.cc | 3 | ||||
-rw-r--r-- | chrome/browser/user_data_manager.cc | 5 | ||||
-rw-r--r-- | chrome/browser/user_data_manager.h | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index b492380..29d984e 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -309,7 +309,7 @@ int BrowserMain(const MainFunctionParams& parameters) { StatisticsRecorder statistics; // Initialize the shared instance of user data manager. - scoped_ptr<UserDataManager> user_data_manager(UserDataManager::Create()); + UserDataManager::Create(); // Try to create/load the profile. ProfileManager* profile_manager = browser_process->profile_manager(); @@ -546,3 +546,4 @@ int BrowserMain(const MainFunctionParams& parameters) { return result_code; } + diff --git a/chrome/browser/user_data_manager.cc b/chrome/browser/user_data_manager.cc index bc078db..554c53f 100644 --- a/chrome/browser/user_data_manager.cc +++ b/chrome/browser/user_data_manager.cc @@ -91,12 +91,11 @@ static const wchar_t kProfileFolderSeparator[] = L"-"; UserDataManager* UserDataManager::instance_ = NULL; // static -UserDataManager* UserDataManager::Create() { +void UserDataManager::Create() { DCHECK(!instance_); std::wstring user_data; PathService::Get(chrome::DIR_USER_DATA, &user_data); instance_ = new UserDataManager(user_data); - return instance_; } // static @@ -124,8 +123,6 @@ UserDataManager::UserDataManager(const std::wstring& user_data_root) } UserDataManager::~UserDataManager() { - if (instance_ == this) - instance_ = NULL; } // static diff --git a/chrome/browser/user_data_manager.h b/chrome/browser/user_data_manager.h index f688448..f5e4522 100644 --- a/chrome/browser/user_data_manager.h +++ b/chrome/browser/user_data_manager.h @@ -27,7 +27,7 @@ class UserDataManager { public: // Creates the shared instance of this class. This method is not thread-safe, // so the shared instance should be created on the main thread. - static UserDataManager* Create(); + static void Create(); // Returns the shared instance. CreateInstance must be called before callling // this method. |