| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 ExtensionPermissionMessage::kNone, kFlagNone, | 222 ExtensionPermissionMessage::kNone, kFlagNone, |
| 223 kTypeDefault - kTypePlatformApp); | 223 kTypeDefault - kTypePlatformApp); |
| 224 info->RegisterPermission( | 224 info->RegisterPermission( |
| 225 kFileBrowserHandler, "fileBrowserHandler", 0, | 225 kFileBrowserHandler, "fileBrowserHandler", 0, |
| 226 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeDefault); | 226 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeDefault); |
| 227 info->RegisterPermission( | 227 info->RegisterPermission( |
| 228 kHistory, "history", IDS_EXTENSION_PROMPT_WARNING_BROWSING_HISTORY, | 228 kHistory, "history", IDS_EXTENSION_PROMPT_WARNING_BROWSING_HISTORY, |
| 229 ExtensionPermissionMessage::kBrowsingHistory, | 229 ExtensionPermissionMessage::kBrowsingHistory, |
| 230 kFlagNone, kTypeDefault); | 230 kFlagNone, kTypeDefault); |
| 231 info->RegisterPermission( | 231 info->RegisterPermission( |
| 232 kKeybinding, "keybinding", 0, |
| 233 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); |
| 234 info->RegisterPermission( |
| 232 kIdle, "idle", 0, ExtensionPermissionMessage::kNone, | 235 kIdle, "idle", 0, ExtensionPermissionMessage::kNone, |
| 233 kFlagNone, kTypeDefault); | 236 kFlagNone, kTypeDefault); |
| 234 info->RegisterPermission( | 237 info->RegisterPermission( |
| 235 kInput, "input", 0, ExtensionPermissionMessage::kNone, | 238 kInput, "input", 0, ExtensionPermissionMessage::kNone, |
| 236 kFlagImpliesFullURLAccess, kTypeDefault); | 239 kFlagImpliesFullURLAccess, kTypeDefault); |
| 237 info->RegisterPermission( | 240 info->RegisterPermission( |
| 238 kManagement, "management", IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, | 241 kManagement, "management", IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, |
| 239 ExtensionPermissionMessage::kManagement, kFlagNone, kTypeDefault); | 242 ExtensionPermissionMessage::kManagement, kFlagNone, kTypeDefault); |
| 240 info->RegisterPermission( | 243 info->RegisterPermission( |
| 241 kPageCapture, "pageCapture", | 244 kPageCapture, "pageCapture", |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 919 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
| 917 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 920 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
| 918 std::set<std::string> new_hosts_only; | 921 std::set<std::string> new_hosts_only; |
| 919 | 922 |
| 920 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 923 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
| 921 old_hosts_set.begin(), old_hosts_set.end(), | 924 old_hosts_set.begin(), old_hosts_set.end(), |
| 922 std::inserter(new_hosts_only, new_hosts_only.begin())); | 925 std::inserter(new_hosts_only, new_hosts_only.begin())); |
| 923 | 926 |
| 924 return !new_hosts_only.empty(); | 927 return !new_hosts_only.empty(); |
| 925 } | 928 } |
| OLD | NEW |