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

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

Issue 10598006: Browser tag shim (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Register hosted and packaged app permissions. 205 // Register hosted and packaged app permissions.
206 { kAppNotifications, "appNotifications" }, 206 { kAppNotifications, "appNotifications" },
207 207
208 // Register extension permissions. 208 // Register extension permissions.
209 { kActiveTab, "activeTab" }, 209 { kActiveTab, "activeTab" },
210 { kAlarms, "alarms" }, 210 { kAlarms, "alarms" },
211 { kAppWindow, "appWindow" }, 211 { kAppWindow, "appWindow" },
212 { kBookmark, "bookmarks", kFlagNone, 212 { kBookmark, "bookmarks", kFlagNone,
213 IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS, 213 IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS,
214 ExtensionPermissionMessage::kBookmarks }, 214 ExtensionPermissionMessage::kBookmarks },
215 { kBrowserTag, "browserTag", kFlagCannotBeOptional },
215 { kBrowsingData, "browsingData" }, 216 { kBrowsingData, "browsingData" },
216 { kContentSettings, "contentSettings", kFlagNone, 217 { kContentSettings, "contentSettings", kFlagNone,
217 IDS_EXTENSION_PROMPT_WARNING_CONTENT_SETTINGS, 218 IDS_EXTENSION_PROMPT_WARNING_CONTENT_SETTINGS,
218 ExtensionPermissionMessage::kContentSettings }, 219 ExtensionPermissionMessage::kContentSettings },
219 { kContextMenus, "contextMenus" }, 220 { kContextMenus, "contextMenus" },
220 { kCookie, "cookies" }, 221 { kCookie, "cookies" },
221 { kFileBrowserHandler, "fileBrowserHandler", kFlagCannotBeOptional }, 222 { kFileBrowserHandler, "fileBrowserHandler", kFlagCannotBeOptional },
222 { kFileSystem, "fileSystem" }, 223 { kFileSystem, "fileSystem" },
223 { kHistory, "history", kFlagNone, 224 { kHistory, "history", kFlagNone,
224 IDS_EXTENSION_PROMPT_WARNING_BROWSING_HISTORY, 225 IDS_EXTENSION_PROMPT_WARNING_BROWSING_HISTORY,
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 ExtensionOAuth2Scopes current_scopes = scopes(); 943 ExtensionOAuth2Scopes current_scopes = scopes();
943 ExtensionOAuth2Scopes new_scopes = permissions->scopes(); 944 ExtensionOAuth2Scopes new_scopes = permissions->scopes();
944 ExtensionOAuth2Scopes delta_scopes; 945 ExtensionOAuth2Scopes delta_scopes;
945 std::set_difference(new_scopes.begin(), new_scopes.end(), 946 std::set_difference(new_scopes.begin(), new_scopes.end(),
946 current_scopes.begin(), current_scopes.end(), 947 current_scopes.begin(), current_scopes.end(),
947 std::inserter(delta_scopes, delta_scopes.begin())); 948 std::inserter(delta_scopes, delta_scopes.begin()));
948 949
949 // We have less privileges if there are additional scopes present. 950 // We have less privileges if there are additional scopes present.
950 return !delta_scopes.empty(); 951 return !delta_scopes.empty();
951 } 952 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698