| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/profile.h" | 5 #include "chrome/browser/profile.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 created_theme_provider_(false), | 421 created_theme_provider_(false), |
| 422 start_time_(Time::Now()), | 422 start_time_(Time::Now()), |
| 423 spellchecker_(NULL), | 423 spellchecker_(NULL), |
| 424 shutdown_session_service_(false) { | 424 shutdown_session_service_(false) { |
| 425 DCHECK(!path.empty()) << "Using an empty path will attempt to write " << | 425 DCHECK(!path.empty()) << "Using an empty path will attempt to write " << |
| 426 "profile files to the root directory!"; | 426 "profile files to the root directory!"; |
| 427 create_session_service_timer_.Start( | 427 create_session_service_timer_.Start( |
| 428 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, | 428 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, |
| 429 &ProfileImpl::EnsureSessionServiceCreated); | 429 &ProfileImpl::EnsureSessionServiceCreated); |
| 430 | 430 |
| 431 extension_process_manager_.reset(new ExtensionProcessManager(this)); | |
| 432 | |
| 433 PrefService* prefs = GetPrefs(); | 431 PrefService* prefs = GetPrefs(); |
| 434 prefs->AddPrefObserver(prefs::kSpellCheckDictionary, this); | 432 prefs->AddPrefObserver(prefs::kSpellCheckDictionary, this); |
| 435 prefs->AddPrefObserver(prefs::kEnableSpellCheck, this); | 433 prefs->AddPrefObserver(prefs::kEnableSpellCheck, this); |
| 436 prefs->AddPrefObserver(prefs::kEnableAutoSpellCorrect, this); | 434 prefs->AddPrefObserver(prefs::kEnableAutoSpellCorrect, this); |
| 437 | 435 |
| 438 #ifdef CHROME_PERSONALIZATION | 436 #ifdef CHROME_PERSONALIZATION |
| 439 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableP13n)) | 437 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableP13n)) |
| 440 personalization_.reset(Personalization::CreateProfilePersonalization(this)); | 438 personalization_.reset(Personalization::CreateProfilePersonalization(this)); |
| 441 #endif | 439 #endif |
| 442 | 440 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 | 620 |
| 623 ExtensionsService* ProfileImpl::GetExtensionsService() { | 621 ExtensionsService* ProfileImpl::GetExtensionsService() { |
| 624 return extensions_service_.get(); | 622 return extensions_service_.get(); |
| 625 } | 623 } |
| 626 | 624 |
| 627 UserScriptMaster* ProfileImpl::GetUserScriptMaster() { | 625 UserScriptMaster* ProfileImpl::GetUserScriptMaster() { |
| 628 return user_script_master_.get(); | 626 return user_script_master_.get(); |
| 629 } | 627 } |
| 630 | 628 |
| 631 ExtensionProcessManager* ProfileImpl::GetExtensionProcessManager() { | 629 ExtensionProcessManager* ProfileImpl::GetExtensionProcessManager() { |
| 632 return extension_process_manager_.get(); | 630 return extensions_service_->extension_process_manager(); |
| 633 } | 631 } |
| 634 | 632 |
| 635 SSLHostState* ProfileImpl::GetSSLHostState() { | 633 SSLHostState* ProfileImpl::GetSSLHostState() { |
| 636 if (!ssl_host_state_.get()) | 634 if (!ssl_host_state_.get()) |
| 637 ssl_host_state_.reset(new SSLHostState()); | 635 ssl_host_state_.reset(new SSLHostState()); |
| 638 | 636 |
| 639 DCHECK(ssl_host_state_->CalledOnValidThread()); | 637 DCHECK(ssl_host_state_->CalledOnValidThread()); |
| 640 return ssl_host_state_.get(); | 638 return ssl_host_state_.get(); |
| 641 } | 639 } |
| 642 | 640 |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 | 1068 |
| 1071 void ProfileImpl::StopCreateSessionServiceTimer() { | 1069 void ProfileImpl::StopCreateSessionServiceTimer() { |
| 1072 create_session_service_timer_.Stop(); | 1070 create_session_service_timer_.Stop(); |
| 1073 } | 1071 } |
| 1074 | 1072 |
| 1075 #ifdef CHROME_PERSONALIZATION | 1073 #ifdef CHROME_PERSONALIZATION |
| 1076 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { | 1074 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { |
| 1077 return personalization_.get(); | 1075 return personalization_.get(); |
| 1078 } | 1076 } |
| 1079 #endif | 1077 #endif |
| OLD | NEW |