| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 info->RegisterPermission( | 204 info->RegisterPermission( |
| 205 kAppNotifications, "appNotifications", 0, | 205 kAppNotifications, "appNotifications", 0, |
| 206 ExtensionPermissionMessage::kNone, kFlagNone, | 206 ExtensionPermissionMessage::kNone, kFlagNone, |
| 207 kTypeHostedApp | kTypePackagedApp); | 207 kTypeHostedApp | kTypePackagedApp); |
| 208 | 208 |
| 209 // Register extension permissions. | 209 // Register extension permissions. |
| 210 info->RegisterPermission( | 210 info->RegisterPermission( |
| 211 kBookmark, "bookmarks", IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS, | 211 kBookmark, "bookmarks", IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS, |
| 212 ExtensionPermissionMessage::kBookmarks, kFlagNone, kTypeDefault); | 212 ExtensionPermissionMessage::kBookmarks, kFlagNone, kTypeDefault); |
| 213 info->RegisterPermission( | 213 info->RegisterPermission( |
| 214 kBrowsingData, "browsingData", 0, |
| 215 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); |
| 216 info->RegisterPermission( |
| 214 kContentSettings, "contentSettings", | 217 kContentSettings, "contentSettings", |
| 215 IDS_EXTENSION_PROMPT_WARNING_CONTENT_SETTINGS, | 218 IDS_EXTENSION_PROMPT_WARNING_CONTENT_SETTINGS, |
| 216 ExtensionPermissionMessage::kContentSettings, kFlagNone, kTypeDefault); | 219 ExtensionPermissionMessage::kContentSettings, kFlagNone, kTypeDefault); |
| 217 info->RegisterPermission( | 220 info->RegisterPermission( |
| 218 kContextMenus, "contextMenus", 0, | 221 kContextMenus, "contextMenus", 0, |
| 219 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); | 222 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); |
| 220 info->RegisterPermission( | 223 info->RegisterPermission( |
| 221 kCookie, "cookies", 0, | 224 kCookie, "cookies", 0, |
| 222 ExtensionPermissionMessage::kNone, kFlagNone, | 225 ExtensionPermissionMessage::kNone, kFlagNone, |
| 223 kTypeDefault - kTypePlatformApp); | 226 kTypeDefault - kTypePlatformApp); |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 922 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
| 920 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 923 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
| 921 std::set<std::string> new_hosts_only; | 924 std::set<std::string> new_hosts_only; |
| 922 | 925 |
| 923 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 926 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
| 924 old_hosts_set.begin(), old_hosts_set.end(), | 927 old_hosts_set.begin(), old_hosts_set.end(), |
| 925 std::inserter(new_hosts_only, new_hosts_only.begin())); | 928 std::inserter(new_hosts_only, new_hosts_only.begin())); |
| 926 | 929 |
| 927 return !new_hosts_only.empty(); | 930 return !new_hosts_only.empty(); |
| 928 } | 931 } |
| OLD | NEW |