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

Side by Side Diff: chrome/browser/prefs/chrome_pref_service_factory.cc

Issue 938303003: Add more checks to investigate SupervisedUserPrefStore crash at startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 10 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
« 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/prefs/chrome_pref_service_factory.h" 5 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 policy::POLICY_LEVEL_MANDATORY))); 434 policy::POLICY_LEVEL_MANDATORY)));
435 factory->set_recommended_prefs( 435 factory->set_recommended_prefs(
436 make_scoped_refptr(new ConfigurationPolicyPrefStore( 436 make_scoped_refptr(new ConfigurationPolicyPrefStore(
437 policy_service, 437 policy_service,
438 g_browser_process->browser_policy_connector()->GetHandlerList(), 438 g_browser_process->browser_policy_connector()->GetHandlerList(),
439 policy::POLICY_LEVEL_RECOMMENDED))); 439 policy::POLICY_LEVEL_RECOMMENDED)));
440 #endif // ENABLE_CONFIGURATION_POLICY 440 #endif // ENABLE_CONFIGURATION_POLICY
441 441
442 #if defined(ENABLE_SUPERVISED_USERS) 442 #if defined(ENABLE_SUPERVISED_USERS)
443 if (supervised_user_settings) { 443 if (supervised_user_settings) {
444 factory->set_supervised_user_prefs( 444 scoped_refptr<PrefStore> supervised_user_prefs = make_scoped_refptr(
445 make_scoped_refptr( 445 new SupervisedUserPrefStore(supervised_user_settings));
446 new SupervisedUserPrefStore(supervised_user_settings))); 446 // TODO(bauerb): Temporary CHECK while investigating
447 // https://crbug.com/425785. Remove when that bug is fixed.
448 CHECK(async || supervised_user_prefs->IsInitializationComplete());
449 factory->set_supervised_user_prefs(supervised_user_prefs);
447 } 450 }
448 #endif 451 #endif
449 452
450 factory->set_async(async); 453 factory->set_async(async);
451 factory->set_extension_prefs(extension_prefs); 454 factory->set_extension_prefs(extension_prefs);
452 factory->set_command_line_prefs(make_scoped_refptr( 455 factory->set_command_line_prefs(make_scoped_refptr(
453 new CommandLinePrefStore(base::CommandLine::ForCurrentProcess()))); 456 new CommandLinePrefStore(base::CommandLine::ForCurrentProcess())));
454 factory->set_read_error_callback(base::Bind(&HandleReadError)); 457 factory->set_read_error_callback(base::Bind(&HandleReadError));
455 factory->set_user_prefs(user_pref_store); 458 factory->set_user_prefs(user_pref_store);
456 } 459 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 572
570 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 573 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
571 ProfilePrefStoreManager::RegisterProfilePrefs(registry); 574 ProfilePrefStoreManager::RegisterProfilePrefs(registry);
572 } 575 }
573 576
574 void RegisterPrefs(PrefRegistrySimple* registry) { 577 void RegisterPrefs(PrefRegistrySimple* registry) {
575 ProfilePrefStoreManager::RegisterPrefs(registry); 578 ProfilePrefStoreManager::RegisterPrefs(registry);
576 } 579 }
577 580
578 } // namespace chrome_prefs 581 } // namespace chrome_prefs
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