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