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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
292 ExtensionPermissionMessage::kNone); | 292 ExtensionPermissionMessage::kNone); |
293 RegisterExtensionPermission( | 293 RegisterExtensionPermission( |
294 ExtensionAPIPermission::kManagement, "management", | 294 ExtensionAPIPermission::kManagement, "management", |
295 IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, | 295 IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT, |
296 ExtensionPermissionMessage::kManagement); | 296 ExtensionPermissionMessage::kManagement); |
297 RegisterExtensionPermission( | 297 RegisterExtensionPermission( |
298 ExtensionAPIPermission::kTab, "tabs", | 298 ExtensionAPIPermission::kTab, "tabs", |
299 IDS_EXTENSION_PROMPT_WARNING_TABS, | 299 IDS_EXTENSION_PROMPT_WARNING_TABS, |
300 ExtensionPermissionMessage::kTabs); | 300 ExtensionPermissionMessage::kTabs); |
301 RegisterExtensionPermission( | 301 RegisterExtensionPermission( |
302 ExtensionAPIPermission::kTts, "tts", | |
303 IDS_EXTENSION_PROMPT_WARNING_TTS, | |
Erik does not do reviews
2011/07/15 23:04:04
Do we really need a TTS warning? My take is that
dmazzoni
2011/07/20 05:58:04
Done.
| |
304 ExtensionPermissionMessage::kTts); | |
305 RegisterExtensionPermission( | |
306 ExtensionAPIPermission::kTtsEngine, "ttsEngine", | |
307 IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE, | |
Erik does not do reviews
2011/07/15 23:04:04
This one seems fine though.
| |
308 ExtensionPermissionMessage::kTtsEngine); | |
309 RegisterExtensionPermission( | |
302 ExtensionAPIPermission::kWebSocketProxyPrivate, | 310 ExtensionAPIPermission::kWebSocketProxyPrivate, |
303 "webSocketProxyPrivate", 0, | 311 "webSocketProxyPrivate", 0, |
304 ExtensionPermissionMessage::kNone); | 312 ExtensionPermissionMessage::kNone); |
305 | 313 |
306 // Private permissions | 314 // Private permissions |
307 RegisterPrivatePermission( | 315 RegisterPrivatePermission( |
308 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate"); | 316 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate"); |
309 RegisterPrivatePermission( | 317 RegisterPrivatePermission( |
310 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate"); | 318 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate"); |
311 RegisterPrivatePermission( | 319 RegisterPrivatePermission( |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
775 std::set<std::string> new_hosts_set = GetDistinctHosts(new_list, false); | 783 std::set<std::string> new_hosts_set = GetDistinctHosts(new_list, false); |
776 std::set<std::string> old_hosts_set = GetDistinctHosts(old_list, false); | 784 std::set<std::string> old_hosts_set = GetDistinctHosts(old_list, false); |
777 std::set<std::string> new_hosts_only; | 785 std::set<std::string> new_hosts_only; |
778 | 786 |
779 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 787 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
780 old_hosts_set.begin(), old_hosts_set.end(), | 788 old_hosts_set.begin(), old_hosts_set.end(), |
781 std::inserter(new_hosts_only, new_hosts_only.begin())); | 789 std::inserter(new_hosts_only, new_hosts_only.begin())); |
782 | 790 |
783 return !new_hosts_only.empty(); | 791 return !new_hosts_only.empty(); |
784 } | 792 } |
OLD | NEW |