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

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

Issue 10659021: Move chrome.appWindow to chrome.app.window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased and resolved conflicts Created 8 years, 5 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/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 26 matching lines...) Expand all
37 return b != "com"; 37 return b != "com";
38 if (a == "org") 38 if (a == "org")
39 return b != "com" && b != "net"; 39 return b != "com" && b != "net";
40 return false; 40 return false;
41 } 41 }
42 42
43 // Names of API modules that can be used without listing it in the 43 // Names of API modules that can be used without listing it in the
44 // permissions section of the manifest. 44 // permissions section of the manifest.
45 const char* kNonPermissionModuleNames[] = { 45 const char* kNonPermissionModuleNames[] = {
46 "app", 46 "app",
47 "appWindow", 47 "app.window",
48 "browserAction", 48 "browserAction",
49 "devtools", 49 "devtools",
50 "events", 50 "events",
51 "extension", 51 "extension",
52 "i18n", 52 "i18n",
53 "omnibox", 53 "omnibox",
54 "pageAction", 54 "pageAction",
55 "pageActions", 55 "pageActions",
56 "permissions", 56 "permissions",
57 "runtime", 57 "runtime",
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 ExtensionOAuth2Scopes current_scopes = scopes(); 942 ExtensionOAuth2Scopes current_scopes = scopes();
943 ExtensionOAuth2Scopes new_scopes = permissions->scopes(); 943 ExtensionOAuth2Scopes new_scopes = permissions->scopes();
944 ExtensionOAuth2Scopes delta_scopes; 944 ExtensionOAuth2Scopes delta_scopes;
945 std::set_difference(new_scopes.begin(), new_scopes.end(), 945 std::set_difference(new_scopes.begin(), new_scopes.end(),
946 current_scopes.begin(), current_scopes.end(), 946 current_scopes.begin(), current_scopes.end(),
947 std::inserter(delta_scopes, delta_scopes.begin())); 947 std::inserter(delta_scopes, delta_scopes.begin()));
948 948
949 // We have less privileges if there are additional scopes present. 949 // We have less privileges if there are additional scopes present.
950 return !delta_scopes.empty(); 950 return !delta_scopes.empty();
951 } 951 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698