Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 397343002: [Safe Browsing] Use right function to clear preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698