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