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

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

Issue 10257006: Move Declarative Web Request API out of experimental and make it a feature (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 info->RegisterPermission( 178 info->RegisterPermission(
179 kBackground, "background", 0, 179 kBackground, "background", 0,
180 ExtensionPermissionMessage::kNone, kFlagNone); 180 ExtensionPermissionMessage::kNone, kFlagNone);
181 info->RegisterPermission( 181 info->RegisterPermission(
182 kClipboardRead, "clipboardRead", IDS_EXTENSION_PROMPT_WARNING_CLIPBOARD, 182 kClipboardRead, "clipboardRead", IDS_EXTENSION_PROMPT_WARNING_CLIPBOARD,
183 ExtensionPermissionMessage::kClipboard, kFlagNone); 183 ExtensionPermissionMessage::kClipboard, kFlagNone);
184 info->RegisterPermission( 184 info->RegisterPermission(
185 kClipboardWrite, "clipboardWrite", 0, 185 kClipboardWrite, "clipboardWrite", 0,
186 ExtensionPermissionMessage::kNone, kFlagNone); 186 ExtensionPermissionMessage::kNone, kFlagNone);
187 info->RegisterPermission( 187 info->RegisterPermission(
188 kDeclarative, "declarative", 0,
189 ExtensionPermissionMessage::kNone, kFlagNone);
190 info->RegisterPermission(
191 kDeclarativeWebRequest, "declarativeWebRequest", 0,
192 ExtensionPermissionMessage::kNone, kFlagNone);
193 info->RegisterPermission(
188 kExperimental, "experimental", 0, 194 kExperimental, "experimental", 0,
189 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional); 195 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional);
190 info->RegisterPermission( 196 info->RegisterPermission(
191 kGeolocation, "geolocation", IDS_EXTENSION_PROMPT_WARNING_GEOLOCATION, 197 kGeolocation, "geolocation", IDS_EXTENSION_PROMPT_WARNING_GEOLOCATION,
192 ExtensionPermissionMessage::kGeolocation, 198 ExtensionPermissionMessage::kGeolocation,
193 kFlagCannotBeOptional); 199 kFlagCannotBeOptional);
194 info->RegisterPermission( 200 info->RegisterPermission(
195 kNotification, "notifications", 0, 201 kNotification, "notifications", 0,
196 ExtensionPermissionMessage::kNone, kFlagNone); 202 ExtensionPermissionMessage::kNone, kFlagNone);
197 info->RegisterPermission( 203 info->RegisterPermission(
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 ExtensionOAuth2Scopes current_scopes = scopes(); 956 ExtensionOAuth2Scopes current_scopes = scopes();
951 ExtensionOAuth2Scopes new_scopes = permissions->scopes(); 957 ExtensionOAuth2Scopes new_scopes = permissions->scopes();
952 ExtensionOAuth2Scopes delta_scopes; 958 ExtensionOAuth2Scopes delta_scopes;
953 std::set_difference(new_scopes.begin(), new_scopes.end(), 959 std::set_difference(new_scopes.begin(), new_scopes.end(),
954 current_scopes.begin(), current_scopes.end(), 960 current_scopes.begin(), current_scopes.end(),
955 std::inserter(delta_scopes, delta_scopes.begin())); 961 std::inserter(delta_scopes, delta_scopes.begin()));
956 962
957 // We have less privileges if there are additional scopes present. 963 // We have less privileges if there are additional scopes present.
958 return !delta_scopes.empty(); 964 return !delta_scopes.empty();
959 } 965 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698