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/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 kInputMethodPrivate, "inputMethodPrivate", 0, | 248 kInputMethodPrivate, "inputMethodPrivate", 0, |
249 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeDefault); | 249 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeDefault); |
250 info->RegisterPermission( | 250 info->RegisterPermission( |
251 kManagement, "management", IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, | 251 kManagement, "management", IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, |
252 ExtensionPermissionMessage::kManagement, kFlagNone, kTypeDefault); | 252 ExtensionPermissionMessage::kManagement, kFlagNone, kTypeDefault); |
253 info->RegisterPermission( | 253 info->RegisterPermission( |
254 kPageCapture, "pageCapture", | 254 kPageCapture, "pageCapture", |
255 IDS_EXTENSION_PROMPT_WARNING_ALL_PAGES_CONTENT, | 255 IDS_EXTENSION_PROMPT_WARNING_ALL_PAGES_CONTENT, |
256 ExtensionPermissionMessage::kAllPageContent, kFlagNone, kTypeDefault); | 256 ExtensionPermissionMessage::kAllPageContent, kFlagNone, kTypeDefault); |
257 info->RegisterPermission( | 257 info->RegisterPermission( |
| 258 kStorage, "storage", 0, |
| 259 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); |
| 260 info->RegisterPermission( |
258 kTab, "tabs", IDS_EXTENSION_PROMPT_WARNING_TABS, | 261 kTab, "tabs", IDS_EXTENSION_PROMPT_WARNING_TABS, |
259 ExtensionPermissionMessage::kTabs, kFlagNone, | 262 ExtensionPermissionMessage::kTabs, kFlagNone, |
260 kTypeDefault - kTypePlatformApp); | 263 kTypeDefault - kTypePlatformApp); |
261 info->RegisterPermission( | 264 info->RegisterPermission( |
262 kTts, "tts", 0, | 265 kTts, "tts", 0, |
263 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeDefault); | 266 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional, kTypeDefault); |
264 info->RegisterPermission( | 267 info->RegisterPermission( |
265 kTtsEngine, "ttsEngine", IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE, | 268 kTtsEngine, "ttsEngine", IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE, |
266 ExtensionPermissionMessage::kTtsEngine, | 269 ExtensionPermissionMessage::kTtsEngine, |
267 kFlagCannotBeOptional, kTypeDefault); | 270 kFlagCannotBeOptional, kTypeDefault); |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 868 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
866 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 869 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
867 std::set<std::string> new_hosts_only; | 870 std::set<std::string> new_hosts_only; |
868 | 871 |
869 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 872 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
870 old_hosts_set.begin(), old_hosts_set.end(), | 873 old_hosts_set.begin(), old_hosts_set.end(), |
871 std::inserter(new_hosts_only, new_hosts_only.begin())); | 874 std::inserter(new_hosts_only, new_hosts_only.begin())); |
872 | 875 |
873 return !new_hosts_only.empty(); | 876 return !new_hosts_only.empty(); |
874 } | 877 } |
OLD | NEW |