| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 RegisterPermission( | 262 RegisterPermission( |
| 263 ExtensionAPIPermission::kWebstorePrivate, "webstorePrivate", 0, | 263 ExtensionAPIPermission::kWebstorePrivate, "webstorePrivate", 0, |
| 264 ExtensionPermissionMessage::kNone, hosted_app | component_only); | 264 ExtensionPermissionMessage::kNone, hosted_app | component_only); |
| 265 | 265 |
| 266 // Extension permissions. | 266 // Extension permissions. |
| 267 RegisterPermission( | 267 RegisterPermission( |
| 268 ExtensionAPIPermission::kBookmark, "bookmarks", | 268 ExtensionAPIPermission::kBookmark, "bookmarks", |
| 269 IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS, | 269 IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS, |
| 270 ExtensionPermissionMessage::kBookmarks, optional); | 270 ExtensionPermissionMessage::kBookmarks, optional); |
| 271 RegisterPermission( | 271 RegisterPermission( |
| 272 ExtensionAPIPermission::kClear, "clear", |
| 273 IDS_EXTENSION_PROMPT_WARNING_CLEAR, |
| 274 ExtensionPermissionMessage::kClear, optional); |
| 275 RegisterPermission( |
| 272 ExtensionAPIPermission::kContentSettings, "contentSettings", 0, | 276 ExtensionAPIPermission::kContentSettings, "contentSettings", 0, |
| 273 ExtensionPermissionMessage::kNone, none); | 277 ExtensionPermissionMessage::kNone, none); |
| 274 RegisterPermission( | 278 RegisterPermission( |
| 275 ExtensionAPIPermission::kContextMenus, "contextMenus", 0, | 279 ExtensionAPIPermission::kContextMenus, "contextMenus", 0, |
| 276 ExtensionPermissionMessage::kNone, optional); | 280 ExtensionPermissionMessage::kNone, optional); |
| 277 RegisterPermission( | 281 RegisterPermission( |
| 278 ExtensionAPIPermission::kCookie, "cookies", 0, | 282 ExtensionAPIPermission::kCookie, "cookies", 0, |
| 279 ExtensionPermissionMessage::kNone, optional); | 283 ExtensionPermissionMessage::kNone, optional); |
| 280 RegisterPermission( | 284 RegisterPermission( |
| 281 ExtensionAPIPermission::kDebugger, "debugger", | 285 ExtensionAPIPermission::kDebugger, "debugger", |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 837 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)); | 838 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
| 835 std::set<std::string> new_hosts_only; | 839 std::set<std::string> new_hosts_only; |
| 836 | 840 |
| 837 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 841 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
| 838 old_hosts_set.begin(), old_hosts_set.end(), | 842 old_hosts_set.begin(), old_hosts_set.end(), |
| 839 std::inserter(new_hosts_only, new_hosts_only.begin())); | 843 std::inserter(new_hosts_only, new_hosts_only.begin())); |
| 840 | 844 |
| 841 return !new_hosts_only.empty(); | 845 return !new_hosts_only.empty(); |
| 842 } | 846 } |
| OLD | NEW |