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

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: permissions Created 8 years, 9 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 info->RegisterPermission( 179 info->RegisterPermission(
180 kBackground, "background", 0, 180 kBackground, "background", 0,
181 ExtensionPermissionMessage::kNone, kFlagNone, kTypeAll); 181 ExtensionPermissionMessage::kNone, kFlagNone, kTypeAll);
182 info->RegisterPermission( 182 info->RegisterPermission(
183 kClipboardRead, "clipboardRead", IDS_EXTENSION_PROMPT_WARNING_CLIPBOARD, 183 kClipboardRead, "clipboardRead", IDS_EXTENSION_PROMPT_WARNING_CLIPBOARD,
184 ExtensionPermissionMessage::kClipboard, kFlagNone, kTypeAll); 184 ExtensionPermissionMessage::kClipboard, kFlagNone, kTypeAll);
185 info->RegisterPermission( 185 info->RegisterPermission(
186 kClipboardWrite, "clipboardWrite", 0, 186 kClipboardWrite, "clipboardWrite", 0,
187 ExtensionPermissionMessage::kNone, kFlagNone, kTypeAll); 187 ExtensionPermissionMessage::kNone, kFlagNone, kTypeAll);
188 info->RegisterPermission( 188 info->RegisterPermission(
189 kDownloads, "downloads", IDS_EXTENSION_PROMPT_WARNING_DOWNLOADS,
190 ExtensionPermissionMessage::kNone, kFlagNone, kTypeAll);
191 info->RegisterPermission(
189 kExperimental, "experimental", 0, 192 kExperimental, "experimental", 0,
190 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeAll); 193 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeAll);
191 info->RegisterPermission( 194 info->RegisterPermission(
192 kGeolocation, "geolocation", IDS_EXTENSION_PROMPT_WARNING_GEOLOCATION, 195 kGeolocation, "geolocation", IDS_EXTENSION_PROMPT_WARNING_GEOLOCATION,
193 ExtensionPermissionMessage::kGeolocation, 196 ExtensionPermissionMessage::kGeolocation,
194 kFlagCannotBeOptional, kTypeAll); 197 kFlagCannotBeOptional, kTypeAll);
195 info->RegisterPermission( 198 info->RegisterPermission(
196 kNotification, "notifications", 0, 199 kNotification, "notifications", 0,
197 ExtensionPermissionMessage::kNone, kFlagNone, kTypeAll); 200 ExtensionPermissionMessage::kNone, kFlagNone, kTypeAll);
198 info->RegisterPermission( 201 info->RegisterPermission(
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); 925 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false));
923 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); 926 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false));
924 std::set<std::string> new_hosts_only; 927 std::set<std::string> new_hosts_only;
925 928
926 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), 929 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(),
927 old_hosts_set.begin(), old_hosts_set.end(), 930 old_hosts_set.begin(), old_hosts_set.end(),
928 std::inserter(new_hosts_only, new_hosts_only.begin())); 931 std::inserter(new_hosts_only, new_hosts_only.begin()));
929 932
930 return !new_hosts_only.empty(); 933 return !new_hosts_only.empty();
931 } 934 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698