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