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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 ExtensionPermissionMessage::kNone, kFlagComponentOnly, kTypeDefault); | 293 ExtensionPermissionMessage::kNone, kFlagComponentOnly, kTypeDefault); |
294 info->RegisterPermission( | 294 info->RegisterPermission( |
295 kFileBrowserPrivate, "fileBrowserPrivate", 0, | 295 kFileBrowserPrivate, "fileBrowserPrivate", 0, |
296 ExtensionPermissionMessage::kNone, kFlagComponentOnly, kTypeDefault); | 296 ExtensionPermissionMessage::kNone, kFlagComponentOnly, kTypeDefault); |
297 info->RegisterPermission( | 297 info->RegisterPermission( |
298 kMediaPlayerPrivate, "mediaPlayerPrivate", 0, | 298 kMediaPlayerPrivate, "mediaPlayerPrivate", 0, |
299 ExtensionPermissionMessage::kNone, kFlagComponentOnly, kTypeDefault); | 299 ExtensionPermissionMessage::kNone, kFlagComponentOnly, kTypeDefault); |
300 info->RegisterPermission( | 300 info->RegisterPermission( |
301 kMetricsPrivate, "metricsPrivate", 0, | 301 kMetricsPrivate, "metricsPrivate", 0, |
302 ExtensionPermissionMessage::kNone, kFlagComponentOnly, kTypeDefault); | 302 ExtensionPermissionMessage::kNone, kFlagComponentOnly, kTypeDefault); |
| 303 info->RegisterPermission( |
| 304 kSystemPrivate, "systemPrivate", 0, |
| 305 ExtensionPermissionMessage::kNone, kFlagComponentOnly, kTypeDefault); |
303 | 306 |
304 // Full url access permissions. | 307 // Full url access permissions. |
305 info->RegisterPermission( | 308 info->RegisterPermission( |
306 kProxy, "proxy", 0, ExtensionPermissionMessage::kNone, | 309 kProxy, "proxy", 0, ExtensionPermissionMessage::kNone, |
307 kFlagImpliesFullURLAccess, kTypeDefault); | 310 kFlagImpliesFullURLAccess, kTypeDefault); |
308 | 311 |
309 info->RegisterPermission( | 312 info->RegisterPermission( |
310 kDevtools, "devtools", 0, ExtensionPermissionMessage::kNone, | 313 kDevtools, "devtools", 0, ExtensionPermissionMessage::kNone, |
311 kFlagImpliesFullURLAccess, kTypeDefault); | 314 kFlagImpliesFullURLAccess, kTypeDefault); |
312 | 315 |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 858 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
856 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 859 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
857 std::set<std::string> new_hosts_only; | 860 std::set<std::string> new_hosts_only; |
858 | 861 |
859 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 862 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
860 old_hosts_set.begin(), old_hosts_set.end(), | 863 old_hosts_set.begin(), old_hosts_set.end(), |
861 std::inserter(new_hosts_only, new_hosts_only.begin())); | 864 std::inserter(new_hosts_only, new_hosts_only.begin())); |
862 | 865 |
863 return !new_hosts_only.empty(); | 866 return !new_hosts_only.empty(); |
864 } | 867 } |
OLD | NEW |