| 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/extensions/permissions_updater.h" | 5 #include "chrome/browser/extensions/permissions_updater.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/extensions/extension_event_router.h" | 10 #include "chrome/browser/extensions/extension_event_router.h" |
| 11 #include "chrome/browser/extensions/extension_permissions_api_helpers.h" | 11 #include "chrome/browser/extensions/extension_permissions_api_helpers.h" |
| 12 #include "chrome/browser/extensions/extension_prefs.h" | 12 #include "chrome/browser/extensions/extension_prefs.h" |
| 13 #include "chrome/browser/extensions/extension_service.h" | 13 #include "chrome/browser/extensions/extension_service.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/common/chrome_notification_types.h" | 15 #include "chrome/common/chrome_notification_types.h" |
| 16 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
| 17 #include "chrome/common/extensions/extension_messages.h" | 17 #include "chrome/common/extensions/extension_messages.h" |
| 18 #include "chrome/common/extensions/extension_permission_set.h" | 18 #include "chrome/common/extensions/extension_permission_set.h" |
| 19 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
| 20 #include "content/public/browser/render_process_host.h" | 20 #include "content/public/browser/render_process_host.h" |
| 21 | 21 |
| 22 using content::RenderProcessHost; | 22 using content::RenderProcessHost; |
| 23 using extensions::permissions_api::PackPermissionsToValue; | 23 using extensions::permissions_api_helpers::PackPermissionsToValue; |
| 24 | 24 |
| 25 namespace extensions { | 25 namespace extensions { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 const char kOnAdded[] = "permissions.onAdded"; | 29 const char kOnAdded[] = "permissions.onAdded"; |
| 30 const char kOnRemoved[] = "permissions.onRemoved"; | 30 const char kOnRemoved[] = "permissions.onRemoved"; |
| 31 | 31 |
| 32 } | 32 } |
| 33 | 33 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 // Trigger the onAdded and onRemoved events in the extension. | 147 // Trigger the onAdded and onRemoved events in the extension. |
| 148 DispatchEvent(extension->id(), event_name, changed); | 148 DispatchEvent(extension->id(), event_name, changed); |
| 149 } | 149 } |
| 150 | 150 |
| 151 ExtensionPrefs* PermissionsUpdater::GetExtensionPrefs() { | 151 ExtensionPrefs* PermissionsUpdater::GetExtensionPrefs() { |
| 152 return profile_->GetExtensionService()->extension_prefs(); | 152 return profile_->GetExtensionService()->extension_prefs(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace extensions | 155 } // namespace extensions |
| OLD | NEW |