| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 kFileBrowserHandler, "fileBrowserHandler", 0, | 242 kFileBrowserHandler, "fileBrowserHandler", 0, |
| 243 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); | 243 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); |
| 244 info->RegisterPermission( | 244 info->RegisterPermission( |
| 245 kHistory, "history", IDS_EXTENSION_PROMPT_WARNING_BROWSING_HISTORY, | 245 kHistory, "history", IDS_EXTENSION_PROMPT_WARNING_BROWSING_HISTORY, |
| 246 ExtensionPermissionMessage::kBrowsingHistory, | 246 ExtensionPermissionMessage::kBrowsingHistory, |
| 247 kFlagSupportsOptional, kTypeDefault); | 247 kFlagSupportsOptional, kTypeDefault); |
| 248 info->RegisterPermission( | 248 info->RegisterPermission( |
| 249 kIdle, "idle", 0, ExtensionPermissionMessage::kNone, | 249 kIdle, "idle", 0, ExtensionPermissionMessage::kNone, |
| 250 kFlagSupportsOptional, kTypeDefault); | 250 kFlagSupportsOptional, kTypeDefault); |
| 251 info->RegisterPermission( | 251 info->RegisterPermission( |
| 252 kIme, "ime", IDS_EXTENSION_PROMPT_WARNING_IME, |
| 253 ExtensionPermissionMessage::kIme, |
| 254 kFlagSupportsOptional, kTypeDefault); |
| 255 info->RegisterPermission( |
| 252 kInputMethodPrivate, "inputMethodPrivate", 0, | 256 kInputMethodPrivate, "inputMethodPrivate", 0, |
| 253 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); | 257 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); |
| 254 info->RegisterPermission( | 258 info->RegisterPermission( |
| 255 kManagement, "management", IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, | 259 kManagement, "management", IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, |
| 256 ExtensionPermissionMessage::kManagement, | 260 ExtensionPermissionMessage::kManagement, |
| 257 kFlagSupportsOptional, kTypeDefault); | 261 kFlagSupportsOptional, kTypeDefault); |
| 258 info->RegisterPermission( | 262 info->RegisterPermission( |
| 259 kPageCapture, "pageCapture", | 263 kPageCapture, "pageCapture", |
| 260 IDS_EXTENSION_PROMPT_WARNING_ALL_PAGES_CONTENT, | 264 IDS_EXTENSION_PROMPT_WARNING_ALL_PAGES_CONTENT, |
| 261 ExtensionPermissionMessage::kAllPageContent, | 265 ExtensionPermissionMessage::kAllPageContent, |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 863 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
| 860 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 864 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
| 861 std::set<std::string> new_hosts_only; | 865 std::set<std::string> new_hosts_only; |
| 862 | 866 |
| 863 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 867 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
| 864 old_hosts_set.begin(), old_hosts_set.end(), | 868 old_hosts_set.begin(), old_hosts_set.end(), |
| 865 std::inserter(new_hosts_only, new_hosts_only.begin())); | 869 std::inserter(new_hosts_only, new_hosts_only.begin())); |
| 866 | 870 |
| 867 return !new_hosts_only.empty(); | 871 return !new_hosts_only.empty(); |
| 868 } | 872 } |
| OLD | NEW |