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

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

Issue 2714493002: Load DeviceLocalAccount policy and DeviceSettings immediately on restore after Chrome crash. (Closed)
Patch Set: wrap Validator in unique_ptr Created 3 years, 9 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #include "content/public/common/page_zoom.h" 116 #include "content/public/common/page_zoom.h"
117 #include "extensions/features/features.h" 117 #include "extensions/features/features.h"
118 #include "ppapi/features/features.h" 118 #include "ppapi/features/features.h"
119 #include "printing/features/features.h" 119 #include "printing/features/features.h"
120 #include "ui/base/l10n/l10n_util.h" 120 #include "ui/base/l10n/l10n_util.h"
121 121
122 #if defined(OS_CHROMEOS) 122 #if defined(OS_CHROMEOS)
123 #include "chrome/browser/chromeos/locale_change_guard.h" 123 #include "chrome/browser/chromeos/locale_change_guard.h"
124 #include "chrome/browser/chromeos/preferences.h" 124 #include "chrome/browser/chromeos/preferences.h"
125 #include "chrome/browser/chromeos/profiles/profile_helper.h" 125 #include "chrome/browser/chromeos/profiles/profile_helper.h"
126 #include "chrome/browser/chromeos/settings/device_settings_service.h"
126 #include "components/user_manager/user_manager.h" 127 #include "components/user_manager/user_manager.h"
127 #endif 128 #endif
128 129
129 #if BUILDFLAG(ENABLE_BACKGROUND) 130 #if BUILDFLAG(ENABLE_BACKGROUND)
130 #include "chrome/browser/background/background_mode_manager.h" 131 #include "chrome/browser/background/background_mode_manager.h"
131 #endif 132 #endif
132 133
133 #if defined(OS_CHROMEOS) 134 #if defined(OS_CHROMEOS)
134 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 135 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
135 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" 136 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 433
433 // If we are creating the profile synchronously, then we should load the 434 // If we are creating the profile synchronously, then we should load the
434 // policy data immediately. 435 // policy data immediately.
435 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS); 436 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS);
436 policy::BrowserPolicyConnector* connector = 437 policy::BrowserPolicyConnector* connector =
437 g_browser_process->browser_policy_connector(); 438 g_browser_process->browser_policy_connector();
438 schema_registry_service_ = 439 schema_registry_service_ =
439 policy::SchemaRegistryServiceFactory::CreateForContext( 440 policy::SchemaRegistryServiceFactory::CreateForContext(
440 this, connector->GetChromeSchema(), connector->GetSchemaRegistry()); 441 this, connector->GetChromeSchema(), connector->GetSchemaRegistry());
441 #if defined(OS_CHROMEOS) 442 #if defined(OS_CHROMEOS)
443 if (force_immediate_policy_load)
444 chromeos::DeviceSettingsService::Get()->LoadImmediately();
442 configuration_policy_provider_ = 445 configuration_policy_provider_ =
443 policy::UserPolicyManagerFactoryChromeOS::CreateForProfile( 446 policy::UserPolicyManagerFactoryChromeOS::CreateForProfile(
444 this, force_immediate_policy_load, sequenced_task_runner); 447 this, force_immediate_policy_load, sequenced_task_runner);
445 #else 448 #else
446 configuration_policy_provider_ = 449 configuration_policy_provider_ =
447 policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext( 450 policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext(
448 this, force_immediate_policy_load, sequenced_task_runner, 451 this, force_immediate_policy_load, sequenced_task_runner,
449 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), 452 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
450 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 453 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
451 #endif 454 #endif
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { 1292 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) {
1290 domain_reliability::DomainReliabilityService* service = 1293 domain_reliability::DomainReliabilityService* service =
1291 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1294 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1292 GetForBrowserContext(this); 1295 GetForBrowserContext(this);
1293 if (!service) 1296 if (!service)
1294 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); 1297 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>();
1295 1298
1296 return service->CreateMonitor( 1299 return service->CreateMonitor(
1297 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 1300 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
1298 } 1301 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/profile_policy_connector_unittest.cc ('k') | chromeos/dbus/fake_session_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698