Chromium Code Reviews| 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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", |
| 314 IDS_EXTENSION_PROMPT_WARNING_TABS, | 314 IDS_EXTENSION_PROMPT_WARNING_TABS, |
|
Aaron Boodman
2011/10/10 22:59:29
What is the behavior with these two APIs if you ha
Pam (message me for reviews)
2011/10/12 14:28:12
They'll let you register a listener in any case, b
| |
| 315 ExtensionPermissionMessage::kTabs, none); | 315 ExtensionPermissionMessage::kTabs, none); |
| 316 RegisterPermission( | 316 RegisterPermission( |
| 317 ExtensionAPIPermission::kWebRequest, "webRequest", | |
| 318 IDS_EXTENSION_PROMPT_WARNING_TABS, | |
| 319 ExtensionPermissionMessage::kTabs, none); | |
| 320 RegisterPermission( | |
| 317 ExtensionAPIPermission::kWebSocketProxyPrivate, | 321 ExtensionAPIPermission::kWebSocketProxyPrivate, |
| 318 "webSocketProxyPrivate", 0, | 322 "webSocketProxyPrivate", 0, |
| 319 ExtensionPermissionMessage::kNone, none); | 323 ExtensionPermissionMessage::kNone, none); |
| 320 | 324 |
| 321 // Private permissions | 325 // Private permissions |
| 322 RegisterPermission( | 326 RegisterPermission( |
| 323 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate", 0, | 327 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate", 0, |
| 324 ExtensionPermissionMessage::kNone, component_only); | 328 ExtensionPermissionMessage::kNone, component_only); |
| 325 RegisterPermission( | 329 RegisterPermission( |
| 326 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate", 0, | 330 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate", 0, |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 837 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)); |
| 838 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)); |
| 839 std::set<std::string> new_hosts_only; | 843 std::set<std::string> new_hosts_only; |
| 840 | 844 |
| 841 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 845 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
| 842 old_hosts_set.begin(), old_hosts_set.end(), | 846 old_hosts_set.begin(), old_hosts_set.end(), |
| 843 std::inserter(new_hosts_only, new_hosts_only.begin())); | 847 std::inserter(new_hosts_only, new_hosts_only.begin())); |
| 844 | 848 |
| 845 return !new_hosts_only.empty(); | 849 return !new_hosts_only.empty(); |
| 846 } | 850 } |
| OLD | NEW |