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

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

Issue 23868042: Mark supervised profiles as such immediately when they're created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 7 years, 2 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
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 "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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_browsertest.cc ('k') | chrome/browser/profiles/profile_info_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698