OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/profiles/profile_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 start_time_(Time::Now()), | 305 start_time_(Time::Now()), |
306 #if defined(OS_WIN) | 306 #if defined(OS_WIN) |
307 checked_instant_promo_(false), | 307 checked_instant_promo_(false), |
308 #endif | 308 #endif |
309 delegate_(delegate) { | 309 delegate_(delegate) { |
310 DCHECK(!path.empty()) << "Using an empty path will attempt to write " << | 310 DCHECK(!path.empty()) << "Using an empty path will attempt to write " << |
311 "profile files to the root directory!"; | 311 "profile files to the root directory!"; |
312 | 312 |
313 create_session_service_timer_.Start( | 313 create_session_service_timer_.Start( |
314 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, | 314 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, |
315 &ProfileImpl::EnsureSessionServiceCreated); | 315 &ProfileImpl::EnsureSessionServiceCreated, FROM_HERE); |
316 | 316 |
317 if (delegate_) { | 317 if (delegate_) { |
318 prefs_.reset(PrefService::CreatePrefService( | 318 prefs_.reset(PrefService::CreatePrefService( |
319 GetPrefFilePath(), | 319 GetPrefFilePath(), |
320 new ExtensionPrefStore(GetExtensionPrefValueMap(), false), | 320 new ExtensionPrefStore(GetExtensionPrefValueMap(), false), |
321 true)); | 321 true)); |
322 // Wait for the notifcation that prefs has been loaded (successfully or | 322 // Wait for the notifcation that prefs has been loaded (successfully or |
323 // not). | 323 // not). |
324 registrar_.Add(this, chrome::NOTIFICATION_PREF_INITIALIZATION_COMPLETED, | 324 registrar_.Add(this, chrome::NOTIFICATION_PREF_INITIALIZATION_COMPLETED, |
325 Source<PrefService>(prefs_.get())); | 325 Source<PrefService>(prefs_.get())); |
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1726 #endif | 1726 #endif |
1727 } | 1727 } |
1728 return prerender_manager_.get(); | 1728 return prerender_manager_.get(); |
1729 } | 1729 } |
1730 | 1730 |
1731 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() { | 1731 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() { |
1732 if (!spellcheck_profile_.get()) | 1732 if (!spellcheck_profile_.get()) |
1733 spellcheck_profile_.reset(new SpellCheckProfile()); | 1733 spellcheck_profile_.reset(new SpellCheckProfile()); |
1734 return spellcheck_profile_.get(); | 1734 return spellcheck_profile_.get(); |
1735 } | 1735 } |
OLD | NEW |