| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |