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

Side by Side Diff: chrome/common/extensions/permissions/api_permission.cc

Issue 10826156: Plumb invalidations from Tango to the extensions code for the Push Messaging API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android build Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/common/extensions/permissions/api_permission.h" 5 #include "chrome/common/extensions/permissions/api_permission.h"
6 6
7 #include "chrome/common/extensions/permissions/permissions_info.h" 7 #include "chrome/common/extensions/permissions/permissions_info.h"
8 #include "chrome/common/extensions/permissions/socket_permission.h" 8 #include "chrome/common/extensions/permissions/socket_permission.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // granted after the user has been shown a file chooser dialog and selected 280 // granted after the user has been shown a file chooser dialog and selected
281 // a file. Selecting the file is considered consent to read it. 281 // a file. Selecting the file is considered consent to read it.
282 { APIPermission::kFileSystem, "fileSystem" }, 282 { APIPermission::kFileSystem, "fileSystem" },
283 { APIPermission::kFileSystemWrite, "fileSystemWrite", kFlagNone, 283 { APIPermission::kFileSystemWrite, "fileSystemWrite", kFlagNone,
284 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_WRITE, 284 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_WRITE,
285 PermissionMessage::kFileSystemWrite }, 285 PermissionMessage::kFileSystemWrite },
286 { APIPermission::kMediaGalleriesAllGalleries, "mediaGalleriesAllGalleries", 286 { APIPermission::kMediaGalleriesAllGalleries, "mediaGalleriesAllGalleries",
287 kFlagCannotBeOptional, 287 kFlagCannotBeOptional,
288 IDS_EXTENSION_PROMPT_WARNING_MEDIA_GALLERIES_ALL_GALLERIES, 288 IDS_EXTENSION_PROMPT_WARNING_MEDIA_GALLERIES_ALL_GALLERIES,
289 PermissionMessage::kMediaGalleriesAllGalleries }, 289 PermissionMessage::kMediaGalleriesAllGalleries },
290 { APIPermission::kPushMessaging, "pushMessaging", kFlagCannotBeOptional },
290 }; 291 };
291 292
292 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) { 293 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(PermissionsToRegister); ++i) {
293 const PermissionRegistration& pr = PermissionsToRegister[i]; 294 const PermissionRegistration& pr = PermissionsToRegister[i];
294 info->RegisterPermission( 295 info->RegisterPermission(
295 pr.id, pr.name, pr.l10n_message_id, 296 pr.id, pr.name, pr.l10n_message_id,
296 pr.message_id ? pr.message_id : PermissionMessage::kNone, 297 pr.message_id ? pr.message_id : PermissionMessage::kNone,
297 pr.flags, 298 pr.flags,
298 pr.constructor); 299 pr.constructor);
299 } 300 }
300 301
301 // Register aliases. 302 // Register aliases.
302 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); 303 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission);
303 info->RegisterAlias("tabs", kWindowsPermission); 304 info->RegisterAlias("tabs", kWindowsPermission);
304 } 305 }
305 306
306 } // namespace extensions 307 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/permissions/api_permission.h ('k') | chrome/common/extensions/permissions/permission_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698