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

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

Issue 24153012: Fix cyclic dependency between ProfilePolicyConnector and PrefService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some includes and nits. Created 7 years, 3 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile( 394 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile(
395 this, force_immediate_policy_load); 395 this, force_immediate_policy_load);
396 #else 396 #else
397 cloud_policy_manager_ = 397 cloud_policy_manager_ =
398 policy::UserCloudPolicyManagerFactory::CreateForProfile( 398 policy::UserCloudPolicyManagerFactory::CreateForProfile(
399 this, force_immediate_policy_load); 399 this, force_immediate_policy_load);
400 #endif 400 #endif
401 #endif 401 #endif
402 profile_policy_connector_ = 402 profile_policy_connector_ =
403 policy::ProfilePolicyConnectorFactory::CreateForProfile( 403 policy::ProfilePolicyConnectorFactory::CreateForProfile(
404 this, force_immediate_policy_load, sequenced_task_runner); 404 this,
405 force_immediate_policy_load,
406 cloud_policy_manager_.get(),
407 sequenced_task_runner);
405 408
406 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS || 409 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS ||
407 create_mode == CREATE_MODE_SYNCHRONOUS); 410 create_mode == CREATE_MODE_SYNCHRONOUS);
408 bool async_prefs = create_mode == CREATE_MODE_ASYNCHRONOUS; 411 bool async_prefs = create_mode == CREATE_MODE_ASYNCHRONOUS;
409 412
410 #if defined(OS_CHROMEOS) 413 #if defined(OS_CHROMEOS)
411 if (chromeos::ProfileHelper::IsSigninProfile(this)) 414 if (chromeos::ProfileHelper::IsSigninProfile(this))
412 chrome::RegisterLoginProfilePrefs(pref_registry_.get()); 415 chrome::RegisterLoginProfilePrefs(pref_registry_.get());
413 else 416 else
414 #endif 417 #endif
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { 1190 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() {
1188 #if defined(OS_CHROMEOS) 1191 #if defined(OS_CHROMEOS)
1189 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 1192 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
1190 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 1193 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
1191 g_browser_process->local_state()); 1194 g_browser_process->local_state());
1192 } 1195 }
1193 #endif // defined(OS_CHROMEOS) 1196 #endif // defined(OS_CHROMEOS)
1194 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 1197 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
1195 GetPrefs(), g_browser_process->local_state()); 1198 GetPrefs(), g_browser_process->local_state());
1196 } 1199 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698