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

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

Issue 9617010: Move chrome.downloads out of experimental to dev (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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 info->RegisterPermission( 186 info->RegisterPermission(
187 kClipboardWrite, "clipboardWrite", 0, 187 kClipboardWrite, "clipboardWrite", 0,
188 ExtensionPermissionMessage::kNone, kFlagNone); 188 ExtensionPermissionMessage::kNone, kFlagNone);
189 info->RegisterPermission( 189 info->RegisterPermission(
190 kDeclarative, "declarative", 0, 190 kDeclarative, "declarative", 0,
191 ExtensionPermissionMessage::kNone, kFlagNone); 191 ExtensionPermissionMessage::kNone, kFlagNone);
192 info->RegisterPermission( 192 info->RegisterPermission(
193 kDeclarativeWebRequest, "declarativeWebRequest", 0, 193 kDeclarativeWebRequest, "declarativeWebRequest", 0,
194 ExtensionPermissionMessage::kNone, kFlagNone); 194 ExtensionPermissionMessage::kNone, kFlagNone);
195 info->RegisterPermission( 195 info->RegisterPermission(
196 kDownloads, "downloads", IDS_EXTENSION_PROMPT_WARNING_DOWNLOADS,
197 ExtensionPermissionMessage::kDownloads, kFlagNone);
198 info->RegisterPermission(
196 kExperimental, "experimental", 0, 199 kExperimental, "experimental", 0,
197 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional); 200 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional);
198 info->RegisterPermission( 201 info->RegisterPermission(
199 kGeolocation, "geolocation", IDS_EXTENSION_PROMPT_WARNING_GEOLOCATION, 202 kGeolocation, "geolocation", IDS_EXTENSION_PROMPT_WARNING_GEOLOCATION,
200 ExtensionPermissionMessage::kGeolocation, 203 ExtensionPermissionMessage::kGeolocation,
201 kFlagCannotBeOptional); 204 kFlagCannotBeOptional);
202 info->RegisterPermission( 205 info->RegisterPermission(
203 kNotification, "notifications", 0, 206 kNotification, "notifications", 0,
204 ExtensionPermissionMessage::kNone, kFlagNone); 207 ExtensionPermissionMessage::kNone, kFlagNone);
205 info->RegisterPermission( 208 info->RegisterPermission(
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 ExtensionOAuth2Scopes current_scopes = scopes(); 982 ExtensionOAuth2Scopes current_scopes = scopes();
980 ExtensionOAuth2Scopes new_scopes = permissions->scopes(); 983 ExtensionOAuth2Scopes new_scopes = permissions->scopes();
981 ExtensionOAuth2Scopes delta_scopes; 984 ExtensionOAuth2Scopes delta_scopes;
982 std::set_difference(new_scopes.begin(), new_scopes.end(), 985 std::set_difference(new_scopes.begin(), new_scopes.end(),
983 current_scopes.begin(), current_scopes.end(), 986 current_scopes.begin(), current_scopes.end(),
984 std::inserter(delta_scopes, delta_scopes.begin())); 987 std::inserter(delta_scopes, delta_scopes.begin()));
985 988
986 // We have less privileges if there are additional scopes present. 989 // We have less privileges if there are additional scopes present.
987 return !delta_scopes.empty(); 990 return !delta_scopes.empty();
988 } 991 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698