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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 IDS_EXTENSION_PROMPT_WARNING_TABS, | 303 IDS_EXTENSION_PROMPT_WARNING_TABS, |
304 ExtensionPermissionMessage::kTabs, optional); | 304 ExtensionPermissionMessage::kTabs, optional); |
305 RegisterPermission( | 305 RegisterPermission( |
306 ExtensionAPIPermission::kTts, "tts", 0, | 306 ExtensionAPIPermission::kTts, "tts", 0, |
307 ExtensionPermissionMessage::kNone, none); | 307 ExtensionPermissionMessage::kNone, none); |
308 RegisterPermission( | 308 RegisterPermission( |
309 ExtensionAPIPermission::kTtsEngine, "ttsEngine", | 309 ExtensionAPIPermission::kTtsEngine, "ttsEngine", |
310 IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE, | 310 IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE, |
311 ExtensionPermissionMessage::kTtsEngine, none); | 311 ExtensionPermissionMessage::kTtsEngine, none); |
312 RegisterPermission( | 312 RegisterPermission( |
313 ExtensionAPIPermission::kWebNavigation, "webNavigation", | 313 ExtensionAPIPermission::kWebNavigation, "webNavigation", 0, |
314 IDS_EXTENSION_PROMPT_WARNING_TABS, | 314 ExtensionPermissionMessage::kNone, none); |
315 ExtensionPermissionMessage::kTabs, none); | 315 RegisterPermission( |
| 316 ExtensionAPIPermission::kWebRequest, "webRequest", 0, |
| 317 ExtensionPermissionMessage::kNone, none); |
316 RegisterPermission( | 318 RegisterPermission( |
317 ExtensionAPIPermission::kWebSocketProxyPrivate, | 319 ExtensionAPIPermission::kWebSocketProxyPrivate, |
318 "webSocketProxyPrivate", 0, | 320 "webSocketProxyPrivate", 0, |
319 ExtensionPermissionMessage::kNone, none); | 321 ExtensionPermissionMessage::kNone, none); |
320 | 322 |
321 // Private permissions | 323 // Private permissions |
322 RegisterPermission( | 324 RegisterPermission( |
323 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate", 0, | 325 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate", 0, |
324 ExtensionPermissionMessage::kNone, component_only); | 326 ExtensionPermissionMessage::kNone, component_only); |
325 RegisterPermission( | 327 RegisterPermission( |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 839 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
838 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 840 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
839 std::set<std::string> new_hosts_only; | 841 std::set<std::string> new_hosts_only; |
840 | 842 |
841 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 843 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
842 old_hosts_set.begin(), old_hosts_set.end(), | 844 old_hosts_set.begin(), old_hosts_set.end(), |
843 std::inserter(new_hosts_only, new_hosts_only.begin())); | 845 std::inserter(new_hosts_only, new_hosts_only.begin())); |
844 | 846 |
845 return !new_hosts_only.empty(); | 847 return !new_hosts_only.empty(); |
846 } | 848 } |
OLD | NEW |