| OLD | NEW |
| 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_command_line_pref_store.h> | 5 #include <chrome/browser/prefs/chrome_command_line_pref_store.h> |
| 6 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 6 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
| 22 #include "base/trace_event/trace_event.h" | 22 #include "base/trace_event/trace_event.h" |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
| 25 #include "chrome/browser/prefs/chrome_pref_model_associator_client.h" | 25 #include "chrome/browser/prefs/chrome_pref_model_associator_client.h" |
| 26 #include "chrome/browser/prefs/profile_pref_store_manager.h" | 26 #include "chrome/browser/prefs/profile_pref_store_manager.h" |
| 27 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
| 28 #include "chrome/browser/sync/glue/sync_start_util.h" | 28 #include "chrome/browser/sync/glue/sync_start_util.h" |
| 29 #include "chrome/browser/ui/profile_error_dialog.h" | 29 #include "chrome/browser/ui/profile_error_dialog.h" |
| 30 #include "chrome/common/chrome_constants.h" | 30 #include "chrome/common/chrome_constants.h" |
| 31 #include "chrome/common/features.h" |
| 31 #include "chrome/common/pref_names.h" | 32 #include "chrome/common/pref_names.h" |
| 32 #include "chrome/grit/browser_resources.h" | 33 #include "chrome/grit/browser_resources.h" |
| 33 #include "chrome/grit/chromium_strings.h" | 34 #include "chrome/grit/chromium_strings.h" |
| 34 #include "chrome/grit/generated_resources.h" | 35 #include "chrome/grit/generated_resources.h" |
| 35 #include "components/component_updater/pref_names.h" | 36 #include "components/component_updater/pref_names.h" |
| 36 #include "components/policy/core/browser/browser_policy_connector.h" | 37 #include "components/policy/core/browser/browser_policy_connector.h" |
| 37 #include "components/policy/core/browser/configuration_policy_pref_store.h" | 38 #include "components/policy/core/browser/configuration_policy_pref_store.h" |
| 38 #include "components/pref_registry/pref_registry_syncable.h" | 39 #include "components/pref_registry/pref_registry_syncable.h" |
| 39 #include "components/prefs/default_pref_store.h" | 40 #include "components/prefs/default_pref_store.h" |
| 40 #include "components/prefs/json_pref_store.h" | 41 #include "components/prefs/json_pref_store.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 57 #include "components/user_prefs/tracked/pref_names.h" | 58 #include "components/user_prefs/tracked/pref_names.h" |
| 58 #include "content/public/browser/browser_context.h" | 59 #include "content/public/browser/browser_context.h" |
| 59 #include "content/public/browser/browser_thread.h" | 60 #include "content/public/browser/browser_thread.h" |
| 60 #include "sql/error_delegate_util.h" | 61 #include "sql/error_delegate_util.h" |
| 61 #include "ui/base/resource/resource_bundle.h" | 62 #include "ui/base/resource/resource_bundle.h" |
| 62 | 63 |
| 63 #if defined(ENABLE_EXTENSIONS) | 64 #if defined(ENABLE_EXTENSIONS) |
| 64 #include "extensions/browser/pref_names.h" | 65 #include "extensions/browser/pref_names.h" |
| 65 #endif | 66 #endif |
| 66 | 67 |
| 67 #if defined(ENABLE_SUPERVISED_USERS) | 68 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 68 #include "chrome/browser/supervised_user/supervised_user_pref_store.h" | 69 #include "chrome/browser/supervised_user/supervised_user_pref_store.h" |
| 69 #endif | 70 #endif |
| 70 | 71 |
| 71 #if defined(OS_WIN) | 72 #if defined(OS_WIN) |
| 72 #include "base/win/win_util.h" | 73 #include "base/win/win_util.h" |
| 73 #if defined(ENABLE_RLZ) | 74 #if defined(ENABLE_RLZ) |
| 74 #include "rlz/lib/machine_id.h" | 75 #include "rlz/lib/machine_id.h" |
| 75 #endif // defined(ENABLE_RLZ) | 76 #endif // defined(ENABLE_RLZ) |
| 76 #endif // defined(OS_WIN) | 77 #endif // defined(OS_WIN) |
| 77 | 78 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 policy::PolicyService* policy_service, | 422 policy::PolicyService* policy_service, |
| 422 SupervisedUserSettingsService* supervised_user_settings, | 423 SupervisedUserSettingsService* supervised_user_settings, |
| 423 scoped_refptr<PersistentPrefStore> user_pref_store, | 424 scoped_refptr<PersistentPrefStore> user_pref_store, |
| 424 const scoped_refptr<PrefStore>& extension_prefs, | 425 const scoped_refptr<PrefStore>& extension_prefs, |
| 425 bool async) { | 426 bool async) { |
| 426 policy::BrowserPolicyConnector* policy_connector = | 427 policy::BrowserPolicyConnector* policy_connector = |
| 427 g_browser_process->browser_policy_connector(); | 428 g_browser_process->browser_policy_connector(); |
| 428 factory->SetManagedPolicies(policy_service, policy_connector); | 429 factory->SetManagedPolicies(policy_service, policy_connector); |
| 429 factory->SetRecommendedPolicies(policy_service, policy_connector); | 430 factory->SetRecommendedPolicies(policy_service, policy_connector); |
| 430 | 431 |
| 431 #if defined(ENABLE_SUPERVISED_USERS) | 432 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 432 if (supervised_user_settings) { | 433 if (supervised_user_settings) { |
| 433 scoped_refptr<PrefStore> supervised_user_prefs = make_scoped_refptr( | 434 scoped_refptr<PrefStore> supervised_user_prefs = make_scoped_refptr( |
| 434 new SupervisedUserPrefStore(supervised_user_settings)); | 435 new SupervisedUserPrefStore(supervised_user_settings)); |
| 435 DCHECK(async || supervised_user_prefs->IsInitializationComplete()); | 436 DCHECK(async || supervised_user_prefs->IsInitializationComplete()); |
| 436 factory->set_supervised_user_prefs(supervised_user_prefs); | 437 factory->set_supervised_user_prefs(supervised_user_prefs); |
| 437 } | 438 } |
| 438 #endif | 439 #endif |
| 439 | 440 |
| 440 factory->set_async(async); | 441 factory->set_async(async); |
| 441 factory->set_extension_prefs(extension_prefs); | 442 factory->set_extension_prefs(extension_prefs); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 | 540 |
| 540 void ClearResetTime(Profile* profile) { | 541 void ClearResetTime(Profile* profile) { |
| 541 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); | 542 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); |
| 542 } | 543 } |
| 543 | 544 |
| 544 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 545 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 545 ProfilePrefStoreManager::RegisterProfilePrefs(registry); | 546 ProfilePrefStoreManager::RegisterProfilePrefs(registry); |
| 546 } | 547 } |
| 547 | 548 |
| 548 } // namespace chrome_prefs | 549 } // namespace chrome_prefs |
| OLD | NEW |