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

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

Issue 10310182: Hack to restrict runtime API to dev channel rather than experimental. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: docs Created 8 years, 7 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 const char* kNonPermissionModuleNames[] = { 44 const char* kNonPermissionModuleNames[] = {
45 "app", 45 "app",
46 "browserAction", 46 "browserAction",
47 "devtools", 47 "devtools",
48 "extension", 48 "extension",
49 "i18n", 49 "i18n",
50 "omnibox", 50 "omnibox",
51 "pageAction", 51 "pageAction",
52 "pageActions", 52 "pageActions",
53 "permissions", 53 "permissions",
54 "runtime",
54 "test", 55 "test",
55 "types" 56 "types"
56 }; 57 };
57 const size_t kNumNonPermissionModuleNames = 58 const size_t kNumNonPermissionModuleNames =
58 arraysize(kNonPermissionModuleNames); 59 arraysize(kNonPermissionModuleNames);
59 60
60 // Names of functions (within modules requiring permissions) that can be used 61 // Names of functions (within modules requiring permissions) that can be used
61 // without asking for the module permission. In other words, functions you can 62 // without asking for the module permission. In other words, functions you can
62 // use with no permissions specified. 63 // use with no permissions specified.
63 const char* kNonPermissionFunctionNames[] = { 64 const char* kNonPermissionFunctionNames[] = {
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 ExtensionOAuth2Scopes current_scopes = scopes(); 963 ExtensionOAuth2Scopes current_scopes = scopes();
963 ExtensionOAuth2Scopes new_scopes = permissions->scopes(); 964 ExtensionOAuth2Scopes new_scopes = permissions->scopes();
964 ExtensionOAuth2Scopes delta_scopes; 965 ExtensionOAuth2Scopes delta_scopes;
965 std::set_difference(new_scopes.begin(), new_scopes.end(), 966 std::set_difference(new_scopes.begin(), new_scopes.end(),
966 current_scopes.begin(), current_scopes.end(), 967 current_scopes.begin(), current_scopes.end(),
967 std::inserter(delta_scopes, delta_scopes.begin())); 968 std::inserter(delta_scopes, delta_scopes.begin()));
968 969
969 // We have less privileges if there are additional scopes present. 970 // We have less privileges if there are additional scopes present.
970 return !delta_scopes.empty(); 971 return !delta_scopes.empty();
971 } 972 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/common/extensions_api_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698