| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "extensions/browser/test_management_policy.h" | 5 #include "extensions/browser/test_management_policy.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 | 8 |
| 9 namespace extensions { | 9 namespace extensions { |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 void TestManagementPolicyProvider::SetDisableReason( | 34 void TestManagementPolicyProvider::SetDisableReason( |
| 35 Extension::DisableReason reason) { | 35 Extension::DisableReason reason) { |
| 36 disable_reason_ = reason; | 36 disable_reason_ = reason; |
| 37 } | 37 } |
| 38 | 38 |
| 39 std::string TestManagementPolicyProvider::GetDebugPolicyProviderName() const { | 39 std::string TestManagementPolicyProvider::GetDebugPolicyProviderName() const { |
| 40 return "the test management policy provider"; | 40 return "the test management policy provider"; |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool TestManagementPolicyProvider::UserMayLoad(const Extension* extension, | 43 bool TestManagementPolicyProvider::UserMayLoad(const Extension* extension, |
| 44 int install_flags, |
| 44 base::string16* error) const { | 45 base::string16* error) const { |
| 45 if (error && !may_load_) | 46 if (error && !may_load_) |
| 46 *error = error_message_; | 47 *error = error_message_; |
| 47 return may_load_; | 48 return may_load_; |
| 48 } | 49 } |
| 49 | 50 |
| 50 bool TestManagementPolicyProvider::UserMayModifySettings( | 51 bool TestManagementPolicyProvider::UserMayModifySettings( |
| 51 const Extension* extension, base::string16* error) const { | 52 const Extension* extension, base::string16* error) const { |
| 52 if (error && !may_modify_status_) | 53 if (error && !may_modify_status_) |
| 53 *error = error_message_; | 54 *error = error_message_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 70 if (error) | 71 if (error) |
| 71 *error = error_message_; | 72 *error = error_message_; |
| 72 if (reason) | 73 if (reason) |
| 73 *reason = disable_reason_; | 74 *reason = disable_reason_; |
| 74 } | 75 } |
| 75 return must_remain_disabled_; | 76 return must_remain_disabled_; |
| 76 } | 77 } |
| 77 | 78 |
| 78 | 79 |
| 79 } // namespace extensions | 80 } // namespace extensions |
| OLD | NEW |