summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r--chrome/browser/profile.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 1a01523..505a528 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -663,14 +663,6 @@ ProfileImpl::ProfileImpl(const FilePath& path)
TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this,
&ProfileImpl::EnsureSessionServiceCreated);
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableExtensionTimelineApi)) {
- extension_devtools_manager_ = new ExtensionDevToolsManager(this);
- }
-
- extension_process_manager_.reset(new ExtensionProcessManager(this));
- extension_message_service_ = new ExtensionMessageService(this);
-
PrefService* prefs = GetPrefs();
prefs->AddPrefObserver(prefs::kSpellCheckDictionary, this);
prefs->AddPrefObserver(prefs::kEnableSpellCheck, this);
@@ -736,6 +728,14 @@ void ProfileImpl::InitExtensions() {
return; // Already initialized.
const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(
+ switches::kEnableExtensionTimelineApi)) {
+ extension_devtools_manager_ = new ExtensionDevToolsManager(this);
+ }
+
+ extension_process_manager_.reset(new ExtensionProcessManager(this));
+ extension_message_service_ = new ExtensionMessageService(this);
+
ExtensionErrorReporter::Init(true); // allow noisy errors.
FilePath script_dir; // Don't look for user scripts in any directory.
@@ -889,7 +889,8 @@ ProfileImpl::~ProfileImpl() {
// HistoryService first.
favicon_service_ = NULL;
- extension_message_service_->ProfileDestroyed();
+ if (extension_message_service_)
+ extension_message_service_->ProfileDestroyed();
if (extensions_service_)
extensions_service_->ProfileDestroyed();