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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 last_session_exit_type_ = | 846 last_session_exit_type_ = |
847 SessionTypePrefValueToExitType(exit_type_pref_value); | 847 SessionTypePrefValueToExitType(exit_type_pref_value); |
848 } | 848 } |
849 // Mark the session as open. | 849 // Mark the session as open. |
850 prefs_->SetString(prefs::kSessionExitType, kPrefExitTypeCrashed); | 850 prefs_->SetString(prefs::kSessionExitType, kPrefExitTypeCrashed); |
851 // Force this to true in case we fallback and use it. | 851 // Force this to true in case we fallback and use it. |
852 // TODO(sky): remove this in a couple of releases (m28ish). | 852 // TODO(sky): remove this in a couple of releases (m28ish). |
853 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true); | 853 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true); |
854 | 854 |
855 #if defined(OS_ANDROID) && defined(FULL_SAFE_BROWSING) | 855 #if defined(OS_ANDROID) && defined(FULL_SAFE_BROWSING) |
856 // Force safe browsing to false in the case we need to roll back for users | 856 // Clear safe browsing setting in the case we need to roll back |
857 // enrolled in Finch trial before. | 857 // for users enrolled in Finch trial before. |
858 if (!SafeBrowsingService::IsEnabledByFieldTrial()) | 858 if (!SafeBrowsingService::IsEnabledByFieldTrial()) |
859 prefs_->SetBoolean(prefs::kSafeBrowsingEnabled, false); | 859 prefs_->ClearPref(prefs::kSafeBrowsingEnabled); |
860 #endif | 860 #endif |
861 | 861 |
862 g_browser_process->profile_manager()->InitProfileUserPrefs(this); | 862 g_browser_process->profile_manager()->InitProfileUserPrefs(this); |
863 | 863 |
864 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( | 864 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( |
865 this); | 865 this); |
866 | 866 |
867 DCHECK(!net_pref_observer_); | 867 DCHECK(!net_pref_observer_); |
868 { | 868 { |
869 TRACE_EVENT0("browser", "ProfileImpl::OnPrefsLoaded:NetPrefObserver") | 869 TRACE_EVENT0("browser", "ProfileImpl::OnPrefsLoaded:NetPrefObserver") |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 ProfileImpl::CreateDomainReliabilityMonitor() { | 1319 ProfileImpl::CreateDomainReliabilityMonitor() { |
1320 domain_reliability::DomainReliabilityService* service = | 1320 domain_reliability::DomainReliabilityService* service = |
1321 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1321 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1322 GetForBrowserContext(this); | 1322 GetForBrowserContext(this); |
1323 if (!service) | 1323 if (!service) |
1324 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1324 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1325 | 1325 |
1326 return service->CreateMonitor( | 1326 return service->CreateMonitor( |
1327 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1327 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
1328 } | 1328 } |
OLD | NEW |