| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 } else { | 776 } else { |
| 777 last_session_exit_type_ = | 777 last_session_exit_type_ = |
| 778 SessionTypePrefValueToExitType(exit_type_pref_value); | 778 SessionTypePrefValueToExitType(exit_type_pref_value); |
| 779 } | 779 } |
| 780 // Mark the session as open. | 780 // Mark the session as open. |
| 781 prefs_->SetString(prefs::kSessionExitType, kPrefExitTypeCrashed); | 781 prefs_->SetString(prefs::kSessionExitType, kPrefExitTypeCrashed); |
| 782 // Force this to true in case we fallback and use it. | 782 // Force this to true in case we fallback and use it. |
| 783 // TODO(sky): remove this in a couple of releases (m28ish). | 783 // TODO(sky): remove this in a couple of releases (m28ish). |
| 784 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true); | 784 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true); |
| 785 | 785 |
| 786 g_browser_process->profile_manager()->InitProfileUserPrefs(this); |
| 787 |
| 786 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( | 788 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( |
| 787 this); | 789 this); |
| 788 | 790 |
| 789 DCHECK(!net_pref_observer_); | 791 DCHECK(!net_pref_observer_); |
| 790 { | 792 { |
| 791 TRACE_EVENT0("browser", "ProfileImpl::OnPrefsLoaded:NetPrefObserver") | 793 TRACE_EVENT0("browser", "ProfileImpl::OnPrefsLoaded:NetPrefObserver") |
| 792 net_pref_observer_.reset(new NetPrefObserver( | 794 net_pref_observer_.reset(new NetPrefObserver( |
| 793 prefs_.get(), | 795 prefs_.get(), |
| 794 prerender::PrerenderManagerFactory::GetForProfile(this), | 796 prerender::PrerenderManagerFactory::GetForProfile(this), |
| 795 predictor_)); | 797 predictor_)); |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1209 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1211 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
| 1210 #if defined(OS_CHROMEOS) | 1212 #if defined(OS_CHROMEOS) |
| 1211 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1213 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 1212 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1214 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 1213 g_browser_process->local_state()); | 1215 g_browser_process->local_state()); |
| 1214 } | 1216 } |
| 1215 #endif // defined(OS_CHROMEOS) | 1217 #endif // defined(OS_CHROMEOS) |
| 1216 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1218 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 1217 GetPrefs(), g_browser_process->local_state()); | 1219 GetPrefs(), g_browser_process->local_state()); |
| 1218 } | 1220 } |
| OLD | NEW |