| Index: chrome/browser/profiles/profile_impl.cc
|
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
| index 0ebfc0157cce468c45c4a565b028ed89d4a2e452..b07507ec3d453e62117f2205d589610d80b140ac 100644
|
| --- a/chrome/browser/profiles/profile_impl.cc
|
| +++ b/chrome/browser/profiles/profile_impl.cc
|
| @@ -124,8 +124,10 @@ namespace {
|
| COMPILE_ASSERT(sizeof(ProfileImpl) <= 744u, profile_impl_size_unexpected);
|
| #endif
|
|
|
| +#if defined(ENABLE_SESSION_SERVICE)
|
| // Delay, in milliseconds, before we explicitly create the SessionService.
|
| static const int kCreateSessionServiceDelayMS = 500;
|
| +#endif
|
|
|
| // Text content of README file created in each profile directory. Both %s
|
| // placeholders must contain the product name. This is not localizable and hence
|
| @@ -233,9 +235,11 @@ ProfileImpl::ProfileImpl(const FilePath& path,
|
| DCHECK(!path.empty()) << "Using an empty path will attempt to write " <<
|
| "profile files to the root directory!";
|
|
|
| +#if defined(ENABLE_SESSION_SERVICE)
|
| create_session_service_timer_.Start(FROM_HERE,
|
| TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this,
|
| &ProfileImpl::EnsureSessionServiceCreated);
|
| +#endif
|
|
|
| // Determine if prefetch is enabled for this profile.
|
| // If not profile_manager is present, it means we are in a unittest.
|
| @@ -459,7 +463,9 @@ ProfileImpl::~ProfileImpl() {
|
| else if (session_restore_enabled_ && pref.type == SessionStartupPref::LAST)
|
| BrowserContext::SaveSessionState(this);
|
|
|
| +#if defined(ENABLE_SESSION_SERVICE)
|
| StopCreateSessionServiceTimer();
|
| +#endif
|
|
|
| // Remove pref observers
|
| pref_change_registrar_.RemoveAll();
|
| @@ -962,6 +968,7 @@ void ProfileImpl::Observe(int type,
|
| }
|
| }
|
|
|
| +#if defined(ENABLE_SESSION_SERVICE)
|
| void ProfileImpl::StopCreateSessionServiceTimer() {
|
| create_session_service_timer_.Stop();
|
| }
|
| @@ -969,6 +976,7 @@ void ProfileImpl::StopCreateSessionServiceTimer() {
|
| void ProfileImpl::EnsureSessionServiceCreated() {
|
| SessionServiceFactory::GetForProfile(this);
|
| }
|
| +#endif
|
|
|
| ChromeURLDataManager* ProfileImpl::GetChromeURLDataManager() {
|
| if (!chrome_url_data_manager_.get())
|
|
|