Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1366)

Unified Diff: chrome/browser/extensions/permissions_updater.cc

Issue 9114036: Code generation for extensions api (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: windows path fix Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/permissions_updater.cc
diff --git a/chrome/browser/extensions/permissions_updater.cc b/chrome/browser/extensions/permissions_updater.cc
index 9fdc2a7408bc0c9e08ef9b9f08154416a6d8d99f..b15352a7161659726172d99a99b216514358e4e7 100644
--- a/chrome/browser/extensions/permissions_updater.cc
+++ b/chrome/browser/extensions/permissions_updater.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/extensions/api/permissions.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_messages.h"
@@ -20,7 +21,7 @@
#include "content/public/browser/render_process_host.h"
using content::RenderProcessHost;
-using extensions::permissions_api::PackPermissionsToValue;
+using extensions::permissions_api_helpers::PackPermissionSet;
namespace extensions {
@@ -96,7 +97,9 @@ void PermissionsUpdater::DispatchEvent(
return;
ListValue value;
- value.Append(PackPermissionsToValue(changed_permissions));
+ scoped_ptr<api::permissions::Permissions> permissions =
+ PackPermissionSet(changed_permissions);
+ value.Append(permissions->ToValue());
std::string json_value;
base::JSONWriter::Write(&value, false, &json_value);
profile_->GetExtensionEventRouter()->DispatchEventToExtension(
« no previous file with comments | « chrome/browser/extensions/api/permissions/permissions_api_helpers_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698