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

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

Issue 9566007: Initial Managed Mode extension API, supporting querying the setting and a stub for enabling the mod… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Updated checkout again 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 info->RegisterPermission( 234 info->RegisterPermission(
235 kKeybinding, "keybinding", 0, 235 kKeybinding, "keybinding", 0,
236 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); 236 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault);
237 info->RegisterPermission( 237 info->RegisterPermission(
238 kIdle, "idle", 0, ExtensionPermissionMessage::kNone, 238 kIdle, "idle", 0, ExtensionPermissionMessage::kNone,
239 kFlagNone, kTypeDefault); 239 kFlagNone, kTypeDefault);
240 info->RegisterPermission( 240 info->RegisterPermission(
241 kInput, "input", 0, ExtensionPermissionMessage::kNone, 241 kInput, "input", 0, ExtensionPermissionMessage::kNone,
242 kFlagImpliesFullURLAccess, kTypeDefault); 242 kFlagImpliesFullURLAccess, kTypeDefault);
243 info->RegisterPermission( 243 info->RegisterPermission(
244 kManagedMode, "managedMode", IDS_EXTENSION_PROMPT_WARNING_MANAGED_MODE,
245 ExtensionPermissionMessage::kManagedMode, kFlagNone, kTypeDefault);
246 info->RegisterPermission(
244 kManagement, "management", IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, 247 kManagement, "management", IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT,
245 ExtensionPermissionMessage::kManagement, kFlagNone, kTypeDefault); 248 ExtensionPermissionMessage::kManagement, kFlagNone, kTypeDefault);
246 info->RegisterPermission( 249 info->RegisterPermission(
247 kPageCapture, "pageCapture", 250 kPageCapture, "pageCapture",
248 IDS_EXTENSION_PROMPT_WARNING_ALL_PAGES_CONTENT, 251 IDS_EXTENSION_PROMPT_WARNING_ALL_PAGES_CONTENT,
249 ExtensionPermissionMessage::kAllPageContent, kFlagNone, kTypeDefault); 252 ExtensionPermissionMessage::kAllPageContent, kFlagNone, kTypeDefault);
250 info->RegisterPermission( 253 info->RegisterPermission(
251 kPrivacy, "privacy", IDS_EXTENSION_PROMPT_WARNING_PRIVACY, 254 kPrivacy, "privacy", IDS_EXTENSION_PROMPT_WARNING_PRIVACY,
252 ExtensionPermissionMessage::kPrivacy, kFlagNone, kTypeDefault); 255 ExtensionPermissionMessage::kPrivacy, kFlagNone, kTypeDefault);
253 info->RegisterPermission( 256 info->RegisterPermission(
(...skipping 668 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
« no previous file with comments | « chrome/common/extensions/extension_permission_set.h ('k') | chrome/test/data/extensions/api_test/managedMode/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698