| 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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 if (!extension_special_storage_policy_.get()) { | 743 if (!extension_special_storage_policy_.get()) { |
| 744 TRACE_EVENT0("browser", "ProfileImpl::GetExtensionSpecialStoragePolicy") | 744 TRACE_EVENT0("browser", "ProfileImpl::GetExtensionSpecialStoragePolicy") |
| 745 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy( | 745 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy( |
| 746 CookieSettings::Factory::GetForProfile(this).get()); | 746 CookieSettings::Factory::GetForProfile(this).get()); |
| 747 } | 747 } |
| 748 return extension_special_storage_policy_.get(); | 748 return extension_special_storage_policy_.get(); |
| 749 } | 749 } |
| 750 | 750 |
| 751 void ProfileImpl::OnPrefsLoaded(bool success) { | 751 void ProfileImpl::OnPrefsLoaded(bool success) { |
| 752 TRACE_EVENT0("browser", "ProfileImpl::OnPrefsLoaded") | 752 TRACE_EVENT0("browser", "ProfileImpl::OnPrefsLoaded") |
| 753 if (delegate_) |
| 754 delegate_->OnPrefsLoaded(this); |
| 755 |
| 753 if (!success) { | 756 if (!success) { |
| 754 if (delegate_) | 757 if (delegate_) |
| 755 delegate_->OnProfileCreated(this, false, false); | 758 delegate_->OnProfileCreated(this, false, false); |
| 756 return; | 759 return; |
| 757 } | 760 } |
| 758 | 761 |
| 759 // TODO(mirandac): remove migration code after 6 months (crbug.com/69995). | 762 // TODO(mirandac): remove migration code after 6 months (crbug.com/69995). |
| 760 if (g_browser_process->local_state()) | 763 if (g_browser_process->local_state()) |
| 761 chrome::MigrateBrowserPrefs(this, g_browser_process->local_state()); | 764 chrome::MigrateBrowserPrefs(this, g_browser_process->local_state()); |
| 762 // TODO(ivankr): remove cleanup code eventually (crbug.com/165672). | 765 // TODO(ivankr): remove cleanup code eventually (crbug.com/165672). |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1204 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
| 1202 #if defined(OS_CHROMEOS) | 1205 #if defined(OS_CHROMEOS) |
| 1203 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1206 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 1204 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1207 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 1205 g_browser_process->local_state()); | 1208 g_browser_process->local_state()); |
| 1206 } | 1209 } |
| 1207 #endif // defined(OS_CHROMEOS) | 1210 #endif // defined(OS_CHROMEOS) |
| 1208 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1211 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 1209 GetPrefs(), g_browser_process->local_state()); | 1212 GetPrefs(), g_browser_process->local_state()); |
| 1210 } | 1213 } |
| OLD | NEW |