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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 // Private permissions | 326 // Private permissions |
327 RegisterPermission( | 327 RegisterPermission( |
328 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate", 0, | 328 ExtensionAPIPermission::kChromeosInfoPrivate, "chromeosInfoPrivate", 0, |
329 ExtensionPermissionMessage::kNone, component_only); | 329 ExtensionPermissionMessage::kNone, component_only); |
330 RegisterPermission( | 330 RegisterPermission( |
331 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate", 0, | 331 ExtensionAPIPermission::kFileBrowserPrivate, "fileBrowserPrivate", 0, |
332 ExtensionPermissionMessage::kNone, component_only); | 332 ExtensionPermissionMessage::kNone, component_only); |
333 RegisterPermission( | 333 RegisterPermission( |
334 ExtensionAPIPermission::kMediaPlayerPrivate, "mediaPlayerPrivate", 0, | 334 ExtensionAPIPermission::kMediaPlayerPrivate, "mediaPlayerPrivate", 0, |
335 ExtensionPermissionMessage::kNone, component_only); | 335 ExtensionPermissionMessage::kNone, component_only); |
| 336 RegisterPermission( |
| 337 ExtensionAPIPermission::kMetricsPrivate, "metricsPrivate", 0, |
| 338 ExtensionPermissionMessage::kNone, component_only); |
336 | 339 |
337 // Full url access permissions. | 340 // Full url access permissions. |
338 RegisterPermission( | 341 RegisterPermission( |
339 ExtensionAPIPermission::kProxy, "proxy", 0, | 342 ExtensionAPIPermission::kProxy, "proxy", 0, |
340 ExtensionPermissionMessage::kNone, all_urls); | 343 ExtensionPermissionMessage::kNone, all_urls); |
341 | 344 |
342 RegisterPermission( | 345 RegisterPermission( |
343 ExtensionAPIPermission::kDevtools, "devtools", 0, | 346 ExtensionAPIPermission::kDevtools, "devtools", 0, |
344 ExtensionPermissionMessage::kNone, all_urls); | 347 ExtensionPermissionMessage::kNone, all_urls); |
345 | 348 |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); | 838 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); |
836 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); | 839 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); |
837 std::set<std::string> new_hosts_only; | 840 std::set<std::string> new_hosts_only; |
838 | 841 |
839 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), | 842 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), |
840 old_hosts_set.begin(), old_hosts_set.end(), | 843 old_hosts_set.begin(), old_hosts_set.end(), |
841 std::inserter(new_hosts_only, new_hosts_only.begin())); | 844 std::inserter(new_hosts_only, new_hosts_only.begin())); |
842 | 845 |
843 return !new_hosts_only.empty(); | 846 return !new_hosts_only.empty(); |
844 } | 847 } |
OLD | NEW |