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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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", 0, |
317 ExtensionPermissionMessage::kNone, none); | 317 ExtensionPermissionMessage::kNone, none); |
318 RegisterPermission( | 318 RegisterPermission( |
319 ExtensionAPIPermission::kWebRequest, "webRequest", 0, | 319 ExtensionAPIPermission::kWebRequest, "webRequest", 0, |
320 ExtensionPermissionMessage::kNone, none); | 320 ExtensionPermissionMessage::kNone, none); |
321 RegisterPermission( | 321 RegisterPermission( |
322 ExtensionAPIPermission::kWebRequestBlocking, "webRequest_blocking", 0, | |
Matt Perry
2011/11/28 20:38:12
Make it webRequestBlocking.
battre
2011/11/29 09:59:47
Done.
| |
323 ExtensionPermissionMessage::kNone, none); | |
324 RegisterPermission( | |
322 ExtensionAPIPermission::kWebSocketProxyPrivate, | 325 ExtensionAPIPermission::kWebSocketProxyPrivate, |
323 "webSocketProxyPrivate", 0, | 326 "webSocketProxyPrivate", 0, |
324 ExtensionPermissionMessage::kNone, none); | 327 ExtensionPermissionMessage::kNone, none); |
325 | 328 |
326 // Private permissions | 329 // Private permissions |
327 RegisterPermission( | 330 RegisterPermission( |
328 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate", 0, | 331 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate", 0, |
329 ExtensionPermissionMessage::kNone, component_only); | 332 ExtensionPermissionMessage::kNone, component_only); |
330 RegisterPermission( | 333 RegisterPermission( |
331 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate", 0, | 334 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate", 0, |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
838 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)); |
839 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)); |
840 std::set<std::string> new_hosts_only; | 843 std::set<std::string> new_hosts_only; |
841 | 844 |
842 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 845 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
843 old_hosts_set.begin(), old_hosts_set.end(), | 846 old_hosts_set.begin(), old_hosts_set.end(), |
844 std::inserter(new_hosts_only, new_hosts_only.begin())); | 847 std::inserter(new_hosts_only, new_hosts_only.begin())); |
845 | 848 |
846 return !new_hosts_only.empty(); | 849 return !new_hosts_only.empty(); |
847 } | 850 } |
OLD | NEW |