| 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 // Implementation of the Chrome Extensions Managed Mode API. | 5 // Implementation of the Chrome Extensions Managed Mode API. |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/managed_mode/managed_mode_api.h" | 7 #include "chrome/browser/extensions/api/managed_mode/managed_mode_api.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/json/json_writer.h" | 12 #include "base/json/json_writer.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/extensions/api/preference/preference_api_constants.h" | 14 #include "chrome/browser/extensions/api/preference/preference_api_constants.h" |
| 15 #include "chrome/browser/extensions/event_router.h" | 15 #include "chrome/browser/extensions/event_router.h" |
| 16 #include "chrome/browser/managed_mode.h" | 16 #include "chrome/browser/managed_mode/managed_mode.h" |
| 17 #include "chrome/browser/prefs/pref_service.h" | 17 #include "chrome/browser/prefs/pref_service.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/common/chrome_notification_types.h" | 19 #include "chrome/common/chrome_notification_types.h" |
| 20 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 21 #include "content/public/browser/notification_details.h" | 21 #include "content/public/browser/notification_details.h" |
| 22 | 22 |
| 23 #if defined(ENABLE_CONFIGURATION_POLICY) | 23 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 24 #include "chrome/browser/policy/managed_mode_policy_provider.h" | 24 #include "chrome/browser/policy/managed_mode_policy_provider.h" |
| 25 #endif | 25 #endif |
| 26 | 26 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 EXTENSION_FUNCTION_VALIDATE(args_->Get(1, &value)); | 123 EXTENSION_FUNCTION_VALIDATE(args_->Get(1, &value)); |
| 124 #if defined(ENABLE_CONFIGURATION_POLICY) | 124 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 125 policy::ManagedModePolicyProvider* policy_provider = | 125 policy::ManagedModePolicyProvider* policy_provider = |
| 126 profile_->GetManagedModePolicyProvider(); | 126 profile_->GetManagedModePolicyProvider(); |
| 127 policy_provider->SetPolicy(key, value); | 127 policy_provider->SetPolicy(key, value); |
| 128 #endif | 128 #endif |
| 129 return true; | 129 return true; |
| 130 } | 130 } |
| 131 | 131 |
| 132 } // namespace extensions | 132 } // namespace extensions |
| OLD | NEW |