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

Side by Side Diff: chrome/common/extensions/extension_permission_set.cc

Issue 10436015: Remove chrome.windows.* support for platform apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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/extension_permission_set.h" 5 #include "chrome/common/extensions/extension_permission_set.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 ExtensionPermissionMessage::kFullAccess, kFlagImpliesFullURLAccess | 360 ExtensionPermissionMessage::kFullAccess, kFlagImpliesFullURLAccess |
361 kFlagImpliesFullAccess | kFlagCannotBeOptional); 361 kFlagImpliesFullAccess | kFlagCannotBeOptional);
362 362
363 // Platform-app permissions. 363 // Platform-app permissions.
364 info->RegisterPermission( 364 info->RegisterPermission(
365 kSocket, "socket", 0, ExtensionPermissionMessage::kNone, 365 kSocket, "socket", 0, ExtensionPermissionMessage::kNone,
366 kFlagCannotBeOptional); 366 kFlagCannotBeOptional);
367 367
368 // Register aliases. 368 // Register aliases.
369 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); 369 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission);
370 // TODO(mihaip): Remove this alias for platform apps, and only give them
371 // access to the chrome.windows.* APIs, but not the chrome.tabs.* ones.
372 info->RegisterAlias("tabs", kWindowsPermission); 370 info->RegisterAlias("tabs", kWindowsPermission);
373 // TODO(mihaip): Should be removed for the M20 branch, see 371 // TODO(mihaip): Should be removed for the M20 branch, see
374 // http://crbug.com/120447 for more details. 372 // http://crbug.com/120447 for more details.
375 info->RegisterAlias("background", kTemporaryBackgroundAlias); 373 info->RegisterAlias("background", kTemporaryBackgroundAlias);
376 374
377 } 375 }
378 376
379 // 377 //
380 // ExtensionPermissionsInfo 378 // ExtensionPermissionsInfo
381 // 379 //
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 ExtensionOAuth2Scopes current_scopes = scopes(); 976 ExtensionOAuth2Scopes current_scopes = scopes();
979 ExtensionOAuth2Scopes new_scopes = permissions->scopes(); 977 ExtensionOAuth2Scopes new_scopes = permissions->scopes();
980 ExtensionOAuth2Scopes delta_scopes; 978 ExtensionOAuth2Scopes delta_scopes;
981 std::set_difference(new_scopes.begin(), new_scopes.end(), 979 std::set_difference(new_scopes.begin(), new_scopes.end(),
982 current_scopes.begin(), current_scopes.end(), 980 current_scopes.begin(), current_scopes.end(),
983 std::inserter(delta_scopes, delta_scopes.begin())); 981 std::inserter(delta_scopes, delta_scopes.begin()));
984 982
985 // We have less privileges if there are additional scopes present. 983 // We have less privileges if there are additional scopes present.
986 return !delta_scopes.empty(); 984 return !delta_scopes.empty();
987 } 985 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/windows.json ('k') | chrome/test/data/extensions/platform_apps/context_menu/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698