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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 ExtensionAPIPermission::kIdle, "idle", 0, | 295 ExtensionAPIPermission::kIdle, "idle", 0, |
296 ExtensionPermissionMessage::kNone, optional); | 296 ExtensionPermissionMessage::kNone, optional); |
297 RegisterPermission( | 297 RegisterPermission( |
298 ExtensionAPIPermission::kInputMethodPrivate, "inputMethodPrivate", 0, | 298 ExtensionAPIPermission::kInputMethodPrivate, "inputMethodPrivate", 0, |
299 ExtensionPermissionMessage::kNone, none); | 299 ExtensionPermissionMessage::kNone, none); |
300 RegisterPermission( | 300 RegisterPermission( |
301 ExtensionAPIPermission::kManagement, "management", | 301 ExtensionAPIPermission::kManagement, "management", |
302 IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, | 302 IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, |
303 ExtensionPermissionMessage::kManagement, optional); | 303 ExtensionPermissionMessage::kManagement, optional); |
304 RegisterPermission( | 304 RegisterPermission( |
| 305 ExtensionAPIPermission::kPageCapture, "pageCapture", |
| 306 IDS_EXTENSION_PROMPT_WARNING_ALL_PAGES_CONTENT, |
| 307 ExtensionPermissionMessage::kAllPageContent, none); |
| 308 RegisterPermission( |
305 ExtensionAPIPermission::kTab, "tabs", | 309 ExtensionAPIPermission::kTab, "tabs", |
306 IDS_EXTENSION_PROMPT_WARNING_TABS, | 310 IDS_EXTENSION_PROMPT_WARNING_TABS, |
307 ExtensionPermissionMessage::kTabs, optional); | 311 ExtensionPermissionMessage::kTabs, optional); |
308 RegisterPermission( | 312 RegisterPermission( |
309 ExtensionAPIPermission::kTts, "tts", 0, | 313 ExtensionAPIPermission::kTts, "tts", 0, |
310 ExtensionPermissionMessage::kNone, none); | 314 ExtensionPermissionMessage::kNone, none); |
311 RegisterPermission( | 315 RegisterPermission( |
312 ExtensionAPIPermission::kTtsEngine, "ttsEngine", | 316 ExtensionAPIPermission::kTtsEngine, "ttsEngine", |
313 IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE, | 317 IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE, |
314 ExtensionPermissionMessage::kTtsEngine, none); | 318 ExtensionPermissionMessage::kTtsEngine, none); |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 842 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
839 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 843 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
840 std::set<std::string> new_hosts_only; | 844 std::set<std::string> new_hosts_only; |
841 | 845 |
842 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 846 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
843 old_hosts_set.begin(), old_hosts_set.end(), | 847 old_hosts_set.begin(), old_hosts_set.end(), |
844 std::inserter(new_hosts_only, new_hosts_only.begin())); | 848 std::inserter(new_hosts_only, new_hosts_only.begin())); |
845 | 849 |
846 return !new_hosts_only.empty(); | 850 return !new_hosts_only.empty(); |
847 } | 851 } |
OLD | NEW |