| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/extensions/api/settings_private/prefs_util.h" | 5 #include "chrome/browser/extensions/api/settings_private/prefs_util.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/extensions/chrome_extension_function.h" | 9 #include "chrome/browser/extensions/chrome_extension_function.h" |
| 10 #include "chrome/browser/extensions/settings_api_helpers.h" | 10 #include "chrome/browser/extensions/settings_api_helpers.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "extensions/browser/management_policy.h" | 32 #include "extensions/browser/management_policy.h" |
| 33 #include "extensions/common/extension.h" | 33 #include "extensions/common/extension.h" |
| 34 | 34 |
| 35 #if defined(OS_CHROMEOS) | 35 #if defined(OS_CHROMEOS) |
| 36 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" | 36 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
| 37 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" | 37 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" |
| 38 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 38 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 39 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 39 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 40 #include "chrome/browser/chromeos/settings/cros_settings.h" | 40 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 41 #include "chromeos/settings/cros_settings_names.h" | 41 #include "chromeos/settings/cros_settings_names.h" |
| 42 #include "ui/chromeos/events/pref_names.h" |
| 42 #endif | 43 #endif |
| 43 | 44 |
| 44 namespace { | 45 namespace { |
| 45 | 46 |
| 46 #if defined(OS_CHROMEOS) | 47 #if defined(OS_CHROMEOS) |
| 47 bool IsPrivilegedCrosSetting(const std::string& pref_name) { | 48 bool IsPrivilegedCrosSetting(const std::string& pref_name) { |
| 48 if (!chromeos::CrosSettings::IsCrosSettings(pref_name)) | 49 if (!chromeos::CrosSettings::IsCrosSettings(pref_name)) |
| 49 return false; | 50 return false; |
| 50 // kSystemTimezone should be changeable by all users. | 51 // kSystemTimezone should be changeable by all users. |
| 51 if (pref_name == chromeos::kSystemTimezone) | 52 if (pref_name == chromeos::kSystemTimezone) |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 ExtensionPrefValueMapFactory::GetForBrowserContext(profile_) | 751 ExtensionPrefValueMapFactory::GetForBrowserContext(profile_) |
| 751 ->GetExtensionControllingPref(pref_object.key); | 752 ->GetExtensionControllingPref(pref_object.key); |
| 752 if (extension_id.empty()) | 753 if (extension_id.empty()) |
| 753 return nullptr; | 754 return nullptr; |
| 754 | 755 |
| 755 return ExtensionRegistry::Get(profile_)->GetExtensionById( | 756 return ExtensionRegistry::Get(profile_)->GetExtensionById( |
| 756 extension_id, ExtensionRegistry::ENABLED); | 757 extension_id, ExtensionRegistry::ENABLED); |
| 757 } | 758 } |
| 758 | 759 |
| 759 } // namespace extensions | 760 } // namespace extensions |
| OLD | NEW |